Aller au contenu

Module:Distribution

De Heroes Wiki
Version datée du 14 février 2026 à 19:03 par LIMAFOX76 (discussion | contributions) (Page créée avec « local data = require("Module:Distribution/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 "Crédits de fin dans" end local cast, _ = unpack(entry) return string.format("%s", cast) end -- Function 2: Get cast marking function p.getCastMarking(frame) local key = string.lower(frame.args[1] or "") l... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
local data = require("Module:Distribution/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 "Crédits de fin dans"
    end

    local cast, _ = unpack(entry)

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

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

    if not entry then
        return "Crédits de fin"
    end

    local _, marking = unpack(entry)

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

return p