dig anchor when separated from a wall

master
Sumyjkl 2022-08-29 01:29:17 +10:00
parent 350ccdef7e
commit 381a1a0ce4
1 changed files with 5 additions and 1 deletions

View File

@ -103,7 +103,11 @@ minetest.register_node('pmb_rope:rope_anchor', {
use_texture_alpha = "clip",
sounds = pmb_sounds.default_stone(),
climbable = true,
-- _on_node_update = pmb_rope.rope_update,
_on_node_update = function(pos, cause, user, count, payload)
if pmb_util.has_adjacent(pos, "solid") == 0 then
minetest.dig_node(pos)
end
end,
on_place = function(itemstack, placer, pointed_thing)
minetest.rotate_and_place(itemstack, placer, pointed_thing)
end,