Difference between revisions of "Template:SimpleItembox"

From Space Engineers Wiki
Jump to: navigation, search
m (Clearfix)
m (Moved documentation to subpage)
Line 1: Line 1:
{{Under Construction}}
 
 
Display the info box "Itembox" of an item from a different page.
 
 
<pre>Usage: {{SimpleItembox|ItemStatPage|Label|Language code}}
 
 
ItemStatPage - The page holding the block/item's stats.
 
Label - The (translated) header text.
 
Language code - Optional. Language to use in the itembox.</pre>
 
Example usage:
 
 
<code><nowiki>{{SimpleItembox|SmallHydrogenTankSmall|Small Hydrogen Tank}}</nowiki></code> for the Small small-block hydrogen tank in english.
 
{{SimpleItembox|SmallHydrogenTankSmall|Small Hydrogen Tank}}
 
 
<code><nowiki>{{SimpleItembox|SmallHydrogenTankSmall|Liten Vätgastank|sv}}</nowiki></code> for the same block in Swedish.
 
{{SimpleItembox|SmallHydrogenTankSmall|Liten Vätgastank|sv}}
 
 
----
 
 
<onlyinclude><!--
 
<onlyinclude><!--
--><div style="position:relative; width:350px; float:right; border:1px solid black; clear: both;"><!-- The Main box
+
MAIN BOX START
   --><div style="background:#486d82; background:#486d82; padding:0.25em; display: flex; flex-direction: row;"><!-- Header Start
+
--><div style="background:#b2d5e8; margin:0.25em; position:relative; width:350px; float:right; border:1px solid black; clear: both;"><!--
    --><div style="flex-grow: 0;"><!--
