From b73bbd323e99afe5481defb7833a4ecc1db744b5 Mon Sep 17 00:00:00 2001 From: Andrey Kozlovskiy Date: Thu, 17 Oct 2019 15:03:26 +0300 Subject: [PATCH] Revert "Round the total amount to full stack size" This reverts commit 9dd7fe470f2f8379bae343fdf9780e7cd04386e1. --- match_craft.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/match_craft.lua b/match_craft.lua index 0adc95e..2d43934 100644 --- a/match_craft.lua +++ b/match_craft.lua @@ -336,13 +336,9 @@ function unified_inventory.move_match(inv, src_lists, dst_list, match_table, amo pos_count = pos_count + 1 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{ name = item, - count = total_amount + count = bounded_amount * pos_count } local removed = unified_inventory.remove_item(inv, src_lists, total)