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, is_ground_content = false,
walkable = false, walkable = false,
climbable = true, 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 }, 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(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
@ -67,10 +69,11 @@ minetest.register_node("mcl_scaffolding:scaffolding", {
until cn.name ~= node.name or h >= 32 until cn.name ~= node.name or h >= 32
end, end,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
local apos = vector.offset(pos,0,1,0) repeat
if oldnode.name == minetest.get_node(apos).name then minetest.set_node(pos,{name="air"})
minetest.check_for_falling(apos) minetest.add_item(pos,"mcl_scaffolding:scaffolding")
end pos = vector.offset(pos,0,1,0)
until oldnode.name ~= minetest.get_node(pos).name
end, end,
}) })