Нет описания правки |
Нет описания правки |
||
| Строка 1: | Строка 1: | ||
local prototypes = mw.loadData("Module:Uplink Lookup/data") | local prototypes = mw.loadData("Module:Uplink Lookup/data") | ||
local p = {} | |||
p.store = prototypes.store | |||
function p.buildboxes(frame) | function p.buildboxes(frame) | ||
local out = "" | local out = "" | ||
local group = frame.args[1] | local group = frame.args[1] | ||
for k in pairs(p. | for k in pairs(p.store) do | ||
if p. | if p.store[k].group == group then | ||
out = out .. frame:expandTemplate{ title = " | out = out .. frame:expandTemplate{ title = "Uplinkstore", args = { prototype = k }} | ||
elseif group == nil then | elseif group == nil then | ||
out = out .. frame:expandTemplate{ title = " | out = out .. frame:expandTemplate{ title = "Uplinkstore", args = { prototype = k }} | ||
end | end | ||
end | end | ||
return out | return out | ||
end | end | ||
Версия от 14:47, 18 января 2024
Для документации этого модуля может быть создана страница Модуль:Uplink Lookup/doc
local prototypes = mw.loadData("Module:Uplink Lookup/data")
local p = {}
p.store = prototypes.store
function p.buildboxes(frame)
local out = ""
local group = frame.args[1]
for k in pairs(p.store) do
if p.store[k].group == group then
out = out .. frame:expandTemplate{ title = "Uplinkstore", args = { prototype = k }}
elseif group == nil then
out = out .. frame:expandTemplate{ title = "Uplinkstore", args = { prototype = k }}
end
end
return out
end