From 9a45990bee6fb2f3dfe346cecfcf0cc1703cf07c Mon Sep 17 00:00:00 2001 From: cheapie Date: Mon, 22 Apr 2024 18:27:04 -0500 Subject: Prevent doors getting stuck open if the server shuts down while open --- controller.lua | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/controller.lua b/controller.lua index 287983e..6e5cd78 100644 --- a/controller.lua +++ b/controller.lua @@ -384,16 +384,9 @@ minetest.register_node("celevator:controller_top_open_running",{ }, }) -function celevator.controller.iscontroller(pos,call2) - local node = minetest.get_node(pos) - if node.name == "ignore" and not call2 then - minetest.forceload_block(pos) - return celevator.controller.iscontroller(pos,true) - elseif node.name == "celevator:controller" or node.name == "celevator:controller_open" then - return true - else - return false - end +function celevator.controller.iscontroller(pos) + local node = celevator.get_node(pos) + return (node.name == "celevator:controller" or node.name == "celevator:controller_open") end function celevator.controller.finddrive(pos) -- cgit v1.2.3