diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2015-02-12 09:36:34 +0000 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2015-02-12 09:36:34 +0000 |
commit | ad35ab04cf3139ceb501ad980b9900724b885aa0 (patch) | |
tree | 76bb91054777889613f04111e7d0be6486d6c784 /init.lua | |
parent | e3ffe3de1e666cb7324bb2649c127eeb16ce4837 (diff) |
radius fix
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -minetest.register_privilege("delprotect","Ignore other players protection") +minetest.register_privilege("delprotect","Ignore player protection") protector = {} protector.radius = 5 @@ -45,13 +45,13 @@ end protector.generate_formspec = function(meta) if meta:get_int("page") == nil then meta:set_int("page",0) end - local formspec = "size[8,7]" - .."label[0,0;-- Protector interface --]" + local formspec = "size[8,7]"..default.gui_bg..default.gui_bg_img..default.gui_slots -- Added new formspec defaults + .."label[2.5,0;-- Protector interface --]" .."label[0,1;Punch node to show protected area]" .."label[0,2;Members: (type nick, press Enter to add)]" local members = protector.get_member_list(meta) - local npp = 12 -- was 15, names per page + local npp = 12 local s = 0 local i = 0 for _, member in ipairs(members) do @@ -199,7 +199,7 @@ minetest.register_node("protector:protect", { return end - protector.can_dig(5,pointed_thing.under,user:get_player_name(),false,2) + protector.can_dig(protector.radius,pointed_thing.under,user:get_player_name(),false,2) end, on_rightclick = function(pos, node, clicker, itemstack) @@ -275,7 +275,7 @@ minetest.register_node("protector:protect2", { return end - protector.can_dig(5,pointed_thing.under,user:get_player_name(),false,2) + protector.can_dig(protector.radius,pointed_thing.under,user:get_player_name(),false,2) end, on_rightclick = function(pos, node, clicker, itemstack) |