From fd70dbf1c4af0345623da4fc0e197dabed97d850 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 14 Jan 2024 06:36:44 +0100 Subject: [PATCH] [MIRROR] [NO GBP] Chem Heater with empty buffers can be refilled again [MDB IGNORE] (#26109) * [NO GBP] Chem Heater with empty buffers can be refilled again (#80934) ## About The Pull Request - Fixes #80933 Should check if beaker has the buffer and not the machine ## Changelog :cl: fix: chem heater with empty buffers can be refilled again /:cl: * [NO GBP] Chem Heater with empty buffers can be refilled again --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> --- code/modules/reagents/chemistry/machinery/chem_heater.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 54b87947ab2..b5a43adb4cb 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -366,12 +366,11 @@ //trying to absorb buffer from currently inserted beaker if(volume < 0) - var/datum/reagent/buffer_reagent = reagents.has_reagent(buffer_type) - if(!buffer_reagent) + if(!beaker.reagents.has_reagent(buffer_type)) var/name = initial(buffer_type.name) say("Unable to find [name] in beaker to draw from! Please insert a beaker containing [name].") return FALSE - beaker.reagents.trans_to(src, (reagents.maximum_volume / 2) - buffer_reagent.volume, target_id = buffer_type) + beaker.reagents.trans_to(src, (reagents.maximum_volume / 2) - reagents.get_reagent_amount(buffer_type), target_id = buffer_type) return TRUE //trying to inject buffer into currently inserted beaker