Difference between revisions of "Template:Infobox Element"

From The Powder Toy
Jump to: navigation, search
m (Fix SPRK link)
(Add menu section, and apply categories according to menu section)
Line 5: Line 5:
 
| caption = {{{description|}}}
 
| caption = {{{description|}}}
 
| header1 = Properties
 
| header1 = Properties
| label2 = Spawn temperature
+
| label2 = Section
| data2 = {{Temperature|t={{{temperature}}}}}
+
| data2 = <span data-toggle="tooltip" data-original-title="{{{menusection}}}">{{#switch: {{{menusection|}}}
| label3 = [[Heat Conductivity]]
+
  | SC_WALL = Walls [[Category:Walls]]
| data3 = <span data-toggle="tooltip" data-original-title="Raw value: {{{heatconduct}}}">{{#ifexpr: {{{heatconduct}}} > 250 | 100% | {{#expr:{{{heatconduct}}}*100/250 round 1}}% }}</span>
+
  | SC_ELEC = Electronics [[Category:Electronics]]
| label4 = Relative [[weight]]
+
  | SC_POWERED => Powered Materials [[Category:Powered Materials]]
| data4 = {{{weight}}}
+
  | SC_SENSOR => Sensors [[Category:Sensors]]
| label5 = [[Gravity]]
+
  | SC_FORCE => Force Elements [[Category:Force]]
| data5 = {{{gravity}}}
+
  | SC_EXPLOSIVE = Explosives [[Category:Explosives]]
| label6 = Acid dissolve rate
+
  | SC_GAS = Gases [[Category:Gases]]
| data6 = {{#ifexpr: {{{hardness}}} > 1000 | 100% | {{#expr:{{{hardness}}}*100/1000 round 1}}% }}
+
  | SC_LIQUID = Liquids [[Category:Liquids]]
 +
  | SC_POWDERS = Powders [[Category:Powders]]
 +
  | SC_SOLIDS = Solids [[Category:Solids]]
 +
  | SC_NUCLEAR = Radioactive [[Category:Radioactive]]
 +
  | SC_SPECIAL = Special [[Category:Special]]
 +
  | SC_LIFE = Game Of Life [[Category:Life]]
 +
  | SC_TOOL = Tools [[Category:Tools]]
 +
  | SC_DECO = Decoration tools [[Category:Tools]]
 +
  | SC_CRACKER = Shenanigans
 +
  | SC_CRACKER2 = Shenanigans
 +
  | unknown
 +
}}{{#ifexpr: {{{menuvisible}}} = 0 | (hidden) | }}</span>
 +
| label4 = Spawn temperature
 +
| data4 = {{Temperature|t={{{temperature}}}}}
 +
| label5 = [[Heat Conductivity]]
 +
| data5 = <span data-toggle="tooltip" data-original-title="Raw value: {{{heatconduct}}}">{{#ifexpr: {{{heatconduct}}} > 250 | 100% | {{#expr:{{{heatconduct}}}*100/250 round 1}}% }}</span>
 +
| label6 = Relative [[weight]]
 +
| data6 = {{{weight}}}
 +
| label7 = [[Gravity]]
 +
| data7 = {{{gravity}}}
 +
| label8 = Acid dissolve rate
 +
| data8 = {{#ifexpr: {{{hardness}}} > 1000 | 100% | {{#expr:{{{hardness}}}*100/1000 round 1}}% }}
 
| label10 = [[Flammability]]
 
| label10 = [[Flammability]]
 
| data10 = {{{flammable}}}
 
| data10 = {{{flammable}}}
Line 58: Line 79:
 
   }} above {{{highpressure}}} pressure | }}
 
   }} above {{{highpressure}}} pressure | }}
 
| header40 = {{#if: {{#pos:{{{properties|}}} | PROP_}} | Misc properties |}}
 
| header40 = {{#if: {{#pos:{{{properties|}}} | PROP_}} | Misc properties |}}
| data46 = {{#if: {{#pos:{{{properties|}}}|PROP_CONDUCTS}} | Conducts electricity ([[Element:SPRK|SPRK]]) | }}
+
| data46 = {{#if: {{#pos:{{{properties|}}}|PROP_CONDUCTS}} | Conducts electricity ([[Element:SPRK|SPRK]]) [[Category:Conductive]] | }}
 
| data47 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTPENETRATE}} | Mangled by neutrons | }}
 
| data47 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTPENETRATE}} | Mangled by neutrons | }}
 
| data48 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTABSORB}} | Absorbs neutrons | }}
 
| data48 = {{#if: {{#pos:{{{properties|}}}|PROP_NEUTABSORB}} | Absorbs neutrons | }}
Line 65: Line 86:
 
| data51 = {{#if: {{#pos:{{{properties|}}}|PROP_RADIOACTIVE}} | Radioactive, harmful to [[STKM]] | }}
 
| data51 = {{#if: {{#pos:{{{properties|}}}|PROP_RADIOACTIVE}} | Radioactive, harmful to [[STKM]] | }}
 
}}
 
}}
 +
[[Category:Elements]]
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
Infobox for displaying various element properties.
 
Infobox for displaying various element properties.

Revision as of 12:58, 6 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