From f03685393224c6ed65e234fdbd9678f71f94f2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Mon, 5 Oct 2020 00:45:12 -0700 Subject: [PATCH] fixed re-enabling bad weather NPCs even if config option was off --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index 762973d..0616f22 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -223,8 +223,10 @@ this.processNPCs = function(cell) -- LuaFormatter off -- check for bad weather NPCs that have been disabled, and re-enable them - if not common.isEmptyTable(common.runtimeData.movedBadWeatherNPCs) then putNPCsBack(common.runtimeData.movedBadWeatherNPCs) end - if not common.isEmptyTable(common.runtimeData.disabledBadWeatherNPCs) then reEnableNPCs(common.runtimeData.disabledBadWeatherNPCs) end + if config.keepBadWeatherNPCs then + if not common.isEmptyTable(common.runtimeData.movedBadWeatherNPCs) then putNPCsBack(common.runtimeData.movedBadWeatherNPCs) end + if not common.isEmptyTable(common.runtimeData.disabledBadWeatherNPCs) then reEnableNPCs(common.runtimeData.disabledBadWeatherNPCs) end + end elseif night then log(common.logLevels.large, "[PROC] !!Good or bad weather and night!!") -- at night, weather doesn't matter, disable everyone