Модуль:tableofchemicals

Вернуться

Строка 197: Строка 197:
local actions = {}
local actions = {}
-- Температура
local minMaxTemplate = "выше %sК и ниже %sК"
local minTemplate = "выше %sК"
local maxTemplate = "ниже %sК"
local hasMin = reactPrototype.minTemp ~= 0
local hasMax = reactPrototype.hasMax
local tempString = ""
if hasMax and hasMin then
tempString = string.format(minMaxTemplate, reactPrototype.minTemp, reactPrototype.maxTemp)
elseif hasMin then
tempString = string.format(minTemplate, reactPrototype.minTemp)
elseif hasMax then
tempString = string.format(maxTemplate, reactPrototype.maxTemp)
end
for _, mixingCategory in pairs(reactPrototype.mixingCategories) do
for _, mixingCategory in pairs(reactPrototype.mixingCategories) do
Строка 221: Строка 204:
end
end
table.insert(actions, mixingCategory.name .. " " .. tempString) -- Название
table.insert(actions, mixingCategory.name) -- Название
end
-- Добавление minTemp снизу
if reactPrototype.minTemp and reactPrototype.minTemp ~= 0 then
table.insert(actions, string.format("minTemp: %dК", reactPrototype.minTemp))
end
end