Difference between revisions of "Template:SetProp/doc"
From Salem Wiki
m (→Supported propname's: update) |
m (IsLiftable not set always, to accommodate flexible use. Technology pages would not need this fe.) |
||
Line 3: | Line 3: | ||
:It has a ''fixed-set'' of properties it supports, and can be expanded when needed in code... | :It has a ''fixed-set'' of properties it supports, and can be expanded when needed in code... | ||
:Some properties are fit to assign multiple values to, using a '''sep''', but those of type [[Special:Types/Boolean|Boolean]] are obviously not... | :Some properties are fit to assign multiple values to, using a '''sep''', but those of type [[Special:Types/Boolean|Boolean]] are obviously not... | ||
− | |||
− | |||
==Syntax== | ==Syntax== | ||
:Type the below code somewhere on a page: | :Type the below code somewhere on a page: | ||
Line 33: | Line 31: | ||
**:Only supply the filename, it will automatically prepend the final property-value with <code><nowiki>Image:</nowiki></code> | **:Only supply the filename, it will automatically prepend the final property-value with <code><nowiki>Image:</nowiki></code> | ||
**[[Property:IsLiftable|IsLiftable]] (Boolean) | **[[Property:IsLiftable|IsLiftable]] (Boolean) | ||
− | |||
− | |||
**[[Property:IsLiftableWhenEmpty|IsLiftableWhenEmpty]] (Boolean) | **[[Property:IsLiftableWhenEmpty|IsLiftableWhenEmpty]] (Boolean) | ||
**:<u>When used</u> will '''always''' be set to 'true', and auto-set [[Property:IsLiftable|IsLiftable]]='true'. | **:<u>When used</u> will '''always''' be set to 'true', and auto-set [[Property:IsLiftable|IsLiftable]]='true'. |
Revision as of 08:08, 29 June 2012
Description
- This is a wrapper-template that calls {{SetProp/single}} to automatically set property values.
- It has a fixed-set of properties it supports, and can be expanded when needed in code...
- Some properties are fit to assign multiple values to, using a sep, but those of type Boolean are obviously not...
Syntax
- Type the below code somewhere on a page:
{{SetProp |propname=propvalues |propname=propvalues |... }}
- It supports this optional named-parameter:
- sep
- The default separator used in the propvalues to separate single-values from each other.
- It defaults to a comma ','
- sep
Supported propname's
- It currently supports these multi-value properties:
- IsinGameMenu
- Default separator in this case is a ^ when no over-ride is used in sep, be careful this property can use a comma in its valid value!
- RequiresTech
- RequiresObj
- RepairedWith
- IsinGameMenu
- It currently supports these single-value properties:
- IsGameMenu (Boolean)
- Will always be set.
- Defaults to 'false'.
- Has icon (Page)
- Only supply the filename, it will automatically prepend the final property-value with
Image:
- When not used, it will auto-set this property to
Image:{{SUBPAGENAME}} icon.png
- Only supply the filename, it will automatically prepend the final property-value with
- Has fullview (Page)
- Only supply the filename, it will automatically prepend the final property-value with
Image:
- Only supply the filename, it will automatically prepend the final property-value with
- IsLiftable (Boolean)
- IsLiftableWhenEmpty (Boolean)
- When used will always be set to 'true', and auto-set IsLiftable='true'.
- HP (Number)
- Soak (Number)
- IsGameMenu (Boolean)
Examples
See the example(s) in the documentation of {{SetProp/single}}, this template just passes known properties with their values to it.