forked from mtcontrib/factions
Claiming chunks also lowers the power cap
This commit is contained in:
parent
ad985c681d
commit
19940d92ee
@ -187,6 +187,7 @@ function factions.Faction.claim_parcel(self, parcelpos)
|
|||||||
factions.parcels[parcelpos] = self.name
|
factions.parcels[parcelpos] = self.name
|
||||||
self.land[parcelpos] = true
|
self.land[parcelpos] = true
|
||||||
self:decrease_power(factions.power_per_parcel)
|
self:decrease_power(factions.power_per_parcel)
|
||||||
|
self:decrease_maxpower(factions.power_per_parcel)
|
||||||
self:on_claim_parcel(parcelpos)
|
self:on_claim_parcel(parcelpos)
|
||||||
factions.save()
|
factions.save()
|
||||||
end
|
end
|
||||||
@ -196,6 +197,7 @@ function factions.Faction.unclaim_parcel(self, parcelpos)
|
|||||||
factions.parcels[parcelpos] = nil
|
factions.parcels[parcelpos] = nil
|
||||||
self.land[parcelpos] = nil
|
self.land[parcelpos] = nil
|
||||||
self:increase_power(factions.power_per_parcel)
|
self:increase_power(factions.power_per_parcel)
|
||||||
|
self:increase_maxpower(factions.power_per_parcel)
|
||||||
self:on_unclaim_parcel(parcelpos)
|
self:on_unclaim_parcel(parcelpos)
|
||||||
factions.save()
|
factions.save()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user