From 1e810da2d571d79c53afe1aaae60feaaf5a82ce5 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Sun, 5 Dec 2021 11:09:45 -0500 Subject: [PATCH] powder that makes you say yes --- code/modules/food/kitchen/smartfridge/engineering.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/food/kitchen/smartfridge/engineering.dm b/code/modules/food/kitchen/smartfridge/engineering.dm index 2798854537..4f0d2bb9d8 100644 --- a/code/modules/food/kitchen/smartfridge/engineering.dm +++ b/code/modules/food/kitchen/smartfridge/engineering.dm @@ -17,9 +17,11 @@ var/amount = I.get_amount() if(amount < 1) return + + count = min(count, amount) while(count > 0) - var/obj/item/stack/S = I.get_product(get_turf(src), min(count, amount)) + var/obj/item/stack/S = I.get_product(get_turf(src), count) count -= S.get_amount() SStgui.update_uis(src) @@ -27,4 +29,4 @@ for(var/datum/stored_item/stack/I as anything in item_records) if(istype(O, I.item_path)) // Typecheck should evaluate material-specific subtype return I - return null \ No newline at end of file + return null