lower protector replace time

This commit is contained in:
tenplus1 2021-07-06 18:54:13 +01:00
parent be364009c2
commit 8de7148cdc
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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