better way of checking for "wilderness"

This commit is contained in:
Lilian Jónsdóttir 2020-11-17 22:21:30 -08:00
parent 249e1125cc
commit 201a59786b

View file

@ -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