Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah.

Module:Infobox Base

From CrabCraft Wiki
Revision as of 21:14, 23 June 2025 by Max (talk | contribs) (Adds base)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Infobox Base/doc

local p = {}

local infobox = require("Module:Infobox")

function p.infobox(frame)
    local args = frame:getParent().args

    local base_args = {
        {'t',       args.basename},
        {'i',       args.image},
        {'s',       'General Info'},
        {'f',       'Base Name',     args.basename},
        {'f',       'Owner',         args.owner},
        {'f',       'Base Type',     args.basetype},
        {'f',       'Season',        args.season},

        {'s',       'Location'},
        {'f',       'Biome / Area',  args.location},
        {'f',       'Coordinates',   args.coordinates},

        {'s',       'Timeline'},
        {'f',       'Date Established', args.dateestablished},
        {'f',       'Date Abandoned',   args.dateabandoned},

        {'s',       'People'},
        {'f',       'Members',       args.members},

        {'s',       'Features'},
        {'f',       'Notable Features', args.notablefeatures},
        {'f',       'Description',   args.description},
    }

    return infobox.infobox {
        getParent = function() return { args = base_args } end
    }
end

return p