From 4ed6648ca891d04d90eff420b6d87e1e34eac63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Sun, 23 Aug 2020 22:27:48 -0700 Subject: [PATCH] better name for that file --- MWSE/mods/celediel/NPCsGoHome/functions/checks.lua | 8 ++++---- .../NPCsGoHome/functions/{entry.lua => dataTables.lua} | 0 MWSE/mods/celediel/NPCsGoHome/functions/housing.lua | 10 +++++----- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) rename MWSE/mods/celediel/NPCsGoHome/functions/{entry.lua => dataTables.lua} (100%) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/checks.lua b/MWSE/mods/celediel/NPCsGoHome/functions/checks.lua index 7804b95..edc18df 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/checks.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/checks.lua @@ -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 diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/entry.lua b/MWSE/mods/celediel/NPCsGoHome/functions/dataTables.lua similarity index 100% rename from MWSE/mods/celediel/NPCsGoHome/functions/entry.lua rename to MWSE/mods/celediel/NPCsGoHome/functions/dataTables.lua diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/housing.lua b/MWSE/mods/celediel/NPCsGoHome/functions/housing.lua index a1d9707..8db26d0 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/housing.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/housing.lua @@ -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 diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index 6c12d6d..788c9dc 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -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