formatting

This commit is contained in:
Lilian Jónsdóttir 2020-10-10 21:16:05 -07:00
parent 544a596fc5
commit e9de6a384c
3 changed files with 4 additions and 3 deletions

View file

@ -7,7 +7,7 @@ this.version = "0.0.1"
this.modInfo = "Move NPCs to their homes, or public houses (or just disable them), lock doors, " .. this.modInfo = "Move NPCs to their homes, or public houses (or just disable them), lock doors, " ..
"and prevent interaction after hours, selectively disable NPCs in inclement weather" "and prevent interaction after hours, selectively disable NPCs in inclement weather"
this.configPath = "NPCSGOHOME" this.configPath = "NPCSGOHOME"
this.logString = this.modName:gsub("%s?%b()%s?","") this.logString = this.modName:gsub("%s?%b()%s?", "")
-- for config -- for config
this.logLevels = {none = 0, small = 1, medium = 2, large = 3} this.logLevels = {none = 0, small = 1, medium = 2, large = 3}

View file

@ -39,7 +39,8 @@ this.createHomedNPCTableEntry = function(npc, home, startingPlace, isHome, posit
pickedPosition = tes3vector3.new(pos[1], pos[2], pos[3]) pickedPosition = tes3vector3.new(pos[1], pos[2], pos[3])
pickedOrientation = tes3vector3.new(ori[1], ori[2], ori[3]) pickedOrientation = tes3vector3.new(ori[1], ori[2], ori[3])
log(common.logLevels.large, "[DTAB] Settled on position:%s, orientation:%s for %s in %s", pickedPosition, pickedOrientation, npc.object.name, id) log(common.logLevels.large, "[DTAB] Settled on position:%s, orientation:%s for %s in %s",
pickedPosition,pickedOrientation, npc.object.name, id)
local ogPosition = position and (tes3vector3.new(position.x, position.y, position.z)) or local ogPosition = position and (tes3vector3.new(position.x, position.y, position.z)) or
(npc.position and npc.position:copy() or zeroVector:copy()) (npc.position and npc.position:copy() or zeroVector:copy())

View file

@ -74,7 +74,7 @@ this.pickHomeForNPC = function(cell, npc)
for _, str in pairs(contextualNPCs) do if npc.object.id:match(str) then return end end for _, str in pairs(contextualNPCs) do if npc.object.id:match(str) then return end end
-- time to pick the "home" -- time to pick the "home"
local name = npc.object.name:gsub(" the .*$","") -- remove "the whatever" from NPCs name local name = npc.object.name:gsub(" the .*$", "") -- remove "the whatever" from NPCs name
local city = cell.name and common.split(cell.name, ",")[1] or "wilderness" local city = cell.name and common.split(cell.name, ",")[1] or "wilderness"
-- don't need to pick a home if we already have one -- don't need to pick a home if we already have one