don't actually need the reference
This commit is contained in:
parent
1a7ba84724
commit
b11572ed6a
|
@ -216,7 +216,7 @@ this.isPublicHouse = function(cell)
|
||||||
if faction then
|
if faction then
|
||||||
local id = faction.id:lower()
|
local id = faction.id:lower()
|
||||||
if not npcs.factions[id] then
|
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
|
end
|
||||||
|
|
||||||
if not npcs.factions[id].master or npcs.factions[id].master.object.factionIndex <
|
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
|
info.percentage = (info.total / npcs.total) * 100
|
||||||
log(common.logLevels.large,
|
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",
|
"[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),
|
-- 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))
|
-- (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
|
-- 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
|
(npcs.total >= config.minimumOccupancy or faction == "Blades") and
|
||||||
(info.percentage >= config.factionIgnorePercentage) then
|
(info.percentage >= config.factionIgnorePercentage) then
|
||||||
log(common.logLevels.medium, "[CHECKS] %s is %s%% faction %s, marking public.", cell.name, info.percentage,
|
log(common.logLevels.medium, "[CHECKS] %s is %s%% faction %s, marking public.", cell.name, info.percentage,
|
||||||
|
|
Loading…
Reference in a new issue