From 1a5efd07f1360059e70b450734c9a6df0a2f46ca Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Fri, 7 Feb 2014 18:05:23 +0000 Subject: 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. --- api.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api.lua') diff --git a/api.lua b/api.lua index 95a3987..a83120d 100644 --- a/api.lua +++ b/api.lua @@ -24,7 +24,9 @@ function areas:canInteract(pos, name) if area.owner == name then return true else - owned = true + if not area.open then + owned = true + end end end return not owned -- cgit v1.2.3