Template:Infobox furniture: Difference between revisions
(Added container string for container icon instead of type, adds icon to left panel. Combined skill with level, within parentheses) |
(Added error detection for "size". Fixed default value for "container") |
||
Line 30: | Line 30: | ||
| label4 = Size | | label4 = Size | ||
| data4 = {{#if: {{{size|}}} | {{#ifexpr: {{{size|0}}} > 1 | {{{size}}} tiles | {{{size}}} tile }} }} | | data4 = {{#if: {{{size|}}} | {{#iferror: {{#expr: {{{size}}} }} | {{error|Error: "{{{size}}}" is not a number}} | {{#ifexpr: {{{size|0}}} > 1 | {{{size}}} tiles | {{{size}}} tile }} }} }} | ||
| header5 = {{#if:{{{type|}}}{{{function|}}}{{{capacity|}}}{{{water_capacity|}}}{{{freezer_capacity|}}}{{{fuel|}}}{{{energy|}}}{{{contents|}}} | Properties }} | | header5 = {{#if:{{{type|}}}{{{function|}}}{{{capacity|}}}{{{water_capacity|}}}{{{freezer_capacity|}}}{{{fuel|}}}{{{energy|}}}{{{contents|}}} | Properties }} | ||
| label6 = Type {{#if: {{{container|}}} | [[File:{{#switch: {{{container}}} | Cabinet = Container_Cabinet.png | Campfire = Container_Campfire.png | Counter = Container_Counter.png | Crate = Container_Crate.png | Drawer = Container_Drawer.png | Floor = FloorTile_Icon.png | Freezer = Container_Freezer.png | Fridge = Container_Fridge.png | Garbage = Container_Garbage.png | Medicine = Container_Medicine.png | Microwave = Container_Microwave.png | Oven = Container_Oven.png|Oven]] | Plant = Container_Plant.png | Shelf = Container_Shelf.png | Vending = Container_Vending.png | Glove Box = Container_GloveCompartment.png | Seat = Container_CarSeat.png | Truck Bed = Container_TruckBed.png | Trunk = Container_CarTrunk.png | Female Corpse = DeadPerson_Female.png | Female Zombie Corpse = DeadPerson_FemaleZombie.png | Male Corpse = DeadPerson_Male.png | Male Zombie Corpse = DeadPerson_MaleZombie.png | #Default | | label6 = Type {{#if: {{{container|}}} | [[File:{{#switch: {{{container}}} | Cabinet = Container_Cabinet.png | Campfire = Container_Campfire.png | Counter = Container_Counter.png | Crate = Container_Crate.png | Drawer = Container_Drawer.png | Floor = FloorTile_Icon.png | Freezer = Container_Freezer.png | Fridge = Container_Fridge.png | Garbage = Container_Garbage.png | Medicine = Container_Medicine.png | Microwave = Container_Microwave.png | Oven = Container_Oven.png|Oven]] | Plant = Container_Plant.png | Shelf = Container_Shelf.png | Vending = Container_Vending.png | Glove Box = Container_GloveCompartment.png | Seat = Container_CarSeat.png | Truck Bed = Container_TruckBed.png | Trunk = Container_CarTrunk.png | Female Corpse = DeadPerson_Female.png | Female Zombie Corpse = DeadPerson_FemaleZombie.png | Male Corpse = DeadPerson_Male.png | Male Zombie Corpse = DeadPerson_MaleZombie.png | #Default = Container_Crate.png }}{{!}}right{{!}}link=Containers{{!}}{{{container}}}]] }} | ||
| data6 = {{{type|}}} | | data6 = {{{type|}}} | ||
Revision as of 03:49, 4 July 2021
This template is used to create an infobox in an article about a tiles/furniture.
Usage
To use this template in an article, copy the template below, then paste the template into an article.
All parameters are optional – those you do not populate with data will not show up in the infobox when the article is saved.
It is strongly advised to only include variables that are relevant to the specific item in question, i.e. parameters that do not display as false or 0.
{{Infobox furniture |display_name = |name_colour = |name_text_colour = |image = |image_width = |alternate_image = |alternate_name = |alternate_link = |alternate_image2 = |alternate_name2 = |alternate_link2 = |alternate_image3 = |alternate_name3 = |alternate_link3 = |alternate_image4 = |alternate_name4 = |alternate_link4 = |alternate_image5 = |alternate_name5 = |alternate_link5 = |category = |weight = |size = <!--Properties--> |type = |function = |capacity = |water_capacity = |freezer_capacity = |fuel = <!-- or | energy = --> |contents = <!--Build--> |build_skill = |build_level = |build_tool = <!-- or | build_tools = --> |ingredients = <!-- or | ingredient = --> <!--Move--> |move_skill = |move_level = |move_tool = <!-- or | move_tools = --> <!--Disassemble--> |disassemble_skill = <!-- or | dismantle_skill = --> |disassemble_level = <!-- or | dismantle_level = --> |disassemble_tool = <!-- or | disassemble_tools = --> <!-- or | products = --> <!-- or | dismantle_tool = --> <!-- or | dismantle_tools = --> |products = <!-- or | product = --> <!--Technical details--> |class_name = }}
Editors can experiment in this template's sandbox (create)