Module:Trivia

--[=[

Lua Module for Trivia Functions

--]=]

local p = {} local util = require("Module:Utility")

function p.main(frame) local tArgs = util.getArgs(frame) local collectionData = mw.loadData( 'Module:ItemCollection/data' ) local pagename = mw.title.getCurrentTitle.text local height = 15 local tOut = "" local tItems = "" local number = "" if collectionData["Items"][pagename] and collectionData["Items"][pagename][2] then if collectionData["Items"][pagename][2] == "ba" then height = 25 elseif collectionData["Items"][pagename][2] == "bc" then height = 45 elseif collectionData["Items"][pagename][2] == "d" then height = 40 elseif collectionData["Items"][pagename][2] == "pf" then height = 30 end end tOut = ' \n' for i, item in pairs(tArgs) do		if i == 1 and character == true then tItems = tItems elseif i == 5 then tItems = tItems .. "* " .. item .. "\n" number = true else tItems = tItems .. "* " .. item .. "\n" end end if height == 15 and number ~= true then return tItems else return tOut .. tItems .. " "	end end

return p