mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 10:04:30 +01:00
7fc6e1402a
## About The Pull Request **Qol** - Adds examines & screen tips for washing items in sinks - Adds examines & screen tips for wall frame items i.e deconstructing with wrench & what structures you can mount them on **Fixes** - Plumbing components inside shuttles now properly reconnect - Plumbing iv drip has their connectors (red & blue pipes) visible again - Sinks consume reagents when washing and won't wash when it becomes dry - Fixes #94942 placing ducts by hand on turf won't run time. Also Plumbing machinery properly reconnects when un wrenching ducts in circular connections - All plumbing machinery now operates in the plumbing subsystem & map loaded machines begin processing **Refactor** - Refactored sink frame into a wall frame item meaning it can now be carried in hand and mounted on walls - Refactored the sink attack chain to use `item_interaction()` instead of `attackby()` - All sinks are now wall mounted components meaning destroying the wall they are attached to will cause it to deconstruct ## Changelog 🆑 qol: added examines & screen tips for wall frame items qol: added examines & screen tips for washing items in sinks fix: plumbing components inside shuttles reconnect to their machine counterparts correctly fix: plumbing iv drip has its red & blue connectors visible again fix: sinks consume reagents when washing and won't wash when it becomes dry fix: map loaded plumbing machines begin processing fix: placing stack of ducts by hand of ducts works again fix; plumbing machinery properly reconnects when un wrenching ducts in circular connections refactor: sinks are now proper wall mounted components meaning destroying their attached walls will cause it to get destroyed & sink frames are wall frame items that can be carried in hand /🆑
49 lines
1.8 KiB
Plaintext
49 lines
1.8 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
|
|
subsystem_type = /datum/controller/subsystem/processing/plumbing
|
|
processing_flags = START_PROCESSING_MANUALLY
|
|
|
|
/obj/machinery/iv_drip/plumbing/Initialize(mapload, layer)
|
|
. = ..()
|
|
if(mapload)
|
|
begin_processing()
|
|
AddComponent(/datum/component/plumbing/automated_iv, layer)
|
|
AddElement(/datum/element/simple_rotation)
|
|
|
|
/obj/machinery/iv_drip/plumbing/quick_toggle(mob/living/user)
|
|
return FALSE
|
|
|
|
/obj/machinery/iv_drip/plumbing/click_alt(mob/user)
|
|
return NONE
|
|
|
|
/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
|