forked from mtcontrib/homedecor_modpack
prevent crash if screwdriver was able to rotate a part of bed, pool table,
or desk. (really anything that is a side-by-side object).
This commit is contained in:
parent
e5ec7c88e8
commit
365247b7c3
@ -352,6 +352,7 @@ minetest.register_node("homedecor:bed_blue_foot", {
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bed_blue_head" then
|
||||
minetest.remove_node(pos2)
|
||||
|
@ -803,6 +803,7 @@ minetest.register_node("homedecor:pool_table", {
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:pool_table2" then
|
||||
minetest.remove_node(pos2)
|
||||
|
@ -473,6 +473,7 @@ minetest.register_node("homedecor:desk", {
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + fdir_to_right[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:desk_r" then
|
||||
minetest.remove_node(pos2)
|
||||
|
Loading…
Reference in New Issue
Block a user