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
|
|
@ -129,8 +129,14 @@ function should_fill (type, counts)
|
||||||
amount_needed = diff
|
amount_needed = diff
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
fill_src = form
|
-- if the source is higher priority and using it would put it under
|
||||||
amount_spare = counts[form]
|
-- 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
|
end
|
||||||
if fill_src ~= nil and fill_dest ~= nil then break end
|
if fill_src ~= nil and fill_dest ~= nil then break end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue