Fixing some unwanted hunting behavior with compacting-storage.lua
This commit is contained in:
parent
c949564c4a
commit
1f5ac183a9
1 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue