Module:Collection

De X-Wing - Le wiki des figurines
Aller à : navigation, rechercher

La documentation pour ce module peut être créée à Module:Collection/doc

local p = {}

local Boite = {}
Boite["UBISWX01"] = {
	titre = "X-wing Le jeu de figurine",
	vaisseaux = {
		xwing = 1,
		chasseurtie = 2,
	},
}
Boite["UBISWX36"] = {
	titre = "X-wing Le Réveil de la Force",
	vaisseaux = {
		xwingt70 = 1,
		chasseurtiefo = 2,
	},
}
Boite["UBISWX02"] = {
	titre = "X-wing Paquet d'extension",
	vaisseaux = {
		xwing = 1,
	},
}
Boite["UBISWX03"] = {
	titre = "Chasseur Tie Paquet d'extension",
	vaisseaux = {
		chasseurtie = 1,
	},
}

local FabListe = {
"UBISWX01",
"UBISWX36",
"UBISWX02",
"UBISWX03",
}

function p.vaisseau(frame)
    local fabSelectStr = frame.args[1] or ""
    fabSelectTab={}
    fabSelectStr:gsub(".",function(c) table.insert(fabSelectTab,c) end)
    retour = "Ma collection de boite : <br/>"
    for i, v in ipairs (fabSelectTab) do
        if fabSelectTab[i] ~= nil then
            if FabListe[ i ] ~= nil then
                retour = retour .. "* " .. FabListe[ i ] .. " x " .. fabSelectTab[i] .. " - i : " .. i .. "<br/>"
            end
        end
    end
    return retour
end
return p