From 6a89a9ca834e001dcbffc4e34938153047a83441 Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Thu, 22 Aug 2019 17:29:56 -0400 Subject: [PATCH] Fix radiation protection when armor group is not set 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. --- technic/radiation.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/technic/radiation.lua b/technic/radiation.lua index f0d7f61..4ee63e7 100644 --- a/technic/radiation.lua +++ b/technic/radiation.lua @@ -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)