1
0
espelhamento de https://github.com/minetest-mods/technic.git sincronizado 2026-01-01 19:35:32 +01:00

Fix radiation protection when armor group is not set (#509)

The radiation damage group can be not set when armor completely
protects against radiation or when no mod has set a default value
for the damage group. We want to apply radiation damage in the
second case but not in the first.
Esse commit está contido em:
coil
2019-12-30 15:02:01 -05:00
commit de SmallJoker
commit da95be53ec

Ver Arquivo

@@ -294,6 +294,8 @@ local function calculate_damage_multiplier(object)
end
if ag.radiation then
return 0.01 * ag.radiation
elseif armor_enabled then
return 0
end
if ag.fleshy then
return math.sqrt(0.01 * ag.fleshy)