From 6a0f0b6560ba8af1e25ae0ca3bb20a15548f02f8 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 1 Aug 2021 20:25:13 +0200 Subject: [PATCH] Change the HP distributor so that partial stacks can also be moved --- tubelib_addons3/distributor.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tubelib_addons3/distributor.lua b/tubelib_addons3/distributor.lua index c5af2a4..eb5ee71 100644 --- a/tubelib_addons3/distributor.lua +++ b/tubelib_addons3/distributor.lua @@ -244,6 +244,12 @@ local function distributing(pos, meta) rearrange_table(kvFilterItemNames[name]) busy = true break + elseif num ~= stack:get_count() then + local color = Side2Color[side] + counter[color] = counter[color] + stack:get_count() + rearrange_table(kvFilterItemNames[name]) + busy = true + break end end @@ -257,6 +263,10 @@ local function distributing(pos, meta) counter[color] = counter[color] + num busy = true end + elseif num ~= stack:get_count() then + local color = Side2Color[side] + counter[color] = counter[color] + stack:get_count() + busy = true end end end