From 3ff6ca909f759574431289b7298476fa79dbf717 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Fri, 17 Sep 2021 18:57:14 +0200 Subject: [PATCH] fix ta4_injector and detector issues --- basic_machines/pusher.lua | 2 +- basic_machines/ta4_injector.lua | 2 +- logic/detector.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basic_machines/pusher.lua b/basic_machines/pusher.lua index 12f177d..9da7d43 100644 --- a/basic_machines/pusher.lua +++ b/basic_machines/pusher.lua @@ -234,7 +234,7 @@ tiles.act = { local tubing = { -- push item through the pusher in opposit direction on_push_item = function(pos, in_dir, stack) - return in_dir == M(pos):get_int("pull_dir") and techage.push_items(pos, in_dir, stack) + return in_dir == M(pos):get_int("pull_dir") and techage.safe_push_items(pos, in_dir, stack) end, is_pusher = true, -- is a pulling/pushing node diff --git a/basic_machines/ta4_injector.lua b/basic_machines/ta4_injector.lua index 86cca3d..919926d 100644 --- a/basic_machines/ta4_injector.lua +++ b/basic_machines/ta4_injector.lua @@ -235,7 +235,7 @@ tiles.act = { local tubing = { -- push item through the injector in opposit direction on_push_item = function(pos, in_dir, stack) - return in_dir == M(pos):get_int("pull_dir") and techage.push_items(pos, in_dir, stack) + return in_dir == M(pos):get_int("pull_dir") and techage.safe_push_items(pos, in_dir, stack) end, is_pusher = true, -- is a pulling/pushing node diff --git a/logic/detector.lua b/logic/detector.lua index ec21a84..d9b9ab0 100644 --- a/logic/detector.lua +++ b/logic/detector.lua @@ -203,7 +203,7 @@ minetest.register_craft({ techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, { on_push_item = function(pos, in_dir, stack) - if techage.push_items(pos, in_dir, stack) then + if techage.safe_push_items(pos, in_dir, stack) then switch_on(pos) return true end @@ -214,7 +214,7 @@ techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, { techage.register_node({"techage:ta4_detector_off", "techage:ta4_detector_on"}, { on_push_item = function(pos, in_dir, stack) - if techage.push_items(pos, in_dir, stack) then + if techage.safe_push_items(pos, in_dir, stack) then switch_on(pos) local nvm = techage.get_nvm(pos) nvm.counter = (nvm.counter or 0) + stack:get_count()