From 46fc5039f8dc09b5040bf0dcac2f47b3c2e3ee2f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 17 Feb 2021 17:47:07 +0100 Subject: [PATCH] [MIRROR] Fixes reaction chambers eatting beakers, and lets users eject beakers when out of power with alt. (#3464) * Fixes reaction chambers eatting beakers, and lets users eject beakers when out of power with alt. (#56944) Due to an oversight, beakers are eatten on deconstruct, which shouldn't happen. Also allows beakers to be alt clicked out of them to be in line with the dispenser. * Fixes reaction chambers eatting beakers, and lets users eject beakers when out of power with alt. Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com> --- code/modules/reagents/chemistry/machinery/chem_heater.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 17a270ea2f5..3f77c54be76 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -38,6 +38,13 @@ create_reagents(200, NO_REACT)//Lets save some calculations here //TODO: comsig reaction_start and reaction_end to enable/disable the UI autoupdater - this doesn't work presently as there's a hard divide between instant and processed reactions +/obj/machinery/chem_heater/deconstruct(disassembled) + . = ..() + if(beaker && disassembled) + UnregisterSignal(beaker.reagents, COMSIG_REAGENTS_REACTION_STEP) + beaker.forceMove(drop_location()) + beaker = null + /obj/machinery/chem_heater/Destroy() if(beaker) UnregisterSignal(beaker.reagents, COMSIG_REAGENTS_REACTION_STEP) @@ -59,7 +66,7 @@ /obj/machinery/chem_heater/AltClick(mob/living/user) . = ..() - if(!can_interact(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return replace_beaker(user)