Difference between revisions of "Template:LSL Const"
Jump to navigation
Jump to search
m (Extra carriage return in the template) |
m (Documentation) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 9: | Line 9: | ||
||{{{{FULLPAGENAME}}|name|type|value|hex=hex|c=comment}} | ||{{{{FULLPAGENAME}}|name|type|value|hex=hex|c=comment}} | ||
|<pre>{{LSL Const|name|type|value|hex=hex|c=comment}}</pre> | |<pre>{{LSL Const|name|type|value|hex=hex|c=comment}}</pre> | ||
|- | |||
||{{{{FULLPAGENAME}}|name|type|value|hex=hex|c=comment|nolink=*}} | |||
|<pre>{{LSL Const|name|type|value|hex=hex|c=comment|nolink=*}}</pre> | |||
|-{{Hl2}} | |-{{Hl2}} | ||
! | !Parameters | ||
!Description | |||
|- | |||
|1 | |||
|link target (if 4 is not supplied, this value is used as the name as well) | |||
|- | |||
|2 | |||
|type | |||
|- | |||
|3 | |||
|value | |||
|- | |||
|4 | |||
|name (if excluded the value for 1 is used instead) | |||
|- | |||
|hex | |||
|hex string | |||
|- | |||
|c | |||
|comment | |||
|- | |||
|ihex | |||
|used as the value instead of 3 and used to build 'hex' if it is not supplied | |||
|-{{Hl2}} | |||
!<nowiki>{{#var:</nowiki>''variable-name''<nowiki>}}</nowiki> | |||
!Values | !Values | ||
|- | |||
|cname | |||
|{{#var:cname}} | |||
|- | |||
|type | |||
|{{#var:type}} | |||
|- | |- | ||
|value | |value | ||
Line 21: | Line 54: | ||
|hvalue | |hvalue | ||
|{{#var:hvalue}} | |{{#var:hvalue}} | ||
|- | |- | ||
|comment | |comment | ||
Line 30: | Line 60: | ||
</noinclude><includeonly>{{#if: | </noinclude><includeonly>{{#if: | ||
{{#vardefine:hvalue|{{{hex|}}}}} | {{#vardefine:hvalue|{{{hex|}}}}} | ||
{{#vardefine:cvalue|{{{3|}}}}} | {{#vardefine:cvalue|{{#if:{{{ihex|}}}|{{{ihex|}}}|{{{3|}}}}}}} | ||
{{#vardefine:value|{{#if:{{#var:hvalue}} | {{#vardefine:value|{{#if:{{#var:hvalue}}{{{ihex|}}}|{{LSL Hex|{{#var:hvalue}}|{{#var:cvalue}}}}|{{#var:cvalue}}}}}} | ||
{{#vardefine:comment|{{{c|}}}}} | {{#vardefine:comment|{{{c|}}}}} | ||
{{#vardefine:type|{{{2|}}}}} | {{#vardefine:type|{{{2|}}}}} | ||
}}{{HoverLink|1={{{1}}}|2={{{2|}}} {{ | {{#vardefine:cname|{{#if:{{{4|}}}|{{{4|{{{1}}}}}}|{{{1}}}}}}} | ||
}}{{{{#if:{{{nolink|}}}|HoverText|HoverLink}}|1={{{1}}}|2={{{2|}}} {{#var:cname}}{{#if:{{#var:hvalue}}| = {{#var:hvalue}}}}{{#if:{{#var:cvalue}}| = {{#var:cvalue}}}};{{#if:{{{c|}}}| //{{{c|}}}}}|3={{#var:cname}}}}</includeonly> |
Latest revision as of 14:02, 12 September 2013
See Template:LSL Const/docs for documentation.
Example | Raw Text |
---|---|
name | {{LSL Const|name|type|value|hex=hex|c=comment}} |
name | {{LSL Const|name|type|value|hex=hex|c=comment|nolink=*}} |
Parameters | Description |
1 | link target (if 4 is not supplied, this value is used as the name as well) |
2 | type |
3 | value |
4 | name (if excluded the value for 1 is used instead) |
hex | hex string |
c | comment |
ihex | used as the value instead of 3 and used to build 'hex' if it is not supplied |
{{#var:variable-name}} | Values |
cname | name |
type | type |
value | hex |
cvalue | value |
hvalue | hex |
comment | comment |