Difference between revisions of "Template:Type"

From Kolmafia
Jump to navigation Jump to search
(Created page with "<includeonly>{{#switch:{{{1|}}} |void=void |boolean=boolean |int=int |float=float |string=...")
 
(Don't bother with complex types...for now)
Line 23: Line 23:
 
|matcher=[[Data Types#matcher|matcher]]
 
|matcher=[[Data Types#matcher|matcher]]
 
|record=[[Data Types#record|record]]
 
|record=[[Data Types#record|record]]
|boolean [monster]=[[Data Types#boolean|boolean]] &#91;[[Data Types#monster|monster]]&#93;
+
|aggregate=[[Data Types#record|aggregate]]
 
|{{{1|}}}
 
|{{{1|}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
Line 29: Line 29:
 
<templatedata>
 
<templatedata>
 
{
 
{
   "description": "Takes an ASH data type and creates appropriate links.",
+
   "description": "Converts an ASH data type name to a link.",
 
   "params": {
 
   "params": {
 
     "1": {
 
     "1": {
 
       "label": "Data type",
 
       "label": "Data type",
       "description": "Can be a primitive type, such as \"string\" or \"void\", or some composite type. Any unrecognized type is assumed to be an aggregate type.",
+
       "description": "Any valid type keyword, such as \"string\", \"void\", \"equipment\", or a generic type (\"aggregate\", \"composite\"). Any unrecognized type string is returned as-is.",
 
       "type": "line",
 
       "type": "line",
 
       "required": true,
 
       "required": true,
Line 43: Line 43:
  
 
==Examples==
 
==Examples==
===Simple Types===
+
===Recognized Types===
 
<pre>
 
<pre>
 
*{{User:Philmasterplus/Type|void}}
 
*{{User:Philmasterplus/Type|void}}
Line 68: Line 68:
 
*{{User:Philmasterplus/Type|matcher}}
 
*{{User:Philmasterplus/Type|matcher}}
 
*{{User:Philmasterplus/Type|record}}
 
*{{User:Philmasterplus/Type|record}}
 +
*{{User:Philmasterplus/Type|aggregate}}
 
</pre>
 
</pre>
  
Line 93: Line 94:
 
*{{User:Philmasterplus/Type|matcher}}
 
*{{User:Philmasterplus/Type|matcher}}
 
*{{User:Philmasterplus/Type|record}}
 
*{{User:Philmasterplus/Type|record}}
 +
*{{User:Philmasterplus/Type|aggregate}}
  
===Known Complex Types===
+
===Unrecognized Types===
 
<pre>
 
<pre>
 
*{{User:Philmasterplus/Type|boolean [monster]}}
 
*{{User:Philmasterplus/Type|boolean [monster]}}
 +
*{{User:Philmasterplus/Type|{{User:Philmasterplus/Type|string}} &#91;{{User:Philmasterplus/Type|int}}, {{User:Philmasterplus/Type|item}}&#93;}}
 
</pre>
 
</pre>
  
 
*{{User:Philmasterplus/Type|boolean [monster]}}
 
*{{User:Philmasterplus/Type|boolean [monster]}}
 +
*{{User:Philmasterplus/Type|{{User:Philmasterplus/Type|string}} &#91;{{User:Philmasterplus/Type|int}}, {{User:Philmasterplus/Type|item}}&#93;}}
 
</noinclude>
 
</noinclude>

Revision as of 21:27, 18 December 2020


Converts an ASH data type name to a link.

Template parameters

ParameterDescriptionTypeStatus
Data type1

Any valid type keyword, such as "string", "void", "equipment", or a generic type ("aggregate", "composite"). Any unrecognized type string is returned as-is.

Example
int
Linerequired

Examples

Recognized Types

*{{User:Philmasterplus/Type|void}}
*{{User:Philmasterplus/Type|boolean}}
*{{User:Philmasterplus/Type|int}}
*{{User:Philmasterplus/Type|float}}
*{{User:Philmasterplus/Type|string}}
*{{User:Philmasterplus/Type|buffer}}
*{{User:Philmasterplus/Type|bounty}}
*{{User:Philmasterplus/Type|class}}
*{{User:Philmasterplus/Type|coinmaster}}
*{{User:Philmasterplus/Type|effect}}
*{{User:Philmasterplus/Type|element}}
*{{User:Philmasterplus/Type|familiar}}
*{{User:Philmasterplus/Type|item}}
*{{User:Philmasterplus/Type|location}}
*{{User:Philmasterplus/Type|monster}}
*{{User:Philmasterplus/Type|phylum}}
*{{User:Philmasterplus/Type|servant}}
*{{User:Philmasterplus/Type|skill}}
*{{User:Philmasterplus/Type|slot}}
*{{User:Philmasterplus/Type|stat}}
*{{User:Philmasterplus/Type|thrall}}
*{{User:Philmasterplus/Type|matcher}}
*{{User:Philmasterplus/Type|record}}
*{{User:Philmasterplus/Type|aggregate}}

Unrecognized Types

*{{User:Philmasterplus/Type|boolean [monster]}}
*{{User:Philmasterplus/Type|{{User:Philmasterplus/Type|string}} [{{User:Philmasterplus/Type|int}}, {{User:Philmasterplus/Type|item}}]}}