diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 23a05df4c643..ecb5540cb8e2 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -47,6 +47,24 @@ /obj/item/weapon/reagent_containers/hypospray/cmo list_reagents = list("tricordrazine" = 30) +/obj/item/weapon/reagent_containers/hypospray/cmo/afterattack(atom/target, mob/user, proximity, params) + if(!proximity) + return + if(istype(target, /obj/item/weapon/reagent_containers/glass)) + if(reagents.total_volume >= reagents.maximum_volume) + to_chat(user, "The hypospray is full.") + return + if(!target.reagents.total_volume) + to_chat(user, "[target] is empty.") + return + + if(!target.is_open_container()) + to_chat(user, "Container is closed.") + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + + to_chat(user, "You fill the syringe with [trans] units of the solution.") /obj/item/weapon/reagent_containers/hypospray/autoinjector name = "inaprovaline autoinjector"