From 1d71e602b860d273b3c4f20febc4c0c3970cc6e9 Mon Sep 17 00:00:00 2001 From: khonkhortisan Date: Thu, 17 Apr 2014 10:45:24 -0700 Subject: [PATCH] add a second depend --- worldedit_protection/depends.txt | 1 + worldedit_protection/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 worldedit_protection/depends.txt diff --git a/worldedit_protection/depends.txt b/worldedit_protection/depends.txt new file mode 100644 index 0000000..74054c6 --- /dev/null +++ b/worldedit_protection/depends.txt @@ -0,0 +1 @@ +worldedit diff --git a/worldedit_protection/init.lua b/worldedit_protection/init.lua index cb9eb62..19cf0a2 100644 --- a/worldedit_protection/init.lua +++ b/worldedit_protection/init.lua @@ -13,7 +13,7 @@ end) --privs={worldedit=true [, server=true]} --privs={worldedit=worldedit.priv() [, server=true]} --instead, I had to wrap the rest of func = . -function worldedit.privs(func) +worldedit.privs = function(func) if not minetest.setting_getbool("creative_mode") or not PROTECTION_MOD_EXISTS then --no protection mod, or not the kind of world where people can just create nodes out of thin air, --worldedit privilege means editing anywhere @@ -32,7 +32,7 @@ end --this is... within chatcommands that actually change land --(should be the same functions as safe_region) --also check for permission when region is set? -function worldedit.can_edit_volume(name, pos1, pos2) +worldedit.can_edit_volume = function(name, pos1, pos2) --old you-can-worldedit-everything behaviour if not PROTECTION_MOD_EXISTS then --then if you were able to run this command, then you have the worldedit privilege.