fixed re-enabling bad weather NPCs even if config option was off
This commit is contained in:
parent
8d1a16c79d
commit
f036853932
|
@ -223,8 +223,10 @@ this.processNPCs = function(cell)
|
||||||
|
|
||||||
-- LuaFormatter off
|
-- LuaFormatter off
|
||||||
-- check for bad weather NPCs that have been disabled, and re-enable them
|
-- 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 config.keepBadWeatherNPCs then
|
||||||
if not common.isEmptyTable(common.runtimeData.disabledBadWeatherNPCs) then reEnableNPCs(common.runtimeData.disabledBadWeatherNPCs) end
|
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
|
elseif night then
|
||||||
log(common.logLevels.large, "[PROC] !!Good or bad weather and night!!")
|
log(common.logLevels.large, "[PROC] !!Good or bad weather and night!!")
|
||||||
-- at night, weather doesn't matter, disable everyone
|
-- at night, weather doesn't matter, disable everyone
|
||||||
|
|
Loading…
Reference in a new issue