Modifications

Aller à : navigation, rechercher

Module:Collection

740 octets supprimés, 30 août 2018 à 21:50
m
46 révisions importées
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 dmw.loadData('extension", vaisseaux = { xwing = 1, },}Module:Collection/Boite["UBISWX03"] = { titre = "Chasseur Tie Paquet d'extension",) vaisseaux = { chasseurtie = 1, },}Boite["UBISWX04"] = { titre local Vaisseau = "Y-wing Paquet dmw.loadData('extension", vaisseaux = { ywing = 1, },}Boite["UBISWX05"] = { titre = "Tie Advanced Paquet dModule:Collection/Vaisseau'extension",) vaisseaux local FabListe = { tieadvanced = 1, },}Boite["UBISWX06"] = { titre = "Faucon Millenium Paquet dmw.loadData('extension", vaisseaux = { yt1300 = 1, },}Boite["UBISWX07"] = { titre = "Slave-1 Paquet dModule:Collection/FabListe'extension",) vaisseaux = { firespray31 = 1, },}Boite["UBISWX08"] = { titre = "A-wing Paquet d'extension", vaisseaux = { awing = 1, },}Boite["UBISWX09"] = { titre = "Intercepteur Tie Paquet d'extension", vaisseaux = { intercepteurtie = 1, },}Boite["UBISWX12"] = { titre = "HWK-290 Paquet d'extension", vaisseaux = { hwk290 = 1, },}Boite["UBISWX13"] = { titre = "Navette de classe Lambda Paquet d'extension", vaisseaux = { navetteclasselambda = 1, },}Boite["UBISWX14"] = { titre local AffichageModule = "B-wing Paquet drequire('extension", vaisseaux = { bwing = 1, },}Boite["UBISWX15"] = { titre = "Bombardier Tie Paquet dModule:Collection/Affichage'extension", vaisseaux = { bombardiertie = 1, },} local FabListe = {"UBISWX01","UBISWX36","UBISWX02","UBISWX03","UBISWX04","UBISWX05","UBISWX06","UBISWX07","UBISWX08","UBISWX09","UBISWX12","UBISWX13","UBISWX14","UBISWX15",})
function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
 
function p.boite(frame)
local fabSelectStr = trim(frame.args[1]) or ""
local affIfZero = trim(frame.args[2]) or false
fabSelectTab={}
fabSelectStr:gsub(".",function(c) table.insert(fabSelectTab,c) end)
retour = ""
for i, v in ipairs (fabSelectTab) do
if fabSelectTab[i] ~= nil then
if FabListe[i] ~= nil then
if Boite[FabListe[i]] ~= nil then
if (fabSelectTab[i] ~= "0") or (affIfZero == "true") then
retour = retour .. "* [[" .. Boite[FabListe[i]].titre .. "]] x " .. fabSelectTab[i] .. "\n"
end
end
end
end
end
return retour
end
function p.vaisseau(frame)
local fabSelectStr = trim(frame.args[1]) or ""
local affIfZero = trim(frame.args[2]) or false
local affType = trim(frame.args[3]) or "Faction"
fabSelectTab={}
fabSelectStr:gsub(".",function(c) table.insert(fabSelectTab,c) end)
local vaissCollecTab={}
retour = "Ma collection de boite : <br/>"
for i, v in ipairs (fabSelectTab) do
if fabSelectTab[i] ~= nil then
if FabListe[i] ~= nil then
if Boite[FabListe[i]] ~= nil then
retour = retour .. "* " .. Boite[FabListe[i]].titre .. " x " .. fabSelectTab[i] .. "<br/>"
for k, v in pairs (Boite[FabListe[i]].vaisseaux) do
if vaissCollecTab[k] == nil then
end
end
retour if affType == "Liste" then return retour .. "Ma collection de vaisseau : <br/>" for k, v in pairs AffichageModule.affichageVaisseauListe(vaissCollecTab, affIfZero) do else retour = return retour .. "* " AffichageModule.. k .. " x " .. v .. "<br/>"affichageVaisseauByFaction(vaissCollecTab, affIfZero)
end
return retour
end
return p

Menu de navigation