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 local itemType = collectionData["Items"][pagename][2] if itemType == "ba" then height = 25 elseif itemType == "bc" then height = 40 elseif itemType == "d" or itemType == "pf" then height = 35 end end for i, item in pairs(tArgs) do tOut = "* " .. item .. "\n" .. tOut end return '\n' .. tOut .. " " end

return p