From 142dee3645ef8f52be25c5292e94e23a7eff4b13 Mon Sep 17 00:00:00 2001 From: shellspeed1 <46614774+shellspeed1@users.noreply.github.com> Date: Mon, 24 Aug 2020 12:47:56 -0700 Subject: [PATCH 1/2] Update iv_drip.dm --- code/game/machinery/iv_drip.dm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index bf71786a05..3720466bcb 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -3,13 +3,14 @@ /obj/machinery/iv_drip name = "\improper IV drip" - desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate." + desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. Alt-Click to change the transfer rate." icon = 'icons/obj/iv_drip.dmi' icon_state = "iv_drip" anchored = FALSE mouse_drag_pointer = MOUSE_ACTIVE_POINTER var/mob/living/carbon/attached var/mode = IV_INJECTING + var/dripfeed = FALSE var/obj/item/reagent_containers/beaker var/static/list/drip_containers = typecacheof(list(/obj/item/reagent_containers/blood, /obj/item/reagent_containers/food, @@ -132,9 +133,11 @@ if(mode) if(beaker.reagents.total_volume) var/transfer_amount = 5 + if (dripfeed) + transfer_amount = 1 if(istype(beaker, /obj/item/reagent_containers/blood)) // speed up transfer on blood packs - transfer_amount = 10 + transfer_amount *= 2 var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages beaker.reagents.trans_to(attached, transfer_amount) @@ -169,6 +172,16 @@ else toggle_mode() +/obj/machinery/iv_drip/AltClick(mob/living/user) + if(!user.canUseTopic(src, be_close=TRUE)) + return + if(dripfeed) + dripfeed = FALSE + to_chat(usr, "You loosen the valve to speed up the [src].") + else + dripfeed = TRUE + to_chat(usr, "You tighten the valve to slowly drip-feed the contents of [src].") + /obj/machinery/iv_drip/attack_robot(mob/user) if(Adjacent(user)) attack_hand(user) From de7ecefad27fafaa4833209fa530c3f35a866207 Mon Sep 17 00:00:00 2001 From: shellspeed1 <46614774+shellspeed1@users.noreply.github.com> Date: Mon, 24 Aug 2020 15:07:40 -0700 Subject: [PATCH 2/2] minor description change --- code/game/machinery/iv_drip.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 3720466bcb..ff6f96a29f 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -240,7 +240,7 @@ /obj/machinery/iv_drip/telescopic name = "telescopic IV drip" - desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down." + desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down.Alt-Click with a beaker attached to change the transfer rate." icon_state = "iv_drip" /obj/machinery/iv_drip/telescopic/update_icon_state()