ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "Template:Values"

From ModEnc
Jump to: navigation, search
(Adding stringlist)
m (Formatting 'n' stuff)
Line 33: Line 33:
 
|special = Values that don't conform to any typical format (see below)
 
|special = Values that don't conform to any typical format (see below)
 
|#default = Warning - unknown value type selected! Please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] this page and fix the [[Template:Values|Values template]]!
 
|#default = Warning - unknown value type selected! Please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] this page and fix the [[Template:Values|Values template]]!
}}</includeonly><noinclude>This template generates standardized value type descriptions for a number of common types, to be used in the <code>values=</code> parameter of [[Template:Flag]]
+
}}</includeonly><noinclude>This template generates standardized value type descriptions for a number of common types, to be used in the <code>values=</code> parameter of [[Template:Flag]].
  
 
==Usage==
 
==Usage==
 
<pre>{{Values|VALUE TYPE}}</pre>
 
<pre>{{Values|VALUE TYPE}}</pre>
 +
 +
 +
 
Currently valid value types are:
 
Currently valid value types are:
*'''signed integers''' or '''integers'''
+
*<code>signed integers</code> '''or''' <code>integers</code>
*'''unsigned integers'''
+
*<code>unsigned integers</code>
*'''floats'''
+
*<code>floats</code>
*'''unsigned bytes''' or '''bytes'''
+
*<code>unsigned bytes</code> '''or''' <code>bytes</code>
*'''signed bytes'''
+
*<code>signed bytes</code>
*'''booleans'''
+
*<code>booleans</code>
*'''strings'''
+
*<code>strings</code>
*'''stringlist''' or '''listofstrings'''
+
*<code>stringlist</code> '''or''' <code>listofstrings</code>
*'''colors'''
+
*<code>colors</code>
*'''clsids''' or '''locomotors'''
+
*<code>clsids</code> '''or''' <code>locomotors</code>
*'''leptons'''
+
*<code>leptons</code>
*'''percentages'''
+
*<code>percentages</code>
*'''special'''
+
*<code>special</code>
In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to (such as valid warhead names, for example).</noinclude>
+
 
 +
 
 +
 
 +
In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to. For example:
 +
<pre>{{Values|stringlist|[[Animations]]}}</pre>
 +
yields "{{Values|stringlist|[[Animations]]}}".
 +
</noinclude>

Revision as of 07:51, 14 April 2008

This template generates standardized value type descriptions for a number of common types, to be used in the values= parameter of Template:Flag.

Usage

{{Values|VALUE TYPE}}


Currently valid value types are:

  • signed integers or integers
  • unsigned integers
  • floats
  • unsigned bytes or bytes
  • signed bytes
  • booleans
  • strings
  • stringlist or listofstrings
  • colors
  • clsids or locomotors
  • leptons
  • percentages
  • special


In the case of strings and stringlist, a second parameter can be added to note what the strings are limited to. For example:

{{Values|stringlist|[[Animations]]}}

yields "Comma-separated list of strings. (Limited to: Animations)

".