fixed interaction config option only being updated on cell change
This commit is contained in:
parent
6f4d0792ab
commit
efc88eddb2
|
@ -26,4 +26,13 @@ this.inspect = function(thing)
|
|||
this.log(inspect(thing))
|
||||
end
|
||||
|
||||
this.vowel = function(str)
|
||||
local s = string.sub(str, 1, 1)
|
||||
local n = ""
|
||||
|
||||
if string.match(s, "[AOEUIaoeui]") then n = "n" end
|
||||
|
||||
return n
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
|
@ -686,7 +686,7 @@ local function updatePlayerTrespass(cell)
|
|||
cell = cell or tes3.getPlayerCell()
|
||||
|
||||
if checkInteriorCell(cell) and not isIgnoredCell(cell) and not isPublicHouse(cell) then
|
||||
if config.disableInteraction and checkTime() then
|
||||
if checkTime() then
|
||||
tes3.player.data.NPCsGoHome.intruding = true
|
||||
else
|
||||
tes3.player.data.NPCsGoHome.intruding = false
|
||||
|
@ -701,7 +701,11 @@ end
|
|||
|
||||
-- {{{ event functions
|
||||
local function onActivated(e)
|
||||
if e.activator ~= tes3.player or e.target.object.objectType ~= tes3.objectType.npc then return end
|
||||
if e.activator ~= tes3.player or
|
||||
e.target.object.objectType ~= tes3.objectType.npc or
|
||||
not config.disableInteraction then
|
||||
return
|
||||
end
|
||||
|
||||
if tes3.player.data.NPCsGoHome.intruding and not isIgnoredNPC(e.target) then
|
||||
tes3.messageBox(string.format("%s: Get out before I call the guards!", e.target.object.name))
|
||||
|
|
Loading…
Reference in a new issue