Fix cart detector bug

master
Joachim Stolberg 2021-04-25 18:02:10 +02:00
parent a784069777
commit 223a43204b
1 changed files with 5 additions and 2 deletions

View File

@ -21,8 +21,11 @@ local logic = techage.logic
local CYCLE_TIME = 2
local function switch_off(pos)
logic.swap_node(pos, "techage:ta3_cartdetector_off")
logic.send_off(pos, M(pos))
local node = minetest.get_node(pos)
if node.name == "techage:ta3_cartdetector_on" then
logic.swap_node(pos, "techage:ta3_cartdetector_off")
logic.send_off(pos, M(pos))
end
end
local function switch_on(pos)