forked from minetest-mods/areas
Allow areas to be optionally open to all other users
In other words, you can retain ownership of an area but disable and re-enable the protection aspect at will, via the area_open chat command. By default, nothing is any different following this commit - all existing areas are protected, as are new ones. But you can do (for example) "area_open 1" and if you're the owner of that area, it's now possible for other users to interact there. "area_open 1" again to toggle the protection back on. Where there are sub-areas, the main owner and ALL sub-area owners at a particulare location must have set the areas to open to disable protection.
This commit is contained in:
committed by
ShadowNinja
parent
a8e5b90aeb
commit
1a5efd07f1
6
hud.lua
6
hud.lua
@ -15,7 +15,11 @@ minetest.register_globalstep(function(dtime)
|
||||
else
|
||||
first = false
|
||||
end
|
||||
areaString = areaString..id.." ("..area.owner..")"
|
||||
local ownertxt = area.owner
|
||||
if area.open then
|
||||
ownertxt = ownertxt.."/open"
|
||||
end
|
||||
areaString = areaString..id.." ("..ownertxt..")"
|
||||
end
|
||||
if not areas.hud[name] then
|
||||
areas.hud[name] = {}
|
||||
|
Reference in New Issue
Block a user