From 201a59786bceede8cca62a5ff88909efc74b50f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 17 Nov 2020 22:21:30 -0800 Subject: [PATCH] better way of checking for "wilderness" --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index bc55675..9d31096 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -246,7 +246,7 @@ this.processNPCs = function(cell) local night = checks.isNight() local badWeather = checks.isInclementWeather() - if not cell.name and not config.disableNPCsInWilderness then + if not cell.restingIsIllegal and not config.disableNPCsInWilderness then -- shitty way of implementing this config option and re-enabling NPCs when it gets turned off -- but at least it's better than trying to keep track of NPCs that have been disabled in the wilderness log(common.logLevels.medium, "[PROC:NPCS] Shitty hack ACTIVATE! It's now not night, and the weather is great.") @@ -318,7 +318,7 @@ this.processPets = function(cell) log(common.logLevels.small, "[PROC:PETS] Looking for NPC pets to process in cell:%s", cell.id) - if not cell.name and not config.disableNPCsInWilderness then + if not cell.restingIsIllegal and not config.disableNPCsInWilderness then log(common.logLevels.medium, "[PROC:PETS] Shitty hack ACTIVATE! It's now not night, and the weather is great.") night = false badWeather = false