Difference between revisions of "User:Alistaire/Template:DefsStdContentSwitch/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(→‎Accepted values: Added defName)
 
(3 intermediate revisions by one other user not shown)
Line 10: Line 10:
 
| default || ''(optional):'' The default value for this datatype in this element, (default: {{{default}}}).
 
| default || ''(optional):'' The default value for this datatype in this element, (default: {{{default}}}).
 
|-
 
|-
| range || ''(optional):'' The range for this datatype in this element, ({{{range}}}).
+
| info || ''(optional):'' Extra info for this datatype in this element, ({{{info}}}).
 +
|-
 +
|}<br/><br/>
 +
 
 +
==Examples==
 +
 
 +
{|
 +
! Input !! Output
 +
|-
 +
| <pre>{{User:Alistaire/Template:DefsStdContentSwitch|string}}</pre>
 +
| {{User:Alistaire/Template:DefsStdContentSwitch|string}}
 +
|-
 +
| <pre>{{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}}</pre>
 +
| {{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}}
 +
|-
 +
| <pre>{{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}}</pre>
 +
| {{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}}
 
|-
 
|-
 
|}<br/><br/>
 
|}<br/><br/>
Line 19: Line 35:
 
! Value || Output
 
! Value || Output
 
|-
 
|-
|anyuri || xs:anyURI
+
|anyuri || {{User:Alistaire/Template:DefsStdContentSwitch|anyuri}}
|-
 
|bool<br/>boolean || xs:boolean
 
 
|-
 
|-
|dec<br/>decimal || xs:decimal
+
|bool<br/>boolean || {{User:Alistaire/Template:DefsStdContentSwitch|bool}}
 
|-
 
|-
|defName || [[defName]]
+
|dec<br/>decimal || {{User:Alistaire/Template:DefsStdContentSwitch|dec}}
 
|-
 
|-
|double || xs:double
+
|defName || <nowiki>{{User:Alistaire/Template:DefsStdContentSwitch|defName}}</nowiki>
 
|-
 
|-
|float || xs:float
+
|double || {{User:Alistaire/Template:DefsStdContentSwitch|double}}
 
|-
 
|-
|int || xs:int
+
|float || {{User:Alistaire/Template:DefsStdContentSwitch|float}}
 
|-
 
|-
|integer || xs:integer
+
|int<br/>integer || {{User:Alistaire/Template:DefsStdContentSwitch|int}}
 
|-
 
|-
|name || xs:Name
+
|li || {{User:Alistaire/Template:DefsStdContentSwitch|li}}
 
|-
 
|-
|normstr<br/>normstring<br/>normalizedstring || xs:normalizedString
+
|name || {{User:Alistaire/Template:DefsStdContentSwitch|name}}
 
|-
 
|-
|rgb || rgb
+
|normstr<br/>normstring<br/>normalizedstring || {{User:Alistaire/Template:DefsStdContentSwitch|normstr}}
 
|-
 
|-
|str<br/>string || xs:string
+
|rgb || {{User:Alistaire/Template:DefsStdContentSwitch|rgb}}
 
|-
 
|-
|stringnorm || xs:normalizedString
+
|str<br/>string || {{User:Alistaire/Template:DefsStdContentSwitch|str}}
 
|-
 
|-
|src<br/>uri || xs:anyURI
+
|src<br/>uri || {{User:Alistaire/Template:DefsStdContentSwitch|uri}}
 
|-
 
|-
|vector2 || vector2
+
|vector2 || {{User:Alistaire/Template:DefsStdContentSwitch|vector2}}
 
|-
 
|-
|vector3 || vector3
+
|vector3 || {{User:Alistaire/Template:DefsStdContentSwitch|vector3}}
 
|-
 
|-
 
|}
 
|}

Latest revision as of 23:51, 4 April 2023

Example documentation

Parameters[edit]

Parameter Explanation
1 (required): The datatype, check "Accepted values".
default (optional): The default value for this datatype in this element, (default: {{{default}}}).
info (optional): Extra info for this datatype in this element, ({{{info}}}).



Examples[edit]

Input Output
{{User:Alistaire/Template:DefsStdContentSwitch|string}}
string
{{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}}
boolean (default: true)
{{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}}
int (default: 1) (0-100)



Accepted values[edit]

Value Output
anyuri anyURI
bool
boolean
boolean
dec
decimal
decimal
defName {{User:Alistaire/Template:DefsStdContentSwitch|defName}}
double double
float float
int
integer
int
li list item
name Name
normstr
normstring
normalizedstring
normalizedString
rgb rgbColour
str
string
string
src
uri
anyURI
vector2 vector2
vector3 vector3