better name for that file

This commit is contained in:
Lilian Jónsdóttir 2020-08-23 22:27:48 -07:00
parent b5906d9675
commit 4ed6648ca8
4 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,7 @@
-- handles logic checks for NPCs, doors, etc.
local common = require("celediel.NPCsGoHome.common")
local config = require("celediel.NPCsGoHome.config").getConfig()
local entry = require("celediel.NPCsGoHome.functions.entry")
local dataTables = require("celediel.NPCsGoHome.functions.dataTables")
-- {{{ local variables and such
-- Canton string matches
@ -204,7 +204,7 @@ this.isPublicHouse = function(cell)
-- if it's a waistworks cell, it's public, with no proprietor
if config.waistWorks == common.waist.public and cell.id:match(waistworks) then
entry.createPublicHouseTableEntry(cell, nil, city, publicHouseName)
dataTables.createPublicHouseTableEntry(cell, nil, city, publicHouseName)
return true
end
@ -216,7 +216,7 @@ this.isPublicHouse = function(cell)
log(common.logLevels.medium, "NPC:\'%s\' of class:\'%s\' made %s public", npc.object.name,
npc.object.class and npc.object.class.id or "none", cell.name)
entry.createPublicHouseTableEntry(cell, npc, city, publicHouseName)
dataTables.createPublicHouseTableEntry(cell, npc, city, publicHouseName)
return true
end
@ -250,7 +250,7 @@ this.isPublicHouse = function(cell)
config.factionIgnorePercentage then
log(common.logLevels.medium, "%s is %s%% faction %s, marking public.", cell.name, info.percentage, faction)
entry.createPublicHouseTableEntry(cell, npcs.factions[faction].master, city, publicHouseName)
dataTables.createPublicHouseTableEntry(cell, npcs.factions[faction].master, city, publicHouseName)
return true
end
end

View file

@ -2,7 +2,7 @@
local common = require("celediel.NPCsGoHome.common")
local config = require("celediel.NPCsGoHome.config").getConfig()
local checks = require("celediel.NPCsGoHome.functions.checks")
local entry = require("celediel.NPCsGoHome.functions.entry")
local dataTables = require("celediel.NPCsGoHome.functions.dataTables")
local function log(level, ...) if config.logLevel >= level then common.log(...) end end
@ -88,10 +88,10 @@ this.pickHomeForNPC = function(cell, npc)
-- essentially, if npc full name, or surname matches the cell name
if dest.id:match(name) or this.livesInManor(dest.name, name) then
if common.runtimeData.homes.byName[name] then -- already have a home, don't create the table entry again
if common.runtimeData.homes.byName[name] then -- already have a home, don't create the table dataTables again
picked = common.runtimeData.homes.byName[name]
else
picked = entry.createHomedNPCTableEntry(npc, dest, cell, true)
picked = dataTables.createHomedNPCTableEntry(npc, dest, cell, true)
end
end
end
@ -102,7 +102,7 @@ this.pickHomeForNPC = function(cell, npc)
log(common.logLevels.medium, "Didn't find a home for %s, trying inns", npc.object.name)
local dest = this.pickPublicHouseForNPC(npc, city)
if dest then picked = entry.createHomedNPCTableEntry(npc, dest, cell, false) end
if dest then picked = dataTables.createHomedNPCTableEntry(npc, dest, cell, false) end
-- if nothing was found, then we'll settle on Canton works cell, if the cell is a Canton
if checks.isCantonCell(cell) then
@ -111,7 +111,7 @@ this.pickHomeForNPC = function(cell, npc)
local canton = table.choice(common.runtimeData.publicHouses[city][common.publicHouseTypes.cantonworks])
log(common.logLevels.medium, "Picking works %s, %s for %s", canton.city, canton.name, npc.object.name)
if canton then picked = entry.createHomedNPCTableEntry(npc, canton.cell, cell, false) end
if canton then picked = dataTables.createHomedNPCTableEntry(npc, canton.cell, cell, false) end
end
end
end

View file

@ -4,7 +4,7 @@ local config = require("celediel.NPCsGoHome.config").getConfig()
local checks = require("celediel.NPCsGoHome.functions.checks")
local interop = require("celediel.NPCsGoHome.interop")
local housing = require("celediel.NPCsGoHome.functions.housing")
local entry = require("celediel.NPCsGoHome.functions.entry")
local dataTables = require("celediel.NPCsGoHome.functions.dataTables")
local function log(level, ...) if config.logLevel >= level then common.log(...) end end
@ -18,7 +18,7 @@ this.checkForMovedNPCs = function(cell)
log(common.logLevels.medium, "Looking for moved NPCs in cell %s", cell.id)
for npc in cell:iterateReferences(tes3.objectType.npc) do
if npc.data and npc.data.NPCsGoHome then
entry.createHomedNPCTableEntry(npc, cell, tes3.getCell(npc.data.NPCsGoHome.cell), true, npc.data.NPCsGoHome.position, npc.data.NPCsGoHome.orientation)
dataTables.createHomedNPCTableEntry(npc, cell, tes3.getCell(npc.data.NPCsGoHome.cell), true, npc.data.NPCsGoHome.position, npc.data.NPCsGoHome.orientation)
end
end
end