Jump to content

Module:Cast

From Heroes Wiki
Revision as of 21:35, 10 February 2026 by LIMAFOX76 (talk | contribs) (Created page with "local data = require("Module:Cast/data") local p = {} -- Function 1: Get cast type function p.getCastType(frame) local key = string.lower(frame.args[1] or "") local entry = data[key] if not entry then return "Ending Credits in" end local cast, _ = unpack(entry) return string.format("%s", cast) end -- Function 2: Get cast marking function p.getCastType(frame) local key = string.lower(frame.args[1] or "") local entry = data[key]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
local data = require("Module:Cast/data")
local p = {}

-- Function 1: Get cast type
function p.getCastType(frame)
    local key = string.lower(frame.args[1] or "")
    local entry = data[key]

    if not entry then
        return "Ending Credits in"
    end

    local cast, _ = unpack(entry)

    return string.format("%s", cast)
end

-- Function 2: Get cast marking
function p.getCastType(frame)
    local key = string.lower(frame.args[1] or "")
    local entry = data[key]

    if not entry then
        return "Ending Credits"
    end

    local _, marking = unpack(entry)

    return string.format("%s", marking)
end

return p