Difference between revisions of "Template:LSL Const"
Jump to navigation
Jump to search
m (baka) |
(making hex generation smarter.) |
||
Line 11: | Line 11: | ||
{{#var{{#var:define}}:cvalue|{{#if:{{#var:cvalue}}|{{#var:cvalue}}|{{#if:{{#var:value}}|{{#var:value}}|{{#if:{{{hex|}}}|{{{{#if:{{{hex|}}}|LSL Hex/Parse|!}}|{{{hex|}}}}}|{{{3|}}}}}}}}}}} | {{#var{{#var:define}}:cvalue|{{#if:{{#var:cvalue}}|{{#var:cvalue}}|{{#if:{{#var:value}}|{{#var:value}}|{{#if:{{{hex|}}}|{{{{#if:{{{hex|}}}|LSL Hex/Parse|!}}|{{{hex|}}}}}|{{{3|}}}}}}}}}}} | ||
{{#var{{#var:define}}:hvalue|{{#if:{{#var:hvalue}}|{{#var:hvalue}}|{{{hex|}}}}}}} | {{#var{{#var:define}}:hvalue|{{#if:{{#var:hvalue}}|{{#var:hvalue}}|{{{hex|}}}}}}} | ||
{{#var{{#var:define}}:value|{{#if:{{#var:value}}|{{#var:value}}|{{# | {{#vardefine:c|{{#expr:({{#if:{{#var:hvalue}}|1|0}} + {{#if:{{#var:cvalue}}|1|0}}) * {{#if:{{#var:value}}|0|1}}}}}} | ||
{{#var{{#var:define}}:value|{{#if:{{#var:value}}|{{#var:value}}|{{#ifeq:{{#var:c}}|2|{{{{#ifeq:{{#var:c}}|2|LSL Hex|!}}|{{#var:hvalue}}|{{#var:cvalue}}}}|{{#if:{{#var:cvalue}}|{{#var:cvalue}}|{{#var:hvalue}}}}}}}}}} | |||
{{#var{{#var:define}}:type|{{#if:{{#var:type}}|{{#var:type}}|{{{2|}}}}}}} | {{#var{{#var:define}}:type|{{#if:{{#var:type}}|{{#var:type}}|{{{2|}}}}}}} | ||
{{#var{{#var:define}}:comment|{{#if:{{#var:comment}}|{{#var:comment}}|{{{c|}}}}}}} | {{#var{{#var:define}}:comment|{{#if:{{#var:comment}}|{{#var:comment}}|{{{c|}}}}}}} | ||
{{#vardefine:const_called|{{#expr:{{#var:const_called}} - 1}}}} | {{#vardefine:const_called|{{#expr:{{#var:const_called}} - 1}}}} | ||
}}{{HoverLink|1={{{1}}}|2={{#var:type}} {{{1}}}{{#if:{{#var:hvalue}}| {{=}} {{#var:hvalue}}}}{{#if:{{#var:cvalue}}| {{=}} {{#var:cvalue}}}};{{#if:{{#var:comment}}|//{{#var:comment}}}}|3={{#if:{{{4|}}}|{{{4|{{{1}}}}}}|{{{1}}}}}}}</includeonly><noinclude>See [[{{FULLPAGENAME}}/docs]] for documentation.</noinclude> | }}{{HoverLink|1={{{1}}}|2={{#var:type}} {{{1}}}{{#if:{{#var:hvalue}}| {{=}} {{#var:hvalue}}}}{{#if:{{#var:cvalue}}| {{=}} {{#var:cvalue}}}};{{#if:{{#var:comment}}|//{{#var:comment}}}}|3={{#if:{{{4|}}}|{{{4|{{{1}}}}}}|{{{1}}}}}}}</includeonly><noinclude>See [[{{FULLPAGENAME}}/docs]] for documentation.</noinclude> |
Revision as of 23:05, 5 June 2007
See Template:LSL Const/docs for documentation.