forked from mtcontrib/pipeworks
Merge pull request #169 from DS-Minetest/tube_blast_break
break tubes on blast
This commit is contained in:
commit
c2a288303f
@ -107,7 +107,15 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
|
|||||||
priority = 50
|
priority = 50
|
||||||
},
|
},
|
||||||
after_place_node = pipeworks.after_place,
|
after_place_node = pipeworks.after_place,
|
||||||
after_dig_node = pipeworks.after_dig
|
after_dig_node = pipeworks.after_dig,
|
||||||
|
on_blast = function(pos, intensity)
|
||||||
|
if intensity > 1 + 3^0.5 then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return {string.format("%s_%s", name, dropname)}
|
||||||
|
end
|
||||||
|
minetest.swap_node(pos, {name = "pipeworks:broken_tube_1"})
|
||||||
|
pipeworks.scan_for_tube_objects(pos)
|
||||||
|
end
|
||||||
}
|
}
|
||||||
if style == "6d" then
|
if style == "6d" then
|
||||||
nodedef.paramtype2 = "facedir"
|
nodedef.paramtype2 = "facedir"
|
||||||
|
Loading…
Reference in New Issue
Block a user