|
@ -34,6 +34,7 @@ function creative_regions:update_player(player, initialize) |
|
|
local areas_owner = false |
|
|
local areas_owner = false |
|
|
local areas_guest = false |
|
|
local areas_guest = false |
|
|
local areas_open = false |
|
|
local areas_open = false |
|
|
|
|
|
local areas_faction_open = false |
|
|
local areas_individual_override = false |
|
|
local areas_individual_override = false |
|
|
initialize = initialize or 0 |
|
|
initialize = initialize or 0 |
|
|
|
|
|
|
|
@ -61,6 +62,12 @@ function creative_regions:update_player(player, initialize) |
|
|
areas_owner = true |
|
|
areas_owner = true |
|
|
elseif areas_area.open then |
|
|
elseif areas_area.open then |
|
|
areas_open = true |
|
|
areas_open = true |
|
|
|
|
|
elseif minetest.get_modpath("playerfactions") and areas_area.faction_open then |
|
|
|
|
|
for _, fname in ipairs(areas_area.faction_open or {}) do |
|
|
|
|
|
if factions.player_is_in_faction(fname, name) then |
|
|
|
|
|
areas_faction_open = true |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
else |
|
|
else |
|
|
areas_guest = true |
|
|
areas_guest = true |
|
|
--continue |
|
|
--continue |
|
@ -91,7 +98,7 @@ function creative_regions:update_player(player, initialize) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
-- overwrite |
|
|
-- overwrite |
|
|
if areas_owner or areas_open then |
|
|
if areas_owner or areas_open or areas_faction_open then |
|
|
creative_regions:add_privs_from_string(new_privs_table, areas_interact_privs) |
|
|
creative_regions:add_privs_from_string(new_privs_table, areas_interact_privs) |
|
|
creative_regions:add_privs_from_string(new_privs_table, "-arena") |
|
|
creative_regions:add_privs_from_string(new_privs_table, "-arena") |
|
|
end |
|
|
end |
|
|