From e8f4048670494e3269b9dce5b059ee5bccaa3368 Mon Sep 17 00:00:00 2001 From: mazes-80 <1608580+mazes-80@users.noreply.github.com> Date: Tue, 20 Sep 2022 05:46:12 +0200 Subject: [PATCH] lib/trigger: remove unrequired tests --- lib/trigger.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/trigger.lua b/lib/trigger.lua index 68959ef..d3c1091 100644 --- a/lib/trigger.lua +++ b/lib/trigger.lua @@ -93,10 +93,8 @@ function trigger.get_active_effects() local hp = player:get_hp() -- skip weather presets for dead players if hp ~= nil and hp > 0 then - environments[pname] = trigger.get_player_environment(player) - end - local env = environments[pname] - if env ~= nil then + local env = trigger.get_player_environment(player) + environments[pname] = env for wname, wconfig in pairs(climate_mod.weathers) do if is_weather_active(player, wname, env) then if climate_mod.current_weather[pname] == nil then