Files
3a54507ee7 Gives the automated IV an output pipe and lets you rotate it (#94058)
## About The Pull Request

Plumbing IV drip now has an input and an output, the input only works
when it's injecting and the output only works when it's draining.
You can rotate with it alt click like all other plumbing things now, IV
drip hotkeys removed

## Why It's Good For The Game

It's an *automated* IV drip, the whole point is you can connect it to
plumbing and having half it's functionality just not work is bad.
As for the rotation it's waaaaaay more useful than the IV hotkeys for
plumbing.

## Changelog
🆑 Cat
qol: The plumbing IV drip can be rotate with alt click now
add: The plumbing IV drip can now output chemicals into plumbing
factories
/🆑

fixes #93586

---------

Co-authored-by: John Doe <markkavalerov87@gmail.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2025-11-29 20:02:00 +01:00

46 lines
1.7 KiB
Plaintext

///modified IV that can be anchored and takes plumbing in- and output
/obj/machinery/iv_drip/plumbing
name = "automated IV drip"
desc = "A modified IV drip with plumbing connects. Reagents received from the connect are injected directly into their bloodstream, blood that is drawn goes to the internal storage and then into the ducting."
icon_state = "plumb"
base_icon_state = "plumb"
density = TRUE
use_internal_storage = TRUE
processing_flags = START_PROCESSING_MANUALLY
/obj/machinery/iv_drip/plumbing/Initialize(mapload, bolt, layer)
. = ..()
AddComponent(/datum/component/plumbing/automated_iv, bolt, layer)
AddComponent(/datum/component/simple_rotation)
/obj/machinery/iv_drip/attack_hand_secondary(mob/user, list/modifiers)
return FALSE
/obj/machinery/iv_drip/plumbing/click_alt(mob/user)
return FALSE
/obj/machinery/iv_drip/plumbing/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(isnull(held_item) || held_item.tool_behaviour != TOOL_WRENCH)
return
context[SCREENTIP_CONTEXT_LMB] = "[anchored ? "Una" : "A"]nchor"
return CONTEXTUAL_SCREENTIP_SET
/obj/machinery/iv_drip/plumbing/plunger_act(obj/item/plunger/attacking_plunger, mob/living/user, reinforced)
user.balloon_alert_to_viewers("furiously plunging...", "plunging iv drip...")
if(!do_after(user, 3 SECONDS, target = src))
return TRUE
user.balloon_alert_to_viewers("finished plunging")
reagents.expose(get_turf(src), TOUCH) //splash on the floor
reagents.clear_reagents()
return TRUE
/obj/machinery/iv_drip/plumbing/wrench_act(mob/living/user, obj/item/tool)
if(default_unfasten_wrench(user, tool) != SUCCESSFUL_UNFASTEN)
return ITEM_INTERACT_BLOCKING
if(anchored)
begin_processing()
else
end_processing()
return ITEM_INTERACT_SUCCESS