Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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

local p = {}

function p.render(frame)
    local args = frame:getParent().args
    local rows = {}

    for i, v in ipairs(args) do
        local parts     = mw.text.split(v, ';')
        local name      = mw.text.trim(parts[1] or '')
        local slotType  = mw.text.trim(parts[2] or 'None')
        local index     = parts[3] and mw.text.trim(parts[3]) or tostring(i - 1)
        if name ~= '' then
            table.insert(rows, '|-\n| ' .. name .. ' || ' .. slotType .. ' || ' .. index)
        end
    end

    return '{| class="wikitable"\n|-\n! Slot Name !! Type !! Index\n'
        .. table.concat(rows, '\n') .. '\n|}'
end

return p