formatting/logging

This commit is contained in:
Lilian Jónsdóttir 2020-10-13 21:19:42 -07:00
parent 05c87c125a
commit bd7401d844
3 changed files with 5 additions and 4 deletions

View file

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

View file

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

View file

@ -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"),