Module:Infobox/Item
From Feed The Beast Wiki
Module:Infobox/Item | |
---|---|
| |
Name | Module:Infobox/Item |
Source Mod | Unknown |
ID Name | Unknown |
Type | Item |
Stackable | Unknown |
Durability | 1337 |
This is the Lua module for Template:Infobox/Item. Below is the documentation for that template. |
Parameters[edit]
- All parameters from {{Infobox/InvItem}}
-
type
Default: Item.
-
-
durability
: The item's total durability, i. e. how often an undamaged item can be used until it breaks. For most tools this is the highest possible metadata value plus one. Default: Hidden.
local p = {}
local g = require("Module:Common")
local box = require("Module:Infobox")
local invItem = require("Module:Infobox/InvItem")
-- returns MW code for an item (NOT block) infobox
function p.main(frame)
local frame, args = g.getFrameAndArgs(frame)
if not g.isGiven(args.type) then args.type = "Item" end
local l = ""
l = l .. box.condRow("Durability", args.durability)
if g.isGiven(args.rows) then
l = l .. args.rows
end
args.rows = l
frame.args = args
return invItem.main(frame)
end
return p