Actions

Template

Difference between revisions of "ItemboxTest"

From Unofficial Stationeers Wiki

Line 1: Line 1:
<includeonly>
+
{{Infobox
{{ Infobox
 
 
| name = Itembox
 
| name = Itembox
 
| title = {{{name|}}}
 
| title = {{{name|}}}
 
| image =  {{{image|}}}
 
| image =  {{{image|}}}
| header19 = {{ #if: {{{stacks|}}} {{{autoignition|}}} {{{flashpoint|}}} {{{paintable|}}}
+
| header19 = {{ #if: {{{stacks|}}}{{{autoignition|}}}{{{flashpoint|}}}{{{paintable|}}} | Properties <!--
            | Properties <!--
+
-->{{Infobox | decat = yes | child = yes
            -->{{ Infobox
+
    | label1 = Stacks
              | decat = yes
+
    | data1 = {{#if: {{{stacks|}}} |
              | child = yes
+
      {{#iferror:
              | label1 = Stacks
+
        {{#expr: {{{stacks|}}}+1 }}
              | data1 = {{#if: {{{stacks|}}}
+
        | {{{stacks|}}} |
                        | {{#iferror: {{#expr: {{{stacks|}}}+1 }}
+
        {{#ifexpr: {{{stacks|}}} = 1 | No | Yes ({{{stacks|}}}) }}
                        | {{{stacks|}}}
+
      }}
                        | {{#ifexpr: {{{stacks|}}} = 1
+
    }}
                          | No
+
    | label2 = Paintable
                          | Yes ({{{stacks|}}})
+
    | data2 = {{{paintable|}}}
                          }}
+
    | label3 = Autoignition
                        }}
+
    | data3 = {{{autoignition|}}}
              | label2 = Paintable
+
    | label4 = Flashpoint
              | data2 = {{{paintable|}}}
+
    | data4 = {{{flashpoint|}}}
              | label3 = Autoignition
+
  }}
              | data3 = {{{autoignition|}}}
+
}}
              | label4 = Flashpoint
 
              | data4 = {{{flashpoint|}}}
 
              }}
 
            }}
 
 
| label6 = Constructing Options
 
| label6 = Constructing Options
| data6 = {{#if: {{{constructs|}}} | {{{constructs|}}}[[Category:Kits]] }}
+
| data6 = {{{constructs|}}}
 
| label7 = Used With
 
| label7 = Used With
 
| data7 = {{{usedwith|}}}
 
| data7 = {{{usedwith|}}}
Line 44: Line 39:
 
| label14 = Volume
 
| label14 = Volume
 
| data14 = {{{volume|}}}
 
| data14 = {{{volume|}}}
| header20 = {{ #if: {{{createdwith|}}} {{{cost|}}}
+
| header20 = {{ #if: {{{createdwith|}}} | Recipe <!-- Old recipe style
            | Recipe <!--
+
-->{{Infobox | decat = yes | child = yes
            -->{{Infobox
+
    | label1 = Created With
              | decat = yes
+
    | data1 = {{{createdwith|}}}
              | child = yes
+
    | label2 = Cost
              | label1 = Created With
+
    | data2 = {{{cost|}}}
              | data1 = {{{createdwith|}}}
+
    }}
              | label2 = Cost
+
  }}
              | data2 = {{{cost|}}}
+
| header21 = {{ #if: {{{recipe_machine1|}}} | Recipes <!-- New recipe style
              }} [[Category:Itembox with old style recipe]]
+
-->{{Infobox | decat = yes | child = yes
            }}
+
    | label1 = [[{{{recipe_machine1|}}}]]
| header21 = {{ #if: {{{recipe_machine1|}}} {{{recipe_machine2|}}} {{{recipe_machine3|}}}
+
    | data1 = {{{recipe_cost1|}}}
            | Recipes <!--
+
    | label4 = [[{{{recipe_machine2|}}}]]
            -->{{Infobox
+
    | data4 = {{{recipe_cost2|}}}
              | decat = yes
+
    | label6 = [[{{{recipe_machine3|}}}]]
              | child = yes
+
    | data6 = {{{recipe_cost3|}}}
              | label1 = [[{{{recipe_machine1|}}}]]
+
  }}
              | data1 = {{{recipe_cost1|}}}
+
}}
              | label4 = [[{{{recipe_machine2|}}}]]
+
| header22 = {{ #if: {{{logic|}}}{{{prefabhash|}}}{{{prefabname|}}}{{{slot_class|}}}{{{sorting_class|}}}{{{hashid|}}} | Logic <!--
              | data4 = {{{recipe_cost2|}}}
+
-->{{Infobox | decat = yes | child = yes
              | label6 = [[{{{recipe_machine3|}}}]]
+
    | label1 = Prefab Hash
              | data6 = {{{recipe_cost3|}}}
+
    | data1 = {{#if: {{{prefabhash|}}} | <span style="font-family: monospace;">{{{prefabhash|}}}</span> | {{#if: {{{hashid|}}}| <span style="font-family: monospace;">{{{hashid|}}}</span> }} }}
              }}
+
    | label2 = Prefab Name
            }}
+
    | data2 = {{#if: {{{prefabname|}}} | <span style="font-family: monospace;">{{{prefabname|}}}</span>}}
| header22 = {{ #if: {{{logic|}}} {{{prefabhash|}}} {{{prefabname|}}} {{{slot_class|}}} {{{sorting_class|}}} {{{hashid|}}}  
+
    | label3 = Logic Classes
            | Logic <!--
+
    | data3 = {{#if: {{{slot_class|}}}| <div style="font-family: monospace;">{{{slot_class|}}}</div> }}{{#if: {{{sorting_class|}}}|<div style="font-family: monospace;">{{{sorting_class|}}}</div> }}
            -->{{Infobox | decat = yes | child = yes
+
    | label4 = Logic Parameters
              | label1 = Prefab Hash
+
    | data4 = {{{logic|}}}
              | data1 = {{#if: {{{prefabhash|}}}
+
  }}
                        | <span style="font-family: monospace;">{{{prefabhash}}}</span>
+
}}
                        | {{#if: {{{hashid|}}}
+
| header23 = {{ #if: {{{nutrition|}}}{{{quality|}}}{{{growthtime|}}}{{{moodbonus|}}} | Food <!--
                          | <span style="font-family: monospace;">{{{hashid}}}</span>
+
-->{{Infobox | decat = yes | child = yes
                          | [[Category:Infobox without prefab data]]
+
    | label1 = Food Nutrition
                          }}
+
    | data1 = {{{nutrition|}}}
                        }}
+
    | label2 = Food Quality
              | label2 = Prefab Name
+
    | data2 = {{{quality|}}}
              | data2 = {{#if: {{{prefabname|}}}
+
    | label3 = Growth Time
                        | <span style="font-family: monospace;">{{{prefabname}}}</span>
+
    | data3 = {{{growthtime|}}}
                        | [[Category:Infobox without prefab data]]
+
    | label4 = Mood Bonus
                        }}
+
    | data4 = {{{moodbonus|}}}
              | label3 = Logic Classes
+
  }}
              | data3 = {{#if: {{{slot_class|}}}
+
}}
                        | <div style="font-family: monospace;">{{{slot_class|}}}</div>
+
}}[[Category:Items]]
                        }}<!--
+
{{ #if: {{{nutrition|}}}{{{quality|}}}{{{moodbonus|}}} | [[Category:Food]] }}
                      -->{{#if: {{{sorting_class|}}}
+
{{ #if: {{{constructs|}}} | [[Category:Kits]] }}
                        | <div style="font-family: monospace;">{{{sorting_class|}}}</div>
+
{{ #if: {{{createdwith|}}}{{{cost|}}} | [[Category:Itembox with old style recipe]] }}
                        }}
+
{{ #if: {{{prefabhash|}}}{{{hashid|}}} | | [[Category:Infobox without prefab data]] }}
              | label4 = Logic Parameters
+
{{ #if: {{{prefabname|}}} | | [[Category:Infobox without prefab data]] }}
              | data4 = {{{logic|}}}
+
<noinclude>{{Documentation}}</noinclude>
              }}
 
            }}
 
| header23 = {{ #if: {{{nutrition|}}}{{{quality|}}}{{{growthtime|}}}{{{moodbonus|}}}  
 
            | Food [[Category:Food]] <!--
 
            -->{{ Infobox
 
              | decat = yes
 
              | child = yes
 
              | label1 = Food Nutrition
 
              | data1 = {{{nutrition|}}}
 
              | label2 = Food Quality
 
              | data2 = {{{quality|}}}
 
              | label3 = Growth Time
 
              | data3 = {{{growthtime|}}}
 
              | label4 = Mood Bonus
 
              | data4 = {{{moodbonus|}}}
 
              }}
 
            }}
 
}}[[Category:Items]]<noinclude>{{Documentation}}</noinclude>
 

Revision as of 15:41, 25 June 2024

Template documentation[view] [edit] [history] [purge]

Example

The following code produces the box presented on the right. All possible arguments are utilized in this example.

item's name
item's image
Constructing Options item's constructing variations
Used With usedwith
Max Input Power item's maximum input power
Max Output Power item's maximum output power
Max Pressure item's maximum pressure
Pressure Range item's pressure range
Max Temperature item's maximum temperature
Temperature Range item's temperature range
Volume item's volume
Properties
Stacks item's stacks (number only)
Paintable item is paintable
Recipe
Created With old style item's recipe machine
Cost old style item's recipe cost
Recipes
new style recipe machine (1) new style recipe machine (1) cost
new style recipe machine (2) new style recipe machine (2) cost
new style recipe machine (3) new style recipe machine (3) cost
Logic
Prefab Hash item's prefab. hash
Prefab Name item's prefab. name
Logic Classes
item's slot class when in a slot (SlotClass.None, etc)
item's sorting class (used in Logic Sorter) (SortingClass.Default, etc)
Logic Parameters item's logic parameter
Food
Food Nutrition item's nutrition
Food Quality item's quality
Growth Time item's growth time
{{ItemboxTest
 |            name = item's name
 |           image = item's image
 |          stacks = item's stacks (number only)
 |       paintable = item is paintable
 |      constructs = item's constructing variations
 |     createdwith = old style item's recipe machine
 |            cost = old style item's recipe cost
 | recipe_machine1 = new style recipe machine (1)
 |    recipe_cost1 = new style recipe machine (1) cost
 | recipe_machine2 = new style recipe machine (2)
 |    recipe_cost2 = new style recipe machine (2) cost
 | recipe_machine3 = new style recipe machine (3)
 |    recipe_cost3 = new style recipe machine (3) cost
 |        usedwith = usedwith
 |      maxinpower = item's maximum input power
 |     maxoutpower = item's maximum output power
 |     maxpressure = item's maximum pressure
 |   pressurerange = item's pressure range
 |         maxtemp = item's maximum temperature
 |       temprange = item's temperature range
 |           logic = item's logic parameter
 |          volume = item's volume
 |      prefabhash = item's prefab. hash
 |      prefabname = item's prefab. name
 |      slot_class = item's slot class when in a slot (SlotClass.None, etc)
 |   sorting_class = item's sorting class (used in Logic Sorter) (SortingClass.Default, etc)
 |       nutrition = item's nutrition value (if food)
 |         quality = item's quality rating (if food)
 |      growthtime = item's growth time (if plant)
}}

Template

Here's a blank example you can copy to fill in the data

{{ItemboxTest
 |            name = 
 |           image = 
 |          stacks = 
 |       paintable = 
 |      constructs = 
 |     createdwith = 
 |            cost = 
 | recipe_machine1 = 
 |    recipe_cost1 = 
 | recipe_machine2 = 
 |    recipe_cost2 = 
 | recipe_machine3 = 
 |    recipe_cost3 = 
 |        usedwith = 
 |      maxinpower = 
 |     maxoutpower = 
 |     maxpressure = 
 |   pressurerange = 
 |         maxtemp = 
 |       temprange = 
 |           logic = 
 |          volume = 
 |      prefabhash = 
 |      prefabname =
 |      slot_class =
 |   sorting_class =
 |       nutrition =
 |         quality =
 |      growthtime =
}}