From 9f8db0615c4cb7bf68a1e5ac81285727b6d68534 Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Mon, 22 Oct 2018 23:03:11 -0500 Subject: [PATCH] New claim error message. --- chatcommands.lua | 5 ++++- factions.lua | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/chatcommands.lua b/chatcommands.lua index 925a599..3dfed30 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -172,7 +172,10 @@ factions.register_command ("claim", { return true else local parcel_faction = factions.get_parcel_faction(parcelpos) - if not parcel_faction then + if faction.power <= factions_config.power_per_parcel then + send_error(player, "Not enough power.") + return false + elseif not parcel_faction then send_error(player, "Your faction cannot claim any (more) parcel(s).") return false elseif parcel_faction.name == faction.name then diff --git a/factions.lua b/factions.lua index 921ae31..00143b8 100644 --- a/factions.lua +++ b/factions.lua @@ -337,6 +337,7 @@ function factions.Faction.parcelless_check(self) local count = 0 for index, value in pairs(self.land) do count = count + 1 + break end if count > 0 then if self.no_parcel ~= -1 then