Module:Treasure Chests

local p = {}

local DataTable = require("Module:Data Table") local Franchise = require("Module:Franchise") local utilsArg = require("Module:UtilsArg")

function p.Main(frame) local args = utilsArg.parse(frame:getParent.args, p.Templates["Treasure Chests"]) local cells = args.cells or {} local rows = DataTable.parseRows(cells)

local columns = {"Treasure Chest [Term][Nowrap]", "Contents [Term][Nowrap]", "Coordinates [Nowrap]", "Notes [Description]"} local dataTable = DataTable.printTable(rows, {		game = args.game,		columns = columns,	}) local html = mw.html.create("div") :wikitext(dataTable) return tostring(html) end

p.Templates = { ["Treasure Chests"] = { params = { game = { required = true, desc = "A game code.", type = "string", enum = Franchise.enum, },			["..."] = {				name = "cells", type = "content", trim = true, },		}	}, }

return p