From e5abe10a849f14152e5f5db8d2d9ecf63e3912f0 Mon Sep 17 00:00:00 2001 From: atermonera Date: Sun, 21 Nov 2021 22:16:39 -0800 Subject: [PATCH] Fixes ghost stacks lingering in the fridge --- code/datums/vending/stored_item.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/vending/stored_item.dm b/code/datums/vending/stored_item.dm index d5e9c3cae0..92565a5f46 100644 --- a/code/datums/vending/stored_item.dm +++ b/code/datums/vending/stored_item.dm @@ -90,6 +90,8 @@ for(var/obj/item/stack/T as anything in instances) if(count <= 0) break + if(T.get_amount() <= count) + instances -= T count -= T.transfer_to(S, count) S.forceMove(product_location)