New claim error message.

This commit is contained in:
Coder12a 2018-10-22 23:03:11 -05:00
parent e2e868b802
commit 9f8db0615c
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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