From 19940d92eeec732a2e3a0e95f5aec1e09195110f Mon Sep 17 00:00:00 2001 From: shamoanjac Date: Mon, 15 Aug 2016 14:31:03 +0200 Subject: [PATCH] Claiming chunks also lowers the power cap --- factions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/factions.lua b/factions.lua index a6b0a62..08393dd 100644 --- a/factions.lua +++ b/factions.lua @@ -187,6 +187,7 @@ function factions.Faction.claim_parcel(self, parcelpos) factions.parcels[parcelpos] = self.name self.land[parcelpos] = true self:decrease_power(factions.power_per_parcel) + self:decrease_maxpower(factions.power_per_parcel) self:on_claim_parcel(parcelpos) factions.save() end @@ -196,6 +197,7 @@ function factions.Faction.unclaim_parcel(self, parcelpos) factions.parcels[parcelpos] = nil self.land[parcelpos] = nil self:increase_power(factions.power_per_parcel) + self:increase_maxpower(factions.power_per_parcel) self:on_unclaim_parcel(parcelpos) factions.save() end