1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-03 00:20:39 +02:00

add a second depend

This commit is contained in:
khonkhortisan
2014-04-17 10:45:24 -07:00
parent df159efcee
commit 1d71e602b8
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
worldedit

View File

@ -13,7 +13,7 @@ end)
--privs={worldedit=true [, server=true]} --privs={worldedit=true [, server=true]}
--privs={worldedit=worldedit.priv() [, server=true]} --privs={worldedit=worldedit.priv() [, server=true]}
--instead, I had to wrap the rest of func = . --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 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, --no protection mod, or not the kind of world where people can just create nodes out of thin air,
--worldedit privilege means editing anywhere --worldedit privilege means editing anywhere
@ -32,7 +32,7 @@ end
--this is... within chatcommands that actually change land --this is... within chatcommands that actually change land
--(should be the same functions as safe_region) --(should be the same functions as safe_region)
--also check for permission when region is set? --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 --old you-can-worldedit-everything behaviour
if not PROTECTION_MOD_EXISTS then if not PROTECTION_MOD_EXISTS then
--then if you were able to run this command, then you have the worldedit privilege. --then if you were able to run this command, then you have the worldedit privilege.