Модуль:Prototypes/Объект/Торгомат: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 21: | Строка 21: | ||
local result = "" | local result = "" | ||
for itemId, count in pairs(inventoryData) do | for itemId, count in pairs(inventoryData) do | ||
result = result .. mw.getCurrentFrame():preprocess("{{#invoke: | result = result .. mw.getCurrentFrame():preprocess("{{#invoke:Предмет|main|" .. itemId .. "|[" .. count .. "]|repository=|wrapper=}}") | ||
end | end | ||
return result ~= "" and result or "Инвентарь пуст." | return result ~= "" and result or "Инвентарь пуст." | ||
| Строка 59: | Строка 59: | ||
for _, restockPack in ipairs(restock.canRestock) do | for _, restockPack in ipairs(restock.canRestock) do | ||
if restockPack == packId then | if restockPack == packId then | ||
return mw.getCurrentFrame():preprocess(" | return mw.getCurrentFrame():preprocess("{{#invoke:Предмет|main|" .. restock.id .. "|link=Торговые автоматы#{{#invoke:Entity Lookup|getname|" .. restock.id .. "}}|size=64px|label=|repository=|wrapper=}}") | ||
end | end | ||
end | end | ||