Модуль:Prototypes/Объект/Торгомат: различия между версиями

мНет описания правки
мНет описания правки
 
Строка 56: Строка 56:


for _, restock in ipairs(restockData) do
for _, restock in ipairs(restockData) do
    if restock.canRestock then
    local restockInfo = restock.VendingMachineRestock
        for _, restockPack in ipairs(restock.canRestock) do
    if restockInfo and restockInfo.canRestock then
        for _, restockPack in ipairs(restockInfo.canRestock) do
            if restockPack == packId then
            if restockPack == packId then
                return mw.getCurrentFrame():preprocess("{{#invoke:Предмет|main|" .. restock.id .. "|size=64px|link=|label=|repository=|wrapper=}}")
                return mw.getCurrentFrame():preprocess("{{Предмет|" .. restock.id .. "|size=64px|link=|repository=|wrapper=}}")
            end
            end
        end
        end