tweak collapsing behavior

This commit is contained in:
cora 2022-06-06 17:59:22 +02:00
parent ab9a22d7af
commit 40df7b2b72
1 changed files with 7 additions and 4 deletions

View File

@ -23,6 +23,8 @@ minetest.register_node("mcl_scaffolding:scaffolding", {
is_ground_content = false,
walkable = false,
climbable = true,
physical = true,
node_placement_prediction = "",
groups = { handy=1, axey=1, flammable=3, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20, falling_node = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 0,
@ -67,10 +69,11 @@ minetest.register_node("mcl_scaffolding:scaffolding", {
until cn.name ~= node.name or h >= 32
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local apos = vector.offset(pos,0,1,0)
if oldnode.name == minetest.get_node(apos).name then
minetest.check_for_falling(apos)
end
repeat
minetest.set_node(pos,{name="air"})
minetest.add_item(pos,"mcl_scaffolding:scaffolding")
pos = vector.offset(pos,0,1,0)
until oldnode.name ~= minetest.get_node(pos).name
end,
})