Prevent doors getting stuck open if the server shuts down while open
This commit is contained in:
parent
e29d179464
commit
9a45990bee
@ -384,16 +384,9 @@ minetest.register_node("celevator:controller_top_open_running",{
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
function celevator.controller.iscontroller(pos,call2)
|
function celevator.controller.iscontroller(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = celevator.get_node(pos)
|
||||||
if node.name == "ignore" and not call2 then
|
return (node.name == "celevator:controller" or node.name == "celevator:controller_open")
|
||||||
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
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function celevator.controller.finddrive(pos)
|
function celevator.controller.finddrive(pos)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user