+
HEADER START
      -->[[File:{{#show: {{{1|SmallHydrogenTankSmall}}}|?Icon#-}}|48px]]<!--
+
   --><div style="background:#486d82; padding:0.25em; color:white; text-shadow:0px 0px 0.40em rgba(0,0,0,1);font-family:Arial;><!--
    --></div><!--
+
BLOCK HEADER START
    --><div style="color:white; font-size:2em; text-shadow:0px 0px 0.40em rgba(0,0,0,1); font-family:Arial; height:auto; flex-grow:1; text-align:center"><!--
+
    --><div style="display: flex; flex-direction: row;"><!--
      -->{{{2}}}<!--
+
      --><div style="flex-grow: 0;"><!--
    --></div><!--
+
        -->[[File:{{#if:{{{1|}}}|{{#show: {{{1}}}|?Icon#-}}|Icon Template.png}}|48px]]<!--
    --><div style="flex-grow: 0;"><!--
+
      --></div><!--
      -->[[File: {{#switch: {{#show:{{{1|SmallHydrogenTankSmall}}}|?SimpleItemboxType#-}}
+
      --><div style="font-size:2em; flex-grow:1; text-align:center"><!--
           | Block = {{#ifeq: {{#show:{{{1|SmallHydrogenTankSmall}}}|?CubeSize}} | Large | Large Ship Icon.png | Small Ship Icon.png}}
+
        -->{{{2}}}<!--
 +
      --></div><!--
 +
      --><div style="flex-grow: 0;"><!--
 +
        -->[[File: {{#switch: {{#if:{{{1|}}} | {{#show:{{{1}}}|?SimpleItemboxType#-}}}}
 +
           | Block = {{#ifeq: {{#show:{{{1}}}|?CubeSize}} | Large | Large Ship Icon.png | Small Ship Icon.png}}
 
           | Component = Component Icon.png
 
           | Component = Component Icon.png
 
           | Tool = Tool Icon.png
 
           | Tool = Tool Icon.png
Line 34: Line 20:
 
           | Ore = Raw Icon.png
 
           | Ore = Raw Icon.png
 
           | #default = Icon Template.png}}|48px]]<!--
 
           | #default = Icon Template.png}}|48px]]<!--
 +
      --></div><!--
 
     --></div><!--
 
     --></div><!--
 +
BLOCK HEADER END
 +
COMPONENTS HEADER START
 +
    -->{{#if: {{#show: {{{1|SmallHydrogenTankSmall}}}|?Component1}}|<!--
 +
    --><div style="font-size:1.2em"><!--
 +
      --><hr style="height: 3px; background-color: #659bb7"/>&nbsp;<!--
 +
      --><span style="float: left;">{{Componentbox/Components{{lang}}}}</span><!--
 +
      --><span style="float: right">{{Componentbox/Required{{lang}}}}</span><!--
 +
    --></div>}}<!--
 +
COMPONENTS HEADER END
 
   --></div><!-- Header End
 
   --></div><!-- Header End
   --><div><!-- Component box
+
HEADER END
  -->test<!--
+
   --><div style="display: flex; flex-direction:column"><!--
 +
COMPONENTS START
 +
    -->{{#show: {{{1|SmallHydrogenTankSmall}}}|?Component1}}<!--
 +
    -->{{#show: {{{1|SmallHydrogenTankSmall}}}|?Component2}}<!--
 +
    -->{{#show: {{{1|SmallHydrogenTankSmall}}}|?Component3}}<!--
 
   --></div><!--
 
   --></div><!--
--></div></onlyinclude>
+
COMPONENTS END
 +
--></div><!--
 +
MAIN BOX END
 +
--></onlyinclude>{{{{FULLPAGENAME}}/doc}}

Revision as of 16:43, 31 March 2020

Icon Template.png
{{{2}}}
Icon Template.png
Displays an info box for a specific item.
Old Usage: 
{{SimpleItembox|Page|Prop1|Unit1|Prop2|Unit2|...}}

New Usage: 
{{SimpleItembox|Page|Prop1<#Unit1>|Prop2<#Unit2>|...}}

Page - The page holding the object's stats.
Prop1 - The first property to display.
Unit1 - The unit to display the first property in.
Prop2 - The second property to display.
Unit2 - The unit to display the second property in.
etc...

Examples:

{{SimpleItembox
|Mod:Vanilla/Ore/Uranium
|Mass||Volume#L|RefineTime|RefineAmount|MinimalPricePerUnit
}}
Uranium Ore Icon.png
Raw Material
Uranium Ore
Raw Icon.png
Mass1 kg
1,000 g
1,000,000 mg
1.0e-3 t
Volume0.37 L
3.7e-4 m³
2.368e-5 Large-Blocks
0.00296 Small-Blocks
0.037 hL
370 mL
Refine Time4 s
Refined Mass0.01 kg
10 g
10,000 mg
Minimum Price500 SC
BrowseLast edit: 2020-04-24
{{SimpleItembox
|Mod:Vanilla/Ingot/Iron
|Mass|Volume#L|BaseProductionTimeInSeconds
}}
Iron Ingot Icon.png
Material
Iron Ingot
Material Icon.png

ComponentsRequired

Mass1 kg
1,000 g
1,000,000 mg
1.0e-3 t
Volume0.127 L
1.27e-4 m³
8.128e-6 Large-Blocks
0.00102 Small-Blocks
0.0127 hL
127 mL
Base Production Time0.05 s
BrowseLast edit: 2020-05-18
{{SimpleItembox
|Mod:Vanilla/Component/SteelPlate
|Mass|Health|MaxIntegrity|Volume|BaseProductionTimeInSeconds
}}
Steel Plate Icon.png
Component
Steel Plate
Component Icon.png

ComponentsRequired

Mass20 kg
20,000 g
20,000,000 mg
0.02 t
Health53
Integrity100
Volume0.003 m³
3 L
1.92e-4 Large-Blocks
0.024 Small-Blocks
0.3 hL
3,000 mL
Base Production Time1 s
BrowseLast edit: 2021-02-04
{{SimpleItembox
|Mod:Vanilla/CubeBlock/SmallHydrogenTankSmall
|Size|Volume#{{m3}}|Mass#g|Integrity|BuildTimeSeconds|OperationalPowerConsumption|StandbyPowerConsumption|GasCapacity|IsAirTight|InventoryVolume#L|ResourceSinkGroup|PCU
}}
Small Hydrogen Tank Icon.png
Small Ship
Small Hydrogen Tank
Small Ship Icon.png

ComponentsRequired

 Functional 

 Hack 

Dimensions (W,H,L)2,2,1
Volume0.5 m³
500 L
0.032 Large-Blocks
4 Small-Blocks
50 hL
500,000 mL
Mass109,800 g
109.8 kg
109,800,000 mg
0.11 t
Integrity454
Build time12 s
Power Consumption200 W
0.2 kW
2.0e-4 MW
Idle Power Consumption0.2 W
2.0e-4 kW
2.0e-7 MW
Gas Capacity15,000 L
1,500 hL
15 m³
Is AirtightYes
Inventory Volume120 L
0.12 m³
12 hL
Power Consumer GroupFactory
PCU Cost25
BrowseLast edit: 2020-11-25