Модуль:Песочница/Pok: различия между версиями

мНет описания правки
мНет описания правки
Строка 47: Строка 47:
local protExplosion = formatPercentage(itemData and itemData.ExplosionResistance and itemData.ExplosionResistance.damageCoefficient)
local protExplosion = formatPercentage(itemData and itemData.ExplosionResistance and itemData.ExplosionResistance.damageCoefficient)


-- Получаем значения sprintModifier, walkModifier, fireProtection, и temperatureProtection
-- Получаем значения sprintModifier, walkModifier, fireProtection
local sprintModifier = itemData and itemData.sprintModifier
local sprintModifier = itemData and itemData.sprintModifier
local walkModifier = itemData and itemData.walkModifier
local walkModifier = itemData and itemData.walkModifier
local fireProtection = itemData and itemData.FireProtection and itemData.FireProtection.reduction
local fireProtection = itemData and itemData.FireProtection and itemData.FireProtection.reduction
local temperatureProtection = itemData and itemData.TemperatureProtection
local speedDescription = ""
local speedDescription = ""


Строка 69: Строка 68:
local fireProtectionDescription = fireProtection and  
local fireProtectionDescription = fireProtection and  
"* Имеет огневую защиту в <span style=\"color:OrangeRed\">'''" .. round((1 - fireProtection) * 100) .. " %'''</span>\n" or ""
"* Имеет огневую защиту в <span style=\"color:OrangeRed\">'''" .. round((1 - fireProtection) * 100) .. " %'''</span>\n" or ""
-- Формируем сообщение для сопротивления к критическим температурам, если значение присутствует
--local temperatureProtectionDescription = temperatureProtection and
-- "* Имеет значительное сопротивление к критическим температурам\n" or ""


-- Описание и местоположение
-- Описание и местоположение
local description = (frame.args.description or "") .. '\n' .. speedDescription .. fireProtectionDescription .. temperatureProtectionDescription -- Описание
local description = (frame.args.description or "") .. '\n' .. speedDescription .. fireProtectionDescription -- Описание
local location = frame.args.location or "" -- Местонахождение
local location = frame.args.location or "" -- Местонахождение
local created = frame.args.created or "" -- Создание
local created = frame.args.created or "" -- Создание