Browse Source

Let subareas and plots, faction and city not cound towards maximum areas

yl_stable
AliasAlreadyTaken 6 months ago
parent
commit
b050a1e766
  1. 2
      chatcommands.lua
  2. 2
      internal.lua

2
chatcommands.lua

@ -399,7 +399,7 @@ minetest.register_chatcommand("area_info", {
-- Area count
local area_num = 0
for id, area in pairs(areas.areas) do
if area.owner == name then
if area.owner == name and not (area.parent or area.yl_city or area.yl_plot or area.yl_faction) then
area_num = area_num + 1
end
end

2
internal.lua

@ -238,7 +238,7 @@ function areas:canPlayerAddArea(pos1, pos2, name)
-- Check number of areas the user has and make sure it not above the max
local count = 0
for _, area in pairs(self.areas) do
if area.owner == name then
if area.owner == name and not (area.parent or area.yl_city or area.yl_plot or area.yl_faction) then
count = count + 1
end
end

Loading…
Cancel
Save