Модуль: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|image=" .. itemId .. "|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} " .. count .. "}}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "]}}")
end
end
end
end
Строка 48: Строка 48:
if mode == "contraband" and inventory.contrabandInventory then
if mode == "contraband" and 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|image=" .. itemId .. "|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} " .. count .. "}}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "]}}")
end
end
end
end
Строка 55: Строка 55:
if mode == "emag" and inventory.emaggedInventory then
if mode == "emag" and 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|image=" .. itemId .. "|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} " .. count .. "}}")
result = result .. mw.getCurrentFrame():preprocess("{{LinkСard|SideStyle=1|image=" .. itemId .. ".png|name={{#invoke:Entity Lookup|getname|" .. itemId .. "}} [" .. count .. "]}}")
end
end
end
end