From ad35ab04cf3139ceb501ad980b9900724b885aa0 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 12 Feb 2015 09:36:34 +0000 Subject: radius fix --- init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index c887196..d180f6f 100644 --- a/init.lua +++ b/init.lua @@ -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) -- cgit v1.2.3