Difference between revisions of "Template:Infobox Element"

From The Powder Toy
Jump to: navigation, search
(Display TYPE_ properties in State row)
(Gravity and hardness)
Line 2: Line 2:
 
| name = Element
 
| name = Element
 
| title = [[File:{{{icon}}}]] {{{longname}}}
 
| title = [[File:{{{icon}}}]] {{{longname}}}
| image = {{{image}}}
+
| image = {{{image|}}}
| caption = {{{description}}}
+
| caption = {{{description|}}}
 
| header1 = Properties
 
| header1 = Properties
| label7 = Spawn temperature
+
| label2 = Spawn temperature
| data7 = {{Temperature|t={{{temperature}}}}}
+
| data2 = {{Temperature|t={{{temperature}}}}}
| label8 = [[Heat Conductivity]]
+
| label3 = [[Heat Conductivity]]
| data8 = <span data-toggle="tooltip" data-original-title="Raw value: {{{heatconduct}}}">{{#ifexpr: {{{heatconduct}}} > 250 | 100% | {{#expr:{{{heatconduct}}}*100/250 round 1}}% }}</span> of maximum
+
| data3 = <span data-toggle="tooltip" data-original-title="Raw value: {{{heatconduct}}}">{{#ifexpr: {{{heatconduct}}} > 250 | 100% | {{#expr:{{{heatconduct}}}*100/250 round 1}}% }}</span>
 +
| label4 = Relative [[weight]]
 +
| data4 = {{{weight}}}
 +
| label5 = [[Gravity]]
 +
| data5 = {{{gravity}}}
 +
| label6 = Acid dissolve rate
 +
| data6 = {{#ifexpr: {{{hardness}}} > 1000 | 100% | {{#expr:{{{hardness}}}*100/1000 round 1}}% }}
 
| label10 = [[Flammability]]
 
| label10 = [[Flammability]]
 
| data10 = {{{flammable}}}
 
| data10 = {{{flammable}}}
| label11 = Relative [[weight]]
 
| data11 = {{{weight}}}
 
 
| label12 = {{#ifexpr: {{{explosive}}} > 0 | Explosive | }}
 
| label12 = {{#ifexpr: {{{explosive}}} > 0 | Explosive | }}
 
| data12 = {{#switch: {{{explosive}}
 
| data12 = {{#switch: {{{explosive}}
Line 25: Line 29:
 
{{#if: {{#pos:{{{properties|}}}|TYPE_SOLID}} | TYPE_SOLID | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_SOLID}} | TYPE_SOLID | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_GAS}} | TYPE_GAS | }}
 
{{#if: {{#pos:{{{properties|}}}|TYPE_GAS}} | TYPE_GAS | }}
 +
{{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | TYPE_ENERGY | }}
 +
{{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | TYPE_PART | }}
 
">{{#switch: {{{state}}}
 
">{{#switch: {{{state}}}
 
   | ST_NONE = n/a
 
   | ST_NONE = n/a
Line 31: Line 37:
 
   | ST_GAS = gas
 
   | ST_GAS = gas
 
   | unknown
 
   | unknown
}}</span>
+
}}
  {{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | <span data-toggle="tooltip" data-original-title="TYPE_ENERGY">(energy particle)</span> | }}
+
{{#if: {{#pos:{{{properties|}}}|TYPE_ENERGY}} | (energy particle) | }}
  {{#if: {{#pos:{{{properties|}}}|TYPE_PART}} | <span data-toggle="tooltip" data-original-title="TYPE_PART">(powder)</span> | }}
+
{{#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 21:06, 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