Module:Infobox/thing/en

local p = {}

-- Translation note: Translatable strings MUST be enclosed in [=[ this sort ]=] of delimiter (as opposed to "this sort" or 'this sort').

-- This variable holds the list of item types. local itemTypes = { armor = "Armor", block = "Solid Block", sblock = "Solid Block", oblock = "Solid Block", tblock = "Transparent Block", component = "Component", crop = "Crop", entity = "Entity", tentity = "Tile Entity", food = "Food", item = "Item", machine = "Machine", mob = "Monster", hmob = "Hostile Monster", nmob = "Neutral Monster", fmob = "Friendly Monster", seed = "Seed", tool = "Tool", wand = "Wand", weap = "Weapon", weapon = "Weapon", hull = "Steve's Carts Hull", module = "Steve's Carts Module", upgrade = "Steve's Carts Upgrade", landmark = "Landmark", ritual = "Ritual", liquid = "Liquid", ["multiblock structure"] = "Multiblock Structure", enchant = "Enchantment", mechanic = "Mechanic", dimension = "Dimension", flower = "Flower", command = "Command" }

-- This variable holds the shape of the infobox. -- It is a list of sections. -- Each section has a name (shown in documentation), a title (shown in the infobox), -- and then a list of subsections. Consecutive sections with identical names are merged in the docs. -- -- Each subsection is a list of rows. -- Each row is a list of one or two strings. -- A row with only one entry is made into a single cell with rowspan=2 -- Otherwise the first entry is bolded and the second is not. -- -- If instead of a string you use a table, it is interpreted as referring to a named argument -- given to the invocation. -- use =string to denote what argument to use, where type is image,text,switch. -- Use desc for the text to be displayed in documentation. If missing the parameter will not be displayed. -- Use units for the units of that value. -- Use allowedValues as a table denoting allowed entries for a switch, and what they display as. -- Use docOnly to denote something that's not actually a parameter in the template, but should be documented as one.

