Template:LuaConstant: Difference between revisions
From Spring
Jump to navigationJump to search
Created page with "<includeonly>{{var|1= {{#ifeq: {{{type}}} | bool | {{type|bool}} | }} {{#ifeq: {{{type}}} | number | {{type|number}} | }} {{#ifeq: {{{type}}} | string | {{type|string}} | }} }..." |
m Added color and table as possible types. |
||
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
{{#ifeq: {{{type}}} | number | {{type|number}} | }} | {{#ifeq: {{{type}}} | number | {{type|number}} | }} | ||
{{#ifeq: {{{type}}} | string | {{type|string}} | }} | {{#ifeq: {{{type}}} | string | {{type|string}} | }} | ||
{{#ifeq: {{{type}}} | color | {{type|color}} | }} | |||
{{#ifeq: {{{type}}} | table | {{type|table}} | }} | |||
}} | }} | ||
{{name|{{anchor|{{{name}}}}}[[#{{{name}}}|{{{name}}}]]}}</includeonly><noinclude> | {{name|{{anchor|{{{name}}}}}[[#{{{name}}}|{{{name}}}]]}} | ||
:{{#if: {{{info|}}} | {{{info}}} | }}</includeonly><noinclude> | |||
==Lua Constant usage example== | ==Lua Constant usage example== | ||
This template creates an anchored entry meant for a Lua constant. Type can be bool, number or | This template creates an anchored entry meant for a Lua constant. Type can be bool, number, string, color or table. | ||
<pre> | <pre> | ||
{{LuaConstant | {{LuaConstant | ||
|type = number | |type = number | ||
|name = ThisIsANumber}}</pre> | |name = ThisIsANumber | ||
|info = This is a description.}}</pre> | |||
{{LuaConstant | {{LuaConstant | ||
|type = number | |type = number | ||
|name = ThisIsANumber}}</noinclude> | |name = ThisIsANumber | ||
|info = This is a description.}}</noinclude> | |||
Latest revision as of 22:22, 28 February 2021
Lua Constant usage example
This template creates an anchored entry meant for a Lua constant. Type can be bool, number, string, color or table.
{{LuaConstant
|type = number
|name = ThisIsANumber
|info = This is a description.}}
number ThisIsANumber
- This is a description.