forked from mtcontrib/factions
Fixed disbanding factions not clearing players and chunks tables
This commit is contained in:
parent
b1b84740b1
commit
f67406cd65
@ -136,11 +136,11 @@ function factions.Faction.unclaim_chunk(self, chunkpos)
|
|||||||
factions.save()
|
factions.save()
|
||||||
end
|
end
|
||||||
function factions.Faction.disband(self)
|
function factions.Faction.disband(self)
|
||||||
for i in ipairs(self.players) do -- remove players affiliation
|
for k, _ in pairs(self.players) do -- remove players affiliation
|
||||||
factions.players[self.players[i]] = nil
|
factions.players[k] = nil
|
||||||
end
|
end
|
||||||
for k, v in pairs(self.land) do -- remove chunk claims
|
for k, v in pairs(self.land) do -- remove chunk claims
|
||||||
factions.chunks[v] = nil
|
factions.chunks[k] = nil
|
||||||
end
|
end
|
||||||
self:on_disband()
|
self:on_disband()
|
||||||
factions.factions[self.name] = nil
|
factions.factions[self.name] = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user