mirror of
https://notabug.org/TenPlus1/protector.git
synced 2024-12-05 03:33:48 +01:00
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({
|
||||
nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"},
|
||||
interval = 8,
|
||||
interval = 6,
|
||||
chance = 1,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
|
6
init.lua
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user