Actions

Template

Difference between revisions of "Itembox"

From Unofficial Stationeers Wiki

(fix missing paren)
(rework Itembox)
Line 1: Line 1:
 
{{Infobox
 
{{Infobox
| name = Itembox
+
| name = Itembox
| title = {{{name|}}}
+
| title = {{{name|}}}
| image =  {{{image|}}}
+
| image =  {{{image|}}}
| label2 = Stacks
+
| label2 = Stacks
| data2 = {{#if: {{{stacks|}}} |
+
| data2 = {{#if: {{{stacks|}}} |
{{#iferror:
+
  {{#iferror:
  {{#expr: {{{stacks|}}}+1 }}
+
    {{#expr: {{{stacks|}}}+1 }}
  | {{{stacks|}}} |
+
    | {{{stacks|}}} |
  {{#ifexpr: {{{stacks|}}} = 1 | No | Yes ({{{stacks|}}}) }}
+
    {{#ifexpr: {{{stacks|}}} = 1 | No | Yes ({{{stacks|}}}) }}
}}}}
+
  }}
| label4 = Paintable
+
}}
| data4 = {{{paintable|}}}
+
| label4 = Paintable
| label6 = Constructing Options
+
| data4 = {{{paintable|}}}
| data6 = {{{constructs|}}}
+
| label6 = Constructing Options
| header60 = {{ #if: {{{createdwith|}}} | Recipe}}
+
| data6 = {{{constructs|}}}
| label62 = Created With
+
| label7 = Used With
| data62 = {{{createdwith|}}}
+
| data7 = {{{usedwith|}}}
| label64 = Cost
+
| label8 = Max Input Power
| data64 = {{{cost|}}}
+
| data8 = {{{maxinpower|}}}
<!-- New recipe style -->
+
| label9 = Max Output Power
| header65 = {{ #if: {{{recipe_machine1|}}} | Recipes}}
+
| data9 = {{{maxoutpower|}}}
| label67 = [[{{{recipe_machine1|}}}]]
+
| label10 = Max Pressure
| data67 = {{{recipe_cost1|}}}
+
| data10 = {{{maxpressure|}}}
| label70 = [[{{{recipe_machine2|}}}]]
+
| label11 = Pressure Range
| data70 = {{{recipe_cost2|}}}
+
| data11 = {{{pressurerange|}}}
| label72 = [[{{{recipe_machine3|}}}]]
+
| label12 = Max Temperature
| data72 = {{{recipe_cost3|}}}
+
| data12 = {{{maxtemp|}}}
 +
| label13 = Temperature Range
 +
| data13 = {{{temprange|}}}
 +
| label14 = Volume
 +
| data14 = {{{volume|}}}
 +
| header15 = {{ #if: {{{createdwith|}}} | Recipe
 +
  <!-- Old recipe style -->
 +
  {{Infobox | decat = yes | child = yes
 +
    | label1 = Created With
 +
    | data1 = {{{createdwith|}}}
 +
    | label2 = Cost
 +
    | data2 = {{{cost|}}}
 +
    }}
 +
  }}
 +
| header16 = {{ #if: {{{recipe_machine1|}}} | Recipes
 +
  <!-- New recipe style -->
 +
  {{Infobox | decat = yes | child = yes
 +
    | label1 = [[{{{recipe_machine1|}}}]]
 +
    | data1 = {{{recipe_cost1|}}}
 +
    | label4 = [[{{{recipe_machine2|}}}]]
 +
    | data4 = {{{recipe_cost2|}}}
 +
    | label6 = [[{{{recipe_machine3|}}}]]
 +
    | data6 = {{{recipe_cost3|}}}
 +
  }}
 +
}}
  
| label30 = Used With
+
| header17 = {{ #if: {{{logic|}}} | Logic  
| data30 = {{{usedwith|}}}
+
  {{Infobox | decat = yes | child = yes
| label32 = Max Input Power
+
    | label1 = Prefab Hash
| data32 = {{{maxinpower|}}}
+
    | data1 = {{#if: {{{prefabhash|}}} | <span style="font-family: monospace;">{{{prefabhash|}}}</span> | {{#if: {{{hashid|}}}| <span style="font-family: monospace;">{{{hashid|}}}</span> }} }}
| label34 = Max Output Power
+
    | label2 = Prefab Name
| data34 = {{{maxoutpower|}}}
+
    | data2 = {{#if: {{{prefabname|}}} | <span style="font-family: monospace;">{{{prefabname|}}}</span>}}
| label36 = Max Pressure
+
    | label3 = Logic Classes
| data36 = {{{maxpressure|}}}
+
    | data3 = {{#if: {{{slot_class|}}}| <div style="font-family: monospace;">{{{slot_class|}}}</div> }}{{#if: {{{sorting_class|}}}|<div style="font-family: monospace;">{{{sorting_class|}}}</div> }}
| label37 = Pressure Range
+
    | label4 = Logic Parameters
| data37 = {{{pressurerange|}}}
+
    | data4 = {{{logic|}}}
| label38 = Max Temperature
+
  }}
| data38 = {{{maxtemp|}}}
+
}}
| label39 = Temperature Range
+
| header18 = {{ #if: {{{nutrition|}}}{{{quality|}}}{{{growthtime|}}}{{{moodbonus|}}} | Food  
| data39 = {{{temprange|}}}
+
  {{Infobox | decat = yes | child = yes
| label47 = Logic Parameters
+
    | label51 = Food Nutrition
| data47 = {{{logic|}}}
+
    | data51 = {{{nutrition|}}}
| label42 = Volume
+
    | label52 = Food Quality
| data42 = {{{volume|}}}
+
    | data52 = {{{quality|}}}
| label44 = Prefab Hash
+
    | label53 = Growth Time
| data44 = {{#if: {{{prefabhash|}}} | <span style="font-family: monospace;">{{{prefabhash|}}}</span> | {{#if: {{{hashid|}}}| <span style="font-family: monospace;">{{{hashid|}}}</span> }}}}
+
    | data53 = {{{growthtime|}}}
| label45 = Prefab Name
+
    | label54 = Mood Bonus
| data45 = {{#if: {{{prefabname|}}} | <span style="font-family: monospace;">{{{prefabname|}}}</span>}}
+
    | data54 = {{{moodbonus|}}}
| label46 = Logic Classes
+
  }}
| data46 = {{#if: {{{slot_class|}}}| <div style="font-family: monospace;">{{{slot_class|}}}</div> }}{{#if: {{{sorting_class|}}}|<div style="font-family: monospace;">{{{sorting_class|}}}</div> }}
+
}}
| header50 = {{ #if: {{{nutrition|}}}{{{quality|}}}{{{growthtime|}}}{{{moodbonus|}}} | Food }}
 
| label51 = Food Nutrition
 
| data51 = {{{nutrition|}}}
 
| label52 = Food Quality
 
| data52 = {{{quality|}}}
 
| label53 = Growth Time
 
| data53 = {{{growthtime|}}}
 
| label54 = Mood Bonus
 
| data54 = {{{moodbonus|}}}
 
 
}}
 
}}
 
<includeonly>
 
<includeonly>

Revision as of 05:40, 19 May 2024

Template documentation[view] [edit] [history] [purge]
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
Item Hash item's prefab. hash
Item 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

Example

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

{{Itembox
 |            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

{{Itembox
 |            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 =
}}