Fixing some unwanted hunting behavior with compacting-storage.lua

This commit is contained in:
Emerson Rosen-Jones 2025-09-15 20:15:11 -04:00
parent c949564c4a
commit 1f5ac183a9

View file

@ -128,10 +128,16 @@ function should_fill (type, counts)
fill_dest = form
amount_needed = diff
end
else
-- if the source is higher priority and using it would put it under
-- the fill limit, don't use it as a source
if fill_dest == nil and diff > -AMOUNT_USED then
-- do nothing
else
fill_src = form
amount_spare = counts[form]
end
end
if fill_src ~= nil and fill_dest ~= nil then break end
end
local amount_to_use = nil