lower protector replace time
This commit is contained in:
parent
be364009c2
commit
8de7148cdc
@ -69,7 +69,7 @@ minetest.register_chatcommand("protector_replace", {
|
|||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"},
|
nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"},
|
||||||
interval = 8,
|
interval = 6,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
catch_up = false,
|
catch_up = false,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
6
init.lua
6
init.lua
@ -5,7 +5,7 @@ default = default or {
|
|||||||
node_sound_wood_defaults = function(table) end,
|
node_sound_wood_defaults = function(table) end,
|
||||||
gui_bg = "",
|
gui_bg = "",
|
||||||
gui_bg_img = "",
|
gui_bg_img = "",
|
||||||
gui_slots = "",
|
gui_slots = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Load support for intllib.
|
-- Load support for intllib.
|
||||||
@ -374,9 +374,9 @@ function minetest.is_protected(pos, digger)
|
|||||||
if protector_hurt > 0 and player:get_hp() > 0 then
|
if protector_hurt > 0 and player:get_hp() > 0 then
|
||||||
|
|
||||||
-- This delay fixes item duplication bug (thanks luk3yx)
|
-- 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)
|
player:set_hp(player:get_hp() - protector_hurt)
|
||||||
end)
|
end, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- flip player when protection violated
|
-- flip player when protection violated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user