p.format = { {       name = [=[Basic]=], title = {arg="name", desc=[=[The title that will be displayed at the top of the info box.]=]}, {           { {arg={"blockimage","image"}, type="image", desc="The big picture. Use the complete filename, like \"Block_Sand.png\"." } },           { {arg={"iconimage","imageicon"}, desc="The icon image. Use Template:Gc or Template:O."} } },       {               { "Mod", {arg="mod", desc="The mod the item belongs to. Always refer to the main page of the mod. Please do not use version numbers like \"Industrial Craft 2\" or \"RedPower 2\"; just use the regular name instead. (Will detect page language and link to respective languages)"} }, { "Type", {arg="type", type="switch", allowedValues=itemTypes, desc="The item type."} }, { "Tooltip text", {arg="lore", desc="Additional information that is displayed on the tooltip of the item in game. If the in-game tooltip has custom colors, they should be added to this parameter using the template. Colors that are typically used can be found on the Minecraft Wiki." }},           { "Required Modules", {arg="module", desc="The module or modules that are required to be installed/enabled for the item to be present in the mod. Some examples of mods that add modules include RedPower 2, Project Red, and Railcraft."}}, { "Chemical Composition", {arg="chemcomp", desc="Chemical composition of the item."} } }   },    {        name="Basic", title="Properties", {           {"Blast Resistance", {arg="blastresistance", desc="The blast resistance of the block. Include only the number."} }, {"Hardness", {arg="hardness", desc="The hardness of a block." }}       },        {            {"Restores", {arg="foodpoints", desc="The food points a food regenerates. Add this only to food."}}, {"Effects", {arg="effects", desc="List of effects the food/potion buffs you with."}}, {"Cookable", {arg="cookable", desc="Whether the item is cookable (food)."}} },       {            {"Armour Rating",{arg="armorrating",desc="The armor rating of the armor. Add this only to armor."}}, {"Damage",{arg="damage",desc="The weapon's damage (one heart is two damage, half a heart is one damage). Add this only to weapons"}}, {"Durability",{arg="durability",desc="The durability of the tool or armor. Add this only to tools and armor. "}}, {"Mining level",{arg="mininglevel",desc="The pick's mining level (wood, stone, iron etc...)."}} },       {            {"Stackable",{arg="stackable", desc="Whether the block/item is stackable."}}, {"Flammable",{arg="flammable", desc="Whether the block/item is flammable (can be set on fire and burned)."}} },       {            {"Storage",{arg={"storageslots","storage"}, desc="The storage of the item - This parameter does NOT add \"cells\" or \"stacks\" after the parameter's text."}}, {"Liquid Storage",{arg="lstorage", units="mB", desc="The maximum liquid storage of the item in mB. Include only the number."}} },       {            {"Heat (C)",{arg="heatc", units="ºC", desc="The maximum heat capacity of the item in C (Celsius). Include only the number."}}, {"Heat (F)",{arg="heatf", units="ºF", desc="The maximum heat capacity of the item in F (Fahrenheit). Include only the number."}} }   },    {        name="Upgrades", title="Upgrades", {       },        {            {"Previous Tier",{arg="prevtier", desc="Previous tier of the item, tool or machine."}} },       {            {"Next Tier",{arg="nexttier", desc="Next tier of the item, tool or machine."}} }   },    {        name="Energy Consumption", title="Energy Consumption", {           {"Max EU input", {arg="euinput", units="EU/t", desc="Maximum input of EU/t. Include only the number."}}, {"EU use", {arg="euuse", units="EU/t", desc="EU consumption in EU/t. Include only the number."}}, {"EU use", {arg="euusetool", units="EU/use", desc="EU consumption in EU per use (only used on tools that use EU per use. Include only the number."}},           {"EU storage", {arg="eustorage", units="EU", desc="EU storage in EU. Include only the number."}},            {"Max EU output", {arg="euoutput", units="EU/t", desc="Maximum output of EU/t. Include only the number."}},            {"EU production", {arg="euproduction", units="EU/t", desc="EU production in EU/t. Include only the number."}},            {"EU traversing", {arg="eutraversing", units="EU/t", desc="Maximum energy traversing - only for cables. Include only the number."}}        },        {            {"Steam storage", {arg="gtsteamstorage", units="L", desc="Maximum liters of steam that it can hold - for GregTech and its addons. Include only the number."}},            {"Steam usage", {arg="gtsteamusage", desc="Liters of steam that is used by it per tick - for GregTech and its addons. Include only the number."}},           {"Steam production", {arg="gtsteamproduction", units="L/t", desc="How many liters of steam it makes per tick - for GregTech and its addons. Include only the number."}},           {"Energy storage", {arg="gteustorage", units="EU", desc="How much EU it can hold - for GregTech and its addons. Include only the number."}},           {"Energy usage", {arg="gteuusage", units="EU/t", desc="How much EU is used by it per tick - for GregTech and its addons. Include only the number."}},           {"Energy production", {arg="gteuproduction", units="EU/t", desc="How much EU is produced by it per tick - for GregTech and its addons. Include only the number."}},           {"Voltage in", {arg="gtvoltagein", units="EU-Volts", desc="Maximum EU voltage that can be put into it - for GregTech and its addons. Include only the number."}},           {"Voltage out", {arg="gtvoltageout", units="EU-Volts", desc="Maximum EU voltage that can be output - for GregTech and its addons. Include only the number."}},           {"Max amperage", {arg="gtamperage", units="EU-Amps", desc="Maximum EU amperage - for GregTech and its addons. Include only the number."}},           {"Loss/meter/amp", {arg="gtloss", units="EU-Volts", desc="Loss/meter/amperage - for GregTech and its addons. Include only the number."}},           {"Heat limit", {arg="gtheatlimit", units="K", desc="Maximum heat that it can take in Kelvin - for GregTech and its addons. Include only the number."}},           {"Fluid capacity", {arg="gtfluidcapacity", units="L/s", desc="Maximum liters that it can hold - for GregTech and its addons. Include only the number."}},           {"Item capacity", {arg="gtitemcapacity", units="Stacks/s", desc="Maximum stacks of items it can hold - for GregTech and its addons. Include only the number."}},           {"Routing value", {arg="gtrouting", desc="Routing value - for GregTech and its addons."}},            {"Fuel efficiency", {arg="gtefficiency", desc="Fuel efficiency - for GregTech and its addons."}}        },        {            {"Charge storage", {arg="rccharge", desc="Railcraft energy storage. Include only the number."}},           {"Energy loss", {arg="rcloss", units="per tick", desc="How much energy is lost per tick - for Railcraft and its addons. Include only the number."}}       },        {            {"Required Power", {arg="rocpower", units="W", desc="Required amount of power - for RotaryCraft and its addons. Include only the number."}},           {"Required Torque", {arg="roctorque", units="Nm", desc="Required torque - for RotaryCraft and its addons. Include only the number."}},           {"Required Speed", {arg="rocspeed", units="rad/s", desc="Required speed - for RotaryCraft and its addons. Include only the number."}}       },        {            {"Max MJ input", {arg="mjinput", units="MJ/t", desc="Maximum input of MJ/t. Include only the number."}},           {"MJ use", {arg="mjuse", units="MJ/t", desc="MJ consumption in MJ/t. Include only the number."}},           {"MJ storage", {arg="mjstorage", units="MJ", desc="MJ storage in MJ. Include only the number."}},           {"Max MJ output", {arg="mjoutput", units="MJ/t", desc="Maximum output of MJ/t. Include only the number."}},           {"MJ production", {arg="mjproduction", units="MJ/t", desc="MJ production in MJ/t. Include only the number."}},           {"MJ traversing", {arg="mjtraversing", units="MJ/t", desc="Maximum energy traversing - only for pipes. Include only the number."}}       },        {            {"Max RF input", {arg="rfinput", units="RF/t", desc="Maximum input of RF/t. Include only the number."}},           {"RF use", {arg="rfuse", units="RF/t", desc="RF consumption in RF/t. Include only the number."}},           {"RF storage", {arg="rfstorage", units="RF", desc="RF storage in RF. Include only the number."}},           {"Max RF output", {arg="rfoutput", units="RF/t", desc="Maximum output of RF/t. Include only the number."}},           {"RF production", {arg="rfproduction", units="RF/t", desc="RF production in RF/t. Include only the number."}},           {"RF traversing", {arg="rftraversing", units="RF/t", desc="Maximum energy traversing in RF/t - only for conduits. Include only the number."}}       },        {            {"Steam usage", {arg="fspsuuse", units="SU/use", desc="Steam unit consumption in SU/use. Include only the number."}},           {"Steam usage", {arg="fspsutick", units="SU/t", desc="Steam unit consumption in SU/tick. Include only the number."}},           {"Steam storage", {arg="fspsteamstorage", units="SU", desc="Steam storage in SU. Include only the number."}}       },        {            {"EMC value", {arg="emc", units="EMC", desc="EMC value of the item. Include only the number."}},           {"EMC storage", {arg="emcstorage", units="EMC", desc="How much EMC the item can hold. This is mostly relevant for Equivalent Exchange Klein Stars. Include only the number."}},           {"EMC creation", {arg="emcproduction", units="EMC/second", desc="How much EMC the item or block will create per second. Include only the number."}}       }    },    {        name="Technical",        title="Technical Details",        {            {"Default data value", {arg="datavalue", desc="Block ID. Do not use."}},           {"Ore dictionary name", {arg="oredictname", desc="The oredictionary name for this item."}}        },        {            {"First appearance", {arg="firstappearance", desc="The version string that the item first appeared in."}},            {"Last appearance", {arg="lastappearance", desc="The version string that the item last appeared in."}}        },        {            {"Experience", {arg="exp", desc="Exp you gain from mining or smelting it."}},            {"Flow speed", {arg="flowspeed", units="m/s", desc="The flow speed of liquids in m/s."}}        },        {            {"Player speed", {arg="speed", desc="The walk speed of the player character when on or in it."}}        }    } }

-- This next bit adds the PWhatever lines. -- 4 is the Energy Use section. local energyUseSection = p.format[4] local pwhateverfields = {"input", "use", "storage", "output", "production"} for i=1,5 do   local subsection = {} for j,name in ipairs(pwhateverfields) do        subsection[#subsection+1] = { { arg=i..name.."title" }, {arg=i..name} } end energyUseSection[#energyUseSection + 1] = subsection end

return p