Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 68: | Строка 68: | ||
end | end | ||
local id = content.id or content | local id = content.id or content | ||
local name = string.format('{{#invoke:Entity Lookup|getname|%s}}', id) | local name = string.format('{{#invoke:Entity Lookup|getname|%s}}', id) | ||
local image = string.format('%s.png', id) | local image = string.format('%s.png', id) | ||
local amount = | |||
local amountNumber = 1 | |||
if content.amount then | |||
if type(content.amount) == "table" then | |||
amountNumber = content.amount.value or 1 | |||
else | |||
amountNumber = content.amount | |||
end | |||
end | |||
local amount = (amountNumber and amountNumber ~= 1) and string.format(" [%d]", amountNumber) or "" | |||
local prob = "" | local prob = "" | ||