From 8de7148cdc4c9ccd4f707263a4fa4641af085bea Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 6 Jul 2021 18:54:13 +0100 Subject: [PATCH] lower protector replace time --- admin.lua | 2 +- init.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin.lua b/admin.lua index ad1afce..2a4f1a5 100644 --- a/admin.lua +++ b/admin.lua @@ -69,7 +69,7 @@ minetest.register_chatcommand("protector_replace", { minetest.register_abm({ nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"}, - interval = 8, + interval = 6, chance = 1, catch_up = false, action = function(pos, node) diff --git a/init.lua b/init.lua index f12b424..d0a8f94 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,7 @@ default = default or { node_sound_wood_defaults = function(table) end, gui_bg = "", gui_bg_img = "", - gui_slots = "", + gui_slots = "" } -- Load support for intllib. @@ -374,9 +374,9 @@ function minetest.is_protected(pos, digger) if protector_hurt > 0 and player:get_hp() > 0 then -- This delay fixes item duplication bug (thanks luk3yx) - minetest.after(0.1, function() + minetest.after(0.1, function(player) player:set_hp(player:get_hp() - protector_hurt) - end) + end, player) end -- flip player when protection violated