Revert "Round the total amount to full stack size"
This reverts commit 9dd7fe470f
.
This commit is contained in:
parent
9dd7fe470f
commit
b73bbd323e
|
@ -336,13 +336,9 @@ function unified_inventory.move_match(inv, src_lists, dst_list, match_table, amo
|
||||||
pos_count = pos_count + 1
|
pos_count = pos_count + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local total_amount = bounded_amount * pos_count
|
|
||||||
-- round up to the full stack
|
|
||||||
total_amount = math.ceil(total_amount / stack_max) * stack_max
|
|
||||||
|
|
||||||
local total = ItemStack{
|
local total = ItemStack{
|
||||||
name = item,
|
name = item,
|
||||||
count = total_amount
|
count = bounded_amount * pos_count
|
||||||
}
|
}
|
||||||
|
|
||||||
local removed = unified_inventory.remove_item(inv, src_lists, total)
|
local removed = unified_inventory.remove_item(inv, src_lists, total)
|
||||||
|
|
Loading…
Reference in New Issue