Module:LootChest

local p = {

-- these define which sprite and label to use, in the result table -- TODO: use correct sprite names, correct labels ["items"] = { ["diamond"]            = { "item", "Diamond" }, ["iron-ingot"]         = { "item", "Iron Ingot" }, ["gold-ingot"]         = { "item", "Gold Ingot" }, ["emerald"]            = { "item", "Emerald" }, ["bread"]              = { "item", "Bread" }, ["apple"]              = { "item", "Apple" }, ["iron-pickaxe"]       = { "item", "Iron Pickaxe" }, ["iron-sword"]         = { "item", "Iron Sword" }, ["iron-chestplate"]    = { "item", "Iron Chestplace" }, ["iron-helmet"]        = { "item", "Iron Helmet" }, ["iron-leggings"]      = { "item", "Iron Leggings" }, ["iron-boots"]         = { "item", "Iron Boots" }, ["obsidian"]           = { "block", "Obsidian" }, ["oak-sapling"]         = { "item", "Oak Sapling" }, ["iron-horse-armor"]   = { "item", "Iron Horse Armor" }, ["gold-horse-armor"]   = { "item", "Gold Horse Armor" }, ["diamond-horse-armor"] = { "item", "Diamond Horse Armor" }, ["ender-pearl"]        = { "item", "Ender Pearl" }, ["redstone"]           = { "item", "Redstone" }, ["lapis-lazuli"]       = { "item", "Lapis Lazuli" }, ["golden-apple"]       = { "item", "Golden Apple" }, ["saddle"]             = { "item", "Saddle" }, ["enchanted-book"]     = { "item", "Enchanted Book" }, ["book"]               = { "item", "Book" }, ["paper"]              = { "item", "Paper" }, ["map"]                = { "item", "Map" }, ["compass"]            = { "item", "Compass" }, ["coal"]               = { "item", "Coal" }, ["stick"]              = { "item", "Stick" }, ["oak-planks"]         = { "block", "Oak Planks" }, ["oak-wood"]           = { "block", "Oak Wood" }, ["acacia-wood"]        = { "block", "Acacia Wood" }, ["stone-axe"]          = { "item", "Stone Axe" }, ["wooden-axe"]         = { "item", "Wooden Axe" }, ["stone-pickaxe"]      = { "item", "Stone Pickaxe" }, ["wooden-pickaxe"]     = { "item", "Wooden Pickaxe" }, ["wheat"]              = { "item", "Wheat" }, ["gunpowder"]          = { "item", "Gunpowder" }, ["string"]             = { "item", "String" }, ["bucket"]             = { "item", "Bucket" }, ["record-13"]          = { "item", "Record 13" }, ["record-cat"]         = { "item", "Record Cat" }, ["nametag"]            = { "item", "Nametag" }, ["rail"]               = { "item", "Rail" }, ["melon-seeds"]        = { "item", "Melon Seeds" }, ["pumpkin-seeds"]      = { "item", "Pumpkin Seeds" }, ["golden-sword"]       = { "item", "Golden Sword" }, ["golden-chestplate"]  = { "item", "Golden Chestplate" }, ["flint-and-steel"]    = { "item", "Flint and Steel" }, ["nether-wart"]        = { "item", "Nether Wart" }, ["bone"]               = { "item", "Bone" }, ["rotten-flesh"]       = { "item", "Rotten Flesh" } },	-- accurate as of 1.8 -- TODO: what is the mineshaft min?	-- TODO: the other chests ["chests"] = { ["village-blacksmith"] = { ["_rounds"]            = {3,8}, ["_total-weight"]		= 0, ["diamond"]            = {1,3,3}, ["iron-ingot"]         = {1,5,10}, ["gold-ingot"]         = {1,3,5}, ["bread"]              = {1,3,15}, ["apple"]              = {1,3,15}, ["iron-pickaxe"]       = {1,1,5}, ["iron-sword"]         = {1,1,5}, ["iron-chestplate"]    = {1,1,5}, ["iron-helmet"]        = {1,1,5}, ["iron-leggings"]      = {1,1,5}, ["iron-boots"]         = {1,1,5}, ["obsidian"]           = {3,7,5}, ["sapling"]            = {3,7,5}, ["iron-horse-armor"]   = {1,1,1}, ["gold-horse-armor"]   = {1,1,1}, ["diamond-horse-armor"] = {1,1,1}, ["saddle"]             = {1,1,3}, },		["stronghold-chest"]    = { ["_rounds"]            = {2,4}, ["_total-weight"]		= 0 },		["stronghold-library"]  = { ["_rounds"]            = {1,4}, ["_total-weight"]		= 0 },		["stronghold-storeroom"] = { ["_rounds"]            = {1,4}, ["_total-weight"]		= 0 },		["bonus"]               = { ["_rounds"]            = {10,10}, ["_total-weight"]		= 0 },		["dungeon"]             = { ["_rounds"]            = {8,8}, ["_total-weight"]		= 0 },		["mineshaft"]           = { ["_rounds"]            = {0,6}, ["_total-weight"]		= 0 },		["nether-fortress"]     = { ["_rounds"]            = {2,5}, ["_total-weight"]		= 0 },		["desert-temple"]       = { ["_rounds"]            = {2,6}, ["_total-weight"]		= 0 },		["jungle-temple"]       = { ["_rounds"]            = {2,6}, ["_total-weight"]		= 0 }	} }

function p.base( f ) local args = f	if f == mw.getCurrentFrame then args = require( 'Module:ProcessArgs' ).merge( true ) end return p end