From 5f0ddb211c71ee41781a343a3a2d941606bd8129 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 28 Apr 2024 20:02:22 +0200 Subject: [PATCH] Fix bug with detectors and full chests --- logic/detector.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logic/detector.lua b/logic/detector.lua index d7985ba..52d5155 100644 --- a/logic/detector.lua +++ b/logic/detector.lua @@ -303,7 +303,7 @@ minetest.register_craft({ techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, { on_push_item = function(pos, in_dir, stack) local leftover = techage.safe_push_items(pos, in_dir, stack) - if leftover then + if leftover and (leftover == true or leftover:get_count() ~= stack:get_count()) then local inv = minetest.get_inventory({type = "node", pos = pos}) if not inv or inv:is_empty("cfg") or inv:contains_item("cfg", ItemStack(stack:get_name())) then switch_on(pos) @@ -318,7 +318,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) local leftover = techage.safe_push_items(pos, in_dir, stack) - if leftover then + if leftover and (leftover == true or leftover:get_count() ~= stack:get_count()) then local inv = minetest.get_inventory({type = "node", pos = pos}) if not inv or inv:is_empty("cfg") or inv:contains_item("cfg", ItemStack(stack:get_name())) then local nvm = techage.get_nvm(pos)