Module:Infobox building
Appearance
Documentation for this module may be created at Module:Infobox building/doc
local InfoboxBuilder = require("Module:InfoboxBuilder")
local p = {}
function p.main(frame)
local args = frame:getParent().args
local pagetitle = mw.title.getCurrentTitle().fullText
local infobox = InfoboxBuilder()
:title(args.name or pagetitle)
-- Hub does not have a baked sprite, a fake tutorial is used instead
if args.sprite then
local tabber = infobox:tabber()
tabber:tab("Sprite"):image({image = args.sprite, caption = "Building sprite"})
tabber:tab("Tutorial"):image({image = args.tutorial, caption = "Tutorial image"})
else
infobox:image({image = args.tutorial, caption = "Tutorial image"})
end
infobox:header("Building information")
return tostring(infobox)
end
return p