mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Fix incomplete door destruction code
This fixes doors being destroyed by activating an End portal
This commit is contained in:
parent
62364a65ca
commit
219e6ff146
1 changed files with 4 additions and 4 deletions
|
@ -227,7 +227,7 @@ function mcl_doors:register_door(name, def)
|
||||||
|
|
||||||
after_destruct = function(bottom, oldnode)
|
after_destruct = function(bottom, oldnode)
|
||||||
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
|
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
|
||||||
if minetest.get_node(bottom).name == "air" and minetest.get_node(top).name == name.."_t_1" then
|
if minetest.get_node(bottom).name ~= name.."_b_2" and minetest.get_node(top).name == name.."_t_1" then
|
||||||
minetest.remove_node(top)
|
minetest.remove_node(top)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -274,7 +274,7 @@ function mcl_doors:register_door(name, def)
|
||||||
|
|
||||||
after_destruct = function(top, oldnode)
|
after_destruct = function(top, oldnode)
|
||||||
local bottom = { x = top.x, y = top.y - 1, z = top.z }
|
local bottom = { x = top.x, y = top.y - 1, z = top.z }
|
||||||
if minetest.get_node(top).name == "air" and minetest.get_node(bottom).name == name.."_b_1" and oldnode.name == name.."_t_1" then
|
if minetest.get_node(top).name ~= name.."_t_2" and minetest.get_node(bottom).name == name.."_b_1" and oldnode.name == name.."_t_1" then
|
||||||
minetest.dig_node(bottom)
|
minetest.dig_node(bottom)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -317,7 +317,7 @@ function mcl_doors:register_door(name, def)
|
||||||
|
|
||||||
after_destruct = function(bottom, oldnode)
|
after_destruct = function(bottom, oldnode)
|
||||||
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
|
local top = { x = bottom.x, y = bottom.y + 1, z = bottom.z }
|
||||||
if minetest.get_node(bottom).name == "air" and minetest.get_node(top).name == name.."_t_2" then
|
if minetest.get_node(bottom).name ~= name.."_b_1" and minetest.get_node(top).name == name.."_t_2" then
|
||||||
minetest.remove_node(top)
|
minetest.remove_node(top)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -364,7 +364,7 @@ function mcl_doors:register_door(name, def)
|
||||||
|
|
||||||
after_destruct = function(top, oldnode)
|
after_destruct = function(top, oldnode)
|
||||||
local bottom = { x = top.x, y = top.y - 1, z = top.z }
|
local bottom = { x = top.x, y = top.y - 1, z = top.z }
|
||||||
if minetest.get_node(top).name == "air" and minetest.get_node(bottom).name == name.."_b_2" and oldnode.name == name.."_t_2" then
|
if minetest.get_node(top).name ~= name.."_t_1" and minetest.get_node(bottom).name == name.."_b_2" and oldnode.name == name.."_t_2" then
|
||||||
minetest.dig_node(bottom)
|
minetest.dig_node(bottom)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue