From 02c8f4a4cb236a574a4d5961961481e38683f0b7 Mon Sep 17 00:00:00 2001 From: tour <129965577+a-tour-ist@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:26:32 +0100 Subject: [PATCH] use get_buildable_to() Co-authored-by: SmallJoker --- gate_functions.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gate_functions.lua b/gate_functions.lua index 444f271..484db57 100644 --- a/gate_functions.lua +++ b/gate_functions.lua @@ -291,9 +291,7 @@ local get_door_layout = function(pos, facedir, player) if not vector.equals(door_node.pos, origin) then -- There's no obstruction if the node is literally located along the rotation axis local newpos = rotate_pos_displaced(door_node.pos, origin, axis, direction) - local newnode = minetest.get_node(newpos) - local newdef = minetest.registered_nodes[newnode.name] - if not (newdef and newdef.buildable_to) then + if get_buildable_to(newpos) then -- check if the destination node is free. door.swings[direction] = false break