Модуль:Prototypes/Оружия: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 6: | Строка 6: | ||
local lines = {} | local lines = {} | ||
for dmgType, value in pairs(damageTable) do | for dmgType, value in pairs(damageTable) do | ||
table.insert(lines, " | table.insert(lines, "{{ColorPalette|Damage|" .. dmgType .. "|" .. value .. "}} {{#invoke:Ftl|main|translation|damage-type-" .. dmgType .. "}}") | ||
end | end | ||
return table.concat(lines) | return table.concat(lines) | ||
| Строка 41: | Строка 41: | ||
(entry.DamageOtherOnHit and entry.DamageOtherOnHit.damage and entry.DamageOtherOnHit.damage.types) | (entry.DamageOtherOnHit and entry.DamageOtherOnHit.damage and entry.DamageOtherOnHit.damage.types) | ||
local result = "В одной руке:" .. "< | local result = "В одной руке:" .. "<br>" .. formatDamageList(oneHandDamage) | ||
if additionalDamage then | if additionalDamage then | ||
| Строка 51: | Строка 51: | ||
twoHandDamage[dmgType] = (twoHandDamage[dmgType] or 0) + addValue | twoHandDamage[dmgType] = (twoHandDamage[dmgType] or 0) + addValue | ||
end | end | ||
result = result .. "В двух руках:" .. "< | result = result .. "В двух руках:" .. "<br>" .. formatDamageList(twoHandDamage) | ||
end | end | ||
local attackRate = melee.attackRate or 1 | local attackRate = melee.attackRate or 1 | ||
result = result .. "Скорость атаки:" .. " | result = result .. "Скорость атаки:" .. "{{ColorPalette|Weapon|attackRate|" .. tostring(attackRate) .. "}}<br>" | ||
return frame:preprocess(result) | return frame:preprocess(result) | ||
| Строка 65: | Строка 65: | ||
local attackRate = melee.attackRate or 1 | local attackRate = melee.attackRate or 1 | ||
return frame:preprocess(" | return frame:preprocess("{{ColorPalette|Weapon|attackRate|" .. tostring(attackRate) .. "}}<br>") | ||
else | else | ||
return "Неверный режим: " .. tostring(mode) | return "Неверный режим: " .. tostring(mode) | ||