From bd7401d8441f268d43e69d157c77400db89c6802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 13 Oct 2020 21:19:42 -0700 Subject: [PATCH] formatting/logging --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 4 ++-- MWSE/mods/celediel/NPCsGoHome/main.lua | 3 ++- MWSE/mods/celediel/NPCsGoHome/mcm.lua | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index 5864ecc..3be794a 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -200,6 +200,8 @@ this.processNPCs = function(cell) local night = checks.isNight() local badWeather = checks.isInclementWeather() + log(common.logLevels.small, "[PROC] Looking for NPCs to process in cell:%s", cell.id) + if not cell.name 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 @@ -208,8 +210,6 @@ this.processNPCs = function(cell) badWeather = false end - log(common.logLevels.small, "[PROC] Looking for NPCs to process in cell:%s", cell.id) - if config.disableNPCs and badWeather and not night then log(common.logLevels.large, "[PROC] !!Bad weather and not night!!") -- bad weather during the day, so disable some NPCs diff --git a/MWSE/mods/celediel/NPCsGoHome/main.lua b/MWSE/mods/celediel/NPCsGoHome/main.lua index 66a40da..fc701d0 100644 --- a/MWSE/mods/celediel/NPCsGoHome/main.lua +++ b/MWSE/mods/celediel/NPCsGoHome/main.lua @@ -27,6 +27,7 @@ local function buildFollowerList() local f = {} -- build our followers list for friend in tes3.iterate(tes3.mobilePlayer.friendlyActors) do + -- todo: check for ignored NPCs if followers list is ever used for anything other than part of checks.ignoredNPC() if friend ~= tes3.mobilePlayer then -- ? why is the player friendly towards the player ? f[friend.object.id] = true log(common.logLevels.large, "[MAIN] %s is follower", friend.object.id) @@ -142,7 +143,7 @@ eventFunctions.onActivated = function(e) if tes3.player.data.NPCsGoHome.intruding and not checks.isIgnoredNPC(npc) then if npc.disposition and npc.disposition <= config.minimumTrespassDisposition then - log(common.logLevels.medium, "Disabling dialogue with %s because trespass and disposition:%s", + log(common.logLevels.medium, "[MAIN] Disabling dialogue with %s because trespass and disposition:%s", npc.object.name, npc.disposition) tes3.messageBox(string.format("%s: Get out before I call the guards!", npc.object.name)) return false diff --git a/MWSE/mods/celediel/NPCsGoHome/mcm.lua b/MWSE/mods/celediel/NPCsGoHome/mcm.lua index e21d64c..dd739fa 100644 --- a/MWSE/mods/celediel/NPCsGoHome/mcm.lua +++ b/MWSE/mods/celediel/NPCsGoHome/mcm.lua @@ -198,7 +198,7 @@ template:createExclusionsPage({ template:createExclusionsPage({ label = "Inclement Weather Classes/Races", description = "Classes and races on this list will not be disabled or moved during configured inclement weather." .. - "All NPCs that offer travel services are ignored during inclement weather regardless of race or class, ".. + "All NPCs that offer travel services are ignored during inclement weather regardless of race or class, " .. "if configured to do so.", showAllBlocked = false, variable = createTableVar("badWeatherClassRace"),