don't actually need the reference

This commit is contained in:
Lilian Jónsdóttir 2020-10-04 21:37:05 -07:00
parent 1a7ba84724
commit b11572ed6a

View file

@ -216,7 +216,7 @@ this.isPublicHouse = function(cell)
if faction then
local id = faction.id:lower()
if not npcs.factions[id] then
npcs.factions[id] = {ref = faction, total = 0, percentage = 0}
npcs.factions[id] = {playerJoined = faction.playerJoined, total = 0, percentage = 0}
end
if not npcs.factions[id].master or npcs.factions[id].master.object.factionIndex <
@ -245,13 +245,13 @@ this.isPublicHouse = function(cell)
info.percentage = (info.total / npcs.total) * 100
log(common.logLevels.large,
"[CHECKS] No NPCs of ignored class in %s, checking faction %s (ignored: %s, player joined: %s) with %s (%s%%) vs total %s",
cell.name, faction, config.ignored[faction:lower()], info.ref.playerJoined, info.total, info.percentage, npcs.total)
cell.name, faction, config.ignored[faction:lower()], info.playerJoined, info.total, info.percentage, npcs.total)
-- log(common.logLevels.large, "[CHECKS] ignored or joined:%s, occupants or blades:%s, faction percent:%s", (config.ignored[faction.id:lower()] or faction.playerJoined),
-- (npcs.total >= config.minimumOccupancy or faction == "Blades"), (info.percentage >= config.factionIgnorePercentage))
-- less than configured amount of NPCs can't be a public house unless it's a Blades house
if (config.ignored[faction:lower()] or info.ref.playerJoined) and
if (config.ignored[faction:lower()] or info.playerJoined) and
(npcs.total >= config.minimumOccupancy or faction == "Blades") and
(info.percentage >= config.factionIgnorePercentage) then
log(common.logLevels.medium, "[CHECKS] %s is %s%% faction %s, marking public.", cell.name, info.percentage,