Модуль:Prototypes/Объект/Торгомат: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 34: | Строка 34: | ||
if not inventory or not inventory.startingInventory then return "" end | if not inventory or not inventory.startingInventory then return "" end | ||
-- Формирование вывода | -- Формирование вывода | ||
local result = "== Содержимое автомата ==\n" | local result = "== Содержимое автомата ==\n" | ||
for itemId, count in pairs(inventory.startingInventory) do | for itemId, count in pairs(inventory.startingInventory) do | ||
| Строка 75: | Строка 75: | ||
end | end | ||
-- Формирование вывода | |||
local access = vendingMachine.AccessReader.access | local access = vendingMachine.AccessReader.access | ||
if not access then | if not access then | ||
| Строка 80: | Строка 81: | ||
end | end | ||
-- | -- | ||
local formattedAccess = access | local formattedAccess = access | ||
local result = mw.preprocess("{{#invoke:Prototypes/Механика/Доступ|parse|" .. formattedAccess .. "}}") | |||
return | return result | ||
end | end | ||