Module:Trivia

--[=[

Lua Module for Trivia Functions

--]=]

local p = {} local util = require("Module:Utility") local collectionData = mw.loadData( 'Module:ItemCollection/data' )

function p.main(frame) local tArgs = util.getArgs(frame)

local pagename = mw.title.getCurrentTitle.text local height = 15 local tOut = "" if collectionData["Items"][pagename] and collectionData["Items"][pagename][2] then if collectionData["Items"][pagename][2] == "ba" then height = 20 elseif collectionData["Items"][pagename][2] == "bc" then height = 40 elseif collectionData["Items"][pagename][2] == "d" then height = 35 elseif collectionData["Items"][pagename][2] == "pf" then height = 27 end end for i, item in pairs(tArgs) do tOut = "* " .. item .. "\n" .. tOut end return '\n' .. tOut .. " " end

return p