Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 49: | Строка 49: | ||
if contents then | if contents then | ||
for _, content in ipairs(contents) do | for _, content in ipairs(contents) do | ||
result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', | result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}%s }}', child.id, child.id, child.amount and string.format(" [%d]", child.amount) or "") | ||
end | end | ||
elseif tableContainer then | elseif tableContainer then | ||
| Строка 60: | Строка 60: | ||
if children then | if children then | ||
for _, child in ipairs(children) do | for _, child in ipairs(children) do | ||
result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', child.id, child.id) | result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}%s }}', child.id, child.id, child.amount and string.format(" [%d]", child.amount) or "") | ||
end | end | ||
else | else | ||