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

мНет описания правки
мНет описания правки
Строка 41: Строка 41:
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=#d7d7ff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
end
end
if result == "" then
if result == "" then
Строка 51: Строка 51:
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=#d7d7ff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
end
end
end
end
Строка 62: Строка 62:
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=#d7d7ff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|background-color=#cbcbff0b|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "] {{#invoke:Prototypes/Хранилище/Предмет|main|framing|contained|" .. itemId .. "}} }}")
end
end
end
end
Строка 87: Строка 87:
for _, restock in ipairs(restockData) do
for _, restock in ipairs(restockData) do
if restock.canRestock and table.concat(restock.canRestock):find(packId) then
if restock.canRestock and table.concat(restock.canRestock):find(packId) then
return mw.getCurrentFrame():preprocess("{{LinkСard|background-color=#d7d7ff0b|image=" .. restock.id .. ".png|name={{#invoke:Entity Lookup|getname|" .. restock.id .. "}}|link=Торговые автоматы#{{#invoke:Entity Lookup|getname|" .. restock.id .. "}}}}")
return mw.getCurrentFrame():preprocess("{{LinkСard|background-color=#cbcbff0b|image=" .. restock.id .. ".png|name={{#invoke:Entity Lookup|getname|" .. restock.id .. "}}|link=Торговые автоматы#{{#invoke:Entity Lookup|getname|" .. restock.id .. "}}}}")
end
end
end
end