Модуль:Meals Lookup
Материал из Space Station 14 Вики
Для документации этого модуля может быть создана страница Модуль:Meals Lookup/doc
local prototypes = mw.loadData("Module:Meals Lookup/data")
local p = {}
p.meals = prototypes.meals
function p.getrecipesfromtype(frame) -- {{#invoke:Meals Lookup|getrecipesfromtype|ProtoID}}
local out = ""
return out
end
function p.buildrecipebox(frame)
local out = ""
return out
end
function p.getrecipetype(frame, id)
local out = nil
for type, recipes in pairs(p.meals) do
for recipeId, recipe in pairs(recipes) do
if (recipeId == id) or (recipe["id"] == id) then
out = type
break
end
end
if out ~= nil then
break
end
end
return out
end
function p.tests(frame)
local out = ""
out = p.getrecipetype(frame, frame.arg[1])
return out
end
return p