Difference between revisions of "Template:Infobox Element"

From The Powder Toy
Jump to: navigation, search
(Gravity and hardness)
(Ignore State, display state based on TYPE_ from properties instead)
Line 31: Line 31:
 
{{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | TYPE_ENERGY | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | TYPE_ENERGY | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | TYPE_PART | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | TYPE_PART | }}
">{{#switch: {{{state}}}
+
">{{#if: {{#pos:{{{properties|}}}|TYPE_SOLID}} | Solid | }} {{#if: {{#pos:{{{properties|}}}|TYPE_LIQUID}} | Liquid | }} {{#if: {{#pos:{{{properties|}}}|TYPE_GAS}} | Gas | }} {{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | Powder | }} {{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | Energy particle | }}</span>
  | ST_NONE = n/a
 
  | ST_SOLID = solid
 
  | ST_LIQUID = liquid
 
  | ST_GAS = gas
 
  | unknown
 
}}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | (energy particle) | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | (powder) | }}
 
</span>
 
 
| header30 = {{#if: {{{highpressuretransition|}}} {{{hightemperaturetransition|}}} {{{lowpressuretransition|}}} {{{lowtemperaturetransition|}}} | Transitions | }}
 
| header30 = {{#if: {{{highpressuretransition|}}} {{{hightemperaturetransition|}}} {{{lowpressuretransition|}}} {{{lowtemperaturetransition|}}} | Transitions | }}
 
| label31 = {{#if: {{{lowtemperaturetransition|}}} | Low temperature | }}
 
| label31 = {{#if: {{{lowtemperaturetransition|}}} | Low temperature | }}

Revision as of 22:03, 5 October 2014

Infobox for displaying various element properties.

Most of them should be passed exactly as in the source code. However, the properties parameter should be space separated (so remove the pipes). Example: TYPE_LIQUID PROP_CONDUCTS PROP_NEUTPENETRATE PROP_LIFE_DEC