Difference between revisions of "Template:SimpleItembox"

From Space Engineers Wiki
Jump to: navigation, search
m (Fixed?)
(Removed Mod:Vanilla/ page requirement, enabled custom displayparameters in template call)
Line 1: Line 1:
<includeonly><div style="background:#b2d5e8; margin:0.25em; position:relative; width:350px; float:right; clear: both;"><!--
+
<includeonly>{{#if:{{{1|}}}||'''SimpleItembox Error:''' Missing ''Page'' parameter!}}<!--
 +
--><div style="background:#b2d5e8; margin:0.25em; position:relative; width:350px; float:right; clear: both;"><!--
 
HEADER
 
HEADER
   --><div style="background:#486d82; padding:0.25em; color:white; text-shadow:0px 0px 0.40em rgba(0,0,0,1);font-family:Arial;><!--
+
   --><div style="background:#486d82; padding:0.25em; color:white; text-shadow:0px 0px 0.40em black;font-family:Arial;><!--
 
BLOCK HEADER
 
BLOCK HEADER
 
     --><div style="display: flex; flex-direction: row; justify-content: space-between; text-align: center; margin-bottom: 0.25em; overflow-wrap: anywhere"><!--
 
     --><div style="display: flex; flex-direction: row; justify-content: space-between; text-align: center; margin-bottom: 0.25em; overflow-wrap: anywhere"><!--
       -->[[File:{{#if:{{{1}}}|{{#show: Mod:Vanilla/{{{1}}}|?Icon#-}}|Icon Template.png}}|48px]]<!--
+
       -->[[File:{{#show:{{{1}}}|?Icon#-|default=Icon Template.png}}|48px]]<!--
 
       --><div><!--
 
       --><div><!--
 
         --><span style="font-size:0.75em"><!--
 
         --><span style="font-size:0.75em"><!--
           -->{{Componentbox/{{#switch: {{#show:Mod:Vanilla/{{{1}}}|?TypeId#-}}
+
           -->{{Componentbox/{{#switch: {{#show:{{{1}}}|?TypeId#-}}
                            | Component = Component
+
            | Component = Component
                            | Tool = Tool
+
            | Tool = Tool
                            | Ore = Raw Material
+
            | Ore = Raw Material
                            | Ingot = Material
+
            | Ingot = Material
                            | #default = {{#switch: {{#show:Mod:Vanilla/{{{1}}}|?CubeSize#-}}
+
            | #default = {{#switch: {{#show:{{{1}}}|?CubeSize#-}}
                                        | Large=Large Ship / Station
+
              | Large=Large Ship / Station
                                        | Small=Small Ship
+
              | Small=Small Ship
                                        | #default=Undefined
+
              | #default=Undefined
                                        }}
+
            }}}}{{lang}}}}<!--
                            }}{{lang}}
 
            }}<!--
 
 
         --></span><br/><!--
 
         --></span><br/><!--
         -->[[Mod:Vanilla/{{{1}}}|<span style="color:white; font-size:2em; line-height:normal"><!--
+
         --><span style="font-size:2em; line-height:normal">{{{2|Empty Label Parameter!}}}</span><!--
          -->{{#if:{{lang}}|{{Mod:Vanilla/{{{1}}}{{lang}}}}|{{#show:Mod:Vanilla/{{{1}}}|?Translation}}}}<!--
 
        --></span>]]<!--
 
 
       --></div><!--
 
       --></div><!--
       -->[[File: {{#switch: {{#if:{{{1|}}}|{{#show:Mod:Vanilla/{{{1}}}|?TypeId#-}}}}
+
       -->[[File: {{#switch: {{#show:{{{1}}}|?TypeId#-}}
 
         | Component = Component Icon.png
 
         | Component = Component Icon.png
 
         | Tool = Tool Icon.png
 
         | Tool = Tool Icon.png
 
         | Ingot = Material Icon.png
 
         | Ingot = Material Icon.png
 
         | Ore = Raw Icon.png
 
         | Ore = Raw Icon.png
         | #default = {{#switch: {{#show:Mod:Vanilla/{{{1}}}|?CubeSize#-}}
+
         | #default = {{#switch: {{#show:{{{1}}}|?CubeSize#-}}
                      | Large=Large Ship Icon.png
+
          | Large=Large Ship Icon.png
                      | Small=Small Ship Icon.png
+
          | Small=Small Ship Icon.png
                      | #default=Icon Template.png
+
          | #default=Icon Template.png
                      }}
+
        }}}}|48px]]<!--
        }}|48px]]<!--
 
 
     --></div><!--
 
     --></div><!--
 
BLOCK HEADER END
 
BLOCK HEADER END
 
COMPONENTS HEADER
 
COMPONENTS HEADER
     -->{{#if: {{#show: Mod:Vanilla/{{{1}}}|?Component1}}|<!--
+
     -->{{#if: {{#show: {{{1}}}|?Component1#-}}|<!--
    --><hr style="height: 3px; background-color: #659bb7"/><!--
+
      --><hr style="height: 3px; background-color: #659bb7"/><!--
    --><div style="font-size:1.2em; display: flex; justify-content: space-between;"><!--
+
      --><div style="font-size:1.2em; display: flex; justify-content: space-between;"><!--
      --><span>{{Componentbox/Components{{lang}}}}</span><!--
+
        --><span>{{Componentbox/Components{{lang}}}}</span><!--
      --><span>{{Componentbox/Required{{lang}}}}</span><!--
+
        --><span>{{Componentbox/Required{{lang}}}}</span><!--
    --></div>}}<!--
+
      --></div><!--
 +
    -->}}<!--
 
COMPONENTS HEADER END
 
COMPONENTS HEADER END
 
   --></div><!--
 
   --></div><!--
 
HEADER END
 
HEADER END
 
COMPONENTS START
 
COMPONENTS START
   -->{{#if: {{#show: Mod:Vanilla/{{{1}}}|?Component1}}|<!--
+
   -->{{#if: {{#show: {{{1}}}|?Component1}}|<!--
 
   --><div style="display: flex; flex-direction: column; margin: 0.25em;"><!--
 
   --><div style="display: flex; flex-direction: column; margin: 0.25em;"><!--
 
FUNCTIONAL LINE
 
FUNCTIONAL LINE
     -->{{#if: {{#show: Mod:Vanilla/{{{1}}}|?CriticalComponent#-}}|<!--
+
     -->{{#if: {{#show: {{{1}}}|?CriticalComponent#-}}|<!--
       --><div style="order:{{#show: Mod:Vanilla/{{{1}}}|?CriticalComponent#-}}; display: flex; align-items: center; max-height: 2px"><!--
+
       --><div style="order:{{#show: {{{1}}}|?CriticalComponent#-}}; display: flex; align-items: center; max-height: 2px"><!--
 
         --><hr style="height: 2px; background-color: #9c0c0c; flex-grow: 1"/><!--
 
         --><hr style="height: 2px; background-color: #9c0c0c; flex-grow: 1"/><!--
 
         --><span style="font-size: 0.75em">&nbsp;{{SimpleItembox/Functional{{lang}}}}&nbsp;</span><!--
 
         --><span style="font-size: 0.75em">&nbsp;{{SimpleItembox/Functional{{lang}}}}&nbsp;</span><!--
Line 67: Line 64:
 
     -->{{SimpleItembox/ComponentRow|{{{1}}}|7}}<!--
 
     -->{{SimpleItembox/ComponentRow|{{{1}}}|7}}<!--
 
     -->{{SimpleItembox/ComponentRow|{{{1}}}|8}}<!--
 
     -->{{SimpleItembox/ComponentRow|{{{1}}}|8}}<!--
     -->{{SimpleItembox/ComponentRow|{{{1}}}|9}}<!-- No block has more than 9 components at this time.
+
     -->{{SimpleItembox/ComponentRow|{{{1}}}|9}}<!--
     -->{{SimpleItembox/ComponentRow|{{{1}}}|10}}<!--
+
     -->{{SimpleItembox/ComponentRow|{{{1}}}|10}}<!-- No block has more than 9 components at this time.
 
   --></div><!--
 
   --></div><!--
 
   --><hr style="height: 3px; background-color: #659bb7; margin: 0.25em"/>|}}<!--
 
   --><hr style="height: 3px; background-color: #659bb7; margin: 0.25em"/>|}}<!--
Line 74: Line 71:
 
PROPERTIES
 
PROPERTIES
 
   --><div style="margin: 0.25em"><!--
 
   --><div style="margin: 0.25em"><!--
     -->{{#vardefine:DisplayProperties|{{#show: Mod:Vanilla/{{{1}}}|?DisplayProperties#-}}}}<!--
+
     -->{{#if: {{{3|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{3}}}|{{{4|}}}}}}}<!--
    -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|0}}  | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|0}}}}}}<!--
+
     -->{{#if: {{{5|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{6|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|1}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|1}}}}}}<!--
+
     -->{{#if: {{{7|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{8|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|2}| {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|2}}}}}}<!--
+
     -->{{#if: {{{9|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{10|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|3}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|3}}}}}}<!--
+
     -->{{#if: {{{11|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{12|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|4}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|4}}}}}}<!--
+
     -->{{#if: {{{13|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{14|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|5}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|5}}}}}}<!--
+
     -->{{#if: {{{15|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{16|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|6}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|6}}}}}}<!--
+
     -->{{#if: {{{17|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{18|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|7}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|7}}}}}}<!--
+
     -->{{#if: {{{19|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{20|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|8}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|8}}}}}}<!--
+
     -->{{#if: {{{21|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{22|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|9}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|9}}}}}}<!--
+
     -->{{#if: {{{23|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{24|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|10}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|10}}}}}}<!--
+
     -->{{#if: {{{25|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{26|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|11}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|11}}}}}}<!--
+
     -->{{#if: {{{27|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{28|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|12}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|12}}}}}}<!--
+
     -->{{#if: {{{29|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{30|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|13}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|13}}}}}}<!--
+
     -->{{#if: {{{31|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{32|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|14}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|14}}}}}}<!--
+
     -->{{#if: {{{33|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{34|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|15}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|15}}}}}}<!--
+
     -->{{#if: {{{35|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{36|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|16}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|16}}}}}}<!--
+
     -->{{#if: {{{37|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{38|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|17}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|17}}}}}}<!--
+
     -->{{#if: {{{39|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{40|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|18}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|18}}}}}}<!--
+
     -->{{#if: {{{41|}}}|{{SimpleItembox/PropertyRow|{{{1}}}|{{{5}}}|{{{42|}}}}}}}<!--
     -->{{#if: {{#explode: {{#var:DisplayProperties}}|,|19}} | {{SimpleItembox/PropertyRow|{{{1}}} | {{#explode: {{#var:DisplayProperties}}|,|19}}}}}}<!--
 
 
   --></div><!--
 
   --></div><!--
 
PROPERTIES END
 
PROPERTIES END
 
--></div></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
 
--></div></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Revision as of 19:23, 3 April 2020

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