don't disable NPCs in bad weather in wilderness cells
This commit is contained in:
parent
97cb4e53cb
commit
0913933286
|
@ -117,15 +117,15 @@ this.putNPCsBack = function()
|
||||||
interop.setRuntimeData(common.runtimeData)
|
interop.setRuntimeData(common.runtimeData)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- todo: this needs to be rewritten
|
||||||
this.processNPCs = function(cell)
|
this.processNPCs = function(cell)
|
||||||
local night = checks.isNight()
|
local night = checks.isNight()
|
||||||
local badWeather = checks.isInclementWeather()
|
local badWeather = cell.name and checks.isInclementWeather() or false -- ignore weather in "Region" cells
|
||||||
|
|
||||||
log(common.logLevels.small, "Looking for NPCs to process in cell:%s", cell.id)
|
log(common.logLevels.small, "Looking for NPCs to process in cell:%s", cell.id)
|
||||||
|
|
||||||
-- iterate NPCs in the cell, move them to their homes, and keep track of moved NPCs so we can move them back later
|
-- iterate NPCs in the cell, move them to their homes, and keep track of moved NPCs so we can move them back later
|
||||||
for npc in cell:iterateReferences(tes3.objectType.npc) do
|
for npc in cell:iterateReferences(tes3.objectType.npc) do
|
||||||
-- for npc, _ in pairs(cellsInMemory[cell].npcs) do
|
|
||||||
if not checks.isIgnoredNPC(npc) then
|
if not checks.isIgnoredNPC(npc) then
|
||||||
-- find NPC homes
|
-- find NPC homes
|
||||||
local npcHome = config.moveNPCs and housing.pickHomeForNPC(cell, npc) or nil
|
local npcHome = config.moveNPCs and housing.pickHomeForNPC(cell, npc) or nil
|
||||||
|
@ -157,7 +157,7 @@ this.processNPCs = function(cell)
|
||||||
-- npc:enable()
|
-- npc:enable()
|
||||||
mwscript.enable({reference = npc})
|
mwscript.enable({reference = npc})
|
||||||
-- tes3.setEnabled({reference = npc, enabled = true})
|
-- tes3.setEnabled({reference = npc, enabled = true})
|
||||||
common.runtimeData.disabledNPCs[npc.id] = false
|
common.runtimeData.disabledNPCs[npc.id] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue