Difference between revisions of "Template:Infobox Element"

From The Powder Toy
Jump to: navigation, search
(Properties)
(Display TYPE_ properties in State row)
Line 20: Line 20:
 
}}
 
}}
 
| label13 = State
 
| label13 = State
| data13 = <span data-toggle="tooltip" data-original-title="{{{state}}}">{{#switch: {{{state}}}
+
| data13 = <span data-toggle="tooltip" data-original-title="
 +
{{{state}}}  
 +
{{#if: {{#pos:{{{properties|}}}|TYPE_LIQUID}} | TYPE_LIQUID | }}
 +
{{#if: {{#pos:{{{properties|}}}|TYPE_SOLID}} | TYPE_SOLID | }}
 +
{{#if: {{#pos:{{{properties|}}}|TYPE_GAS}} | TYPE_GAS | }}
 +
">{{#switch: {{{state}}}
 
   | ST_NONE = n/a
 
   | ST_NONE = n/a
 
   | ST_SOLID = solid
 
   | ST_SOLID = solid
Line 27: Line 32:
 
   | unknown
 
   | unknown
 
}}</span>
 
}}</span>
 +
  {{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | <span data-toggle="tooltip" data-original-title="TYPE_ENERGY">(energy particle)</span> | }}
 +
  {{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | <span data-toggle="tooltip" data-original-title="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 | }}
Line 52: Line 59:
 
     {{Material|mat={{{highpressuretransition}}}}}
 
     {{Material|mat={{{highpressuretransition}}}}}
 
   }} above {{{highpressure}}} pressure | }}
 
   }} above {{{highpressure}}} pressure | }}
| header40 = {{#if: {{{properties|}}} | Misc properties |}}
+
| header40 = {{#if: {{#pos:{{{properties|}}} | PROP_}} | Misc properties |}}
| data41 = {{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | Powder | }}
 
| data42 = {{#if: {{#pos:{{{properties|}}}|TYPE_LIQUID}} | Liquid | }}
 
| data43 = {{#if: {{#pos:{{{properties|}}}|TYPE_SOLID}} | Solid | }}
 
| data44 = {{#if: {{#pos:{{{properties|}}}|TYPE_GAS}} | Gas | }}
 
| data45 = {{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | Energy particle | }}
 
 
| data46 = {{#if: {{#pos:{{{properties|}}}|PROP_CONDUCTS}} | Conducts electricity ([[SPRK]]) | }}
 
| data46 = {{#if: {{#pos:{{{properties|}}}|PROP_CONDUCTS}} | Conducts electricity ([[SPRK]]) | }}
 
| data47 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTPENETRATE}} | Mangled by neutrons | }}
 
| data47 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTPENETRATE}} | Mangled by neutrons | }}

Revision as of 16:53, 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