From 8055b4c9da1db21999f9d3ae9c8a3263439b8a78 Mon Sep 17 00:00:00 2001 From: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Date: Thu, 30 Apr 2026 18:22:39 -0700 Subject: [PATCH] hyposprays can draw from containers (#95863) ## About The Pull Request hyposprays can now draw from other containers like a syringe/beaker ## Why It's Good For The Game reduce inventory juggling, make the hypospray slightly less annoying to use vs a syringe ## Changelog :cl: qol: hyposprays can now draw from other reagent containers /:cl: --- .../reagents/reagent_containers/hypospray.dm | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index ef1ee6b85c3..61a9987f172 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -28,6 +28,31 @@ return NONE return inject(interacting_with, user) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING +/obj/item/reagent_containers/hypospray/interact_with_atom_secondary(atom/target, mob/living/user, list/modifiers) + if (!target.reagents) + return NONE + + if(isliving(target)) + to_chat(user, span_warning("[src] can't be used to draw blood!")) + return ITEM_INTERACT_BLOCKING + + if(reagents.holder_full()) + to_chat(user, span_notice("[src] is full.")) + return ITEM_INTERACT_BLOCKING + + if(!target.reagents.total_volume) + to_chat(user, span_warning("[target] is empty!")) + return ITEM_INTERACT_BLOCKING + + if(!target.is_drawable(user)) + to_chat(user, span_warning("You cannot directly remove reagents from [target]!")) + return ITEM_INTERACT_BLOCKING + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, transferred_by = user) + if(trans) + to_chat(user, span_notice("You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.")) + return ITEM_INTERACT_SUCCESS + ///Handles all injection checks, injection and logging. /obj/item/reagent_containers/hypospray/proc/inject(mob/living/affected_mob, mob/user) if(used_up)