forked from mtcontrib/factions
New claim error message.
This commit is contained in:
parent
e2e868b802
commit
9f8db0615c
|
@ -172,7 +172,10 @@ factions.register_command ("claim", {
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
local parcel_faction = factions.get_parcel_faction(parcelpos)
|
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).")
|
send_error(player, "Your faction cannot claim any (more) parcel(s).")
|
||||||
return false
|
return false
|
||||||
elseif parcel_faction.name == faction.name then
|
elseif parcel_faction.name == faction.name then
|
||||||
|
|
|
@ -337,6 +337,7 @@ function factions.Faction.parcelless_check(self)
|
||||||
local count = 0
|
local count = 0
|
||||||
for index, value in pairs(self.land) do
|
for index, value in pairs(self.land) do
|
||||||
count = count + 1
|
count = count + 1
|
||||||
|
break
|
||||||
end
|
end
|
||||||
if count > 0 then
|
if count > 0 then
|
||||||
if self.no_parcel ~= -1 then
|
if self.no_parcel ~= -1 then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user