From c7dd1727854d7b22ca3c86fdbd19aa50de33b9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Sun, 16 Aug 2020 17:10:55 -0700 Subject: [PATCH] whoops I forgot to do that --- MWSE/mods/celediel/NPCsGoHome/main.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/main.lua b/MWSE/mods/celediel/NPCsGoHome/main.lua index 753c8db..0e87a2c 100644 --- a/MWSE/mods/celediel/NPCsGoHome/main.lua +++ b/MWSE/mods/celediel/NPCsGoHome/main.lua @@ -782,9 +782,16 @@ local function processPets(cell) if isNPCPet(creature) then if checkTime() then -- disable - log(common.logLevels.medium, "Disabling NPC Pet %s!", creature.object.id) + if not creature.disabled then + log(common.logLevels.medium, "Disabling NPC Pet %s!", creature.object.id) + mwscript.disable({reference = creature }) + end else -- enable + if creature.disabled then + log(common.logLevels.medium, "Enabling NPC Pet %s!", creature.object.id) + mwscript.enable({reference = creature }) + end end end end