Dokumentacja dla tego modułu może zostać utworzona pod nazwą Moduł:Gry/opis
modul = {}
function modul.jedna(parametr)
local parametry = parametr:getParent().args
if parametry["1"] then
parametr:preprocess("{{#VARDEFINE: gra|" .. parametry["1"] .. "}}")
parametr:preprocess("{{#VARDEFINE: " .. parametry["1"] .."|1}}")
else
parametr:preprocess("{{#VARDEFINE: gra|test}}")
end
return ""
end
function modul.wiele(parametr)
local parametry = parametr:getParent().args
local gry = {"GTA1", "L1969", "L1961", "GTA2", "III", "VC", "SA", "A", "LCS", "VCS", "IV", "TLaD", "TBGT", "CW", "V", "O"}
parametr:preprocess("{{#VARDEFINE: gra|wiele}}")
for tmp, x in ipairs(gry) do
if parametry[x] then
parametr:preprocess("{{#VARDEFINE: " .. x .. "|1}}")
end
end
return ""
end
function modul.jest(parametr)
if parametr:preprocess("{{#VAR: " .. parametr.args[1] .. "|0}}") ~= "0" then
return parametr.args[2]
else
return parametr.args[3] or ""
end
end
return modul