Модуль:Prototypes/Объект/Торгомат: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 36: | Строка 36: | ||
if mode == "inventory" and inventory.startingInventory then | if mode == "inventory" and inventory.startingInventory then | ||
for itemId, count in pairs(inventory.startingInventory) do | for itemId, count in pairs(inventory.startingInventory) do | ||
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=# | result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0a|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}") | ||
end | end | ||
if result == "" then | if result == "" then | ||
| Строка 46: | Строка 46: | ||
if inventory.contrabandInventory then | if inventory.contrabandInventory then | ||
for itemId, count in pairs(inventory.contrabandInventory) do | for itemId, count in pairs(inventory.contrabandInventory) do | ||
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=# | result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0a|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}") | ||
end | end | ||
end | end | ||
| Строка 57: | Строка 57: | ||
if inventory.emaggedInventory then | if inventory.emaggedInventory then | ||
for itemId, count in pairs(inventory.emaggedInventory) do | for itemId, count in pairs(inventory.emaggedInventory) do | ||
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=# | result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0a|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}") | ||
end | end | ||
end | end | ||
| Строка 81: | Строка 81: | ||
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("{{LinkСard|background-color=# | return mw.getCurrentFrame():preprocess("{{LinkСard|background-color=#cbcbff0a|image=" .. restock.id .. ".png|name={{#invoke:Entity Lookup|getname|" .. restock.id .. "}}|link=Торговые автоматы#{{#invoke:Entity Lookup|getname|" .. restock.id .. "}}}}") | ||
end | end | ||
end | end | ||