From 08feaf38329dfb172311962a4cafd50aa79ab31f Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Thu, 28 Sep 2023 10:15:55 -0700
Subject: [PATCH 1/2] Update portable_atmospherics.dm
---
.../machinery/portable/portable_atmospherics.dm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 45b8dccd0b9d..056f5d25cd6a 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -123,11 +123,18 @@
if("eject")
if(isnull(holding))
return TRUE
+ on_eject(holding, usr)
usr.action_feedback(SPAN_NOTICE("You remove [holding] from [src]."), src)
usr.grab_item_from_interacted_with(holding, src)
holding = null
return TRUE
+/**
+ * Called on tank ejection
+ */
+/obj/machinery/portable_atmospherics/proc/on_eject(obj/item/tank/tank, mob/user)
+ return TRUE
+
/obj/machinery/portable_atmospherics/proc/set_on(enabled)
on = enabled
update_icon()
From d653097e6681a9440dfe5dd591458f55aecf11a8 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Thu, 28 Sep 2023 10:17:48 -0700
Subject: [PATCH 2/2] Update canister.dm
---
.../atmospherics/machinery/portable/canister.dm | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 5aa036fced37..5a2116f74bbd 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -425,18 +425,13 @@ update_flag
log_open()
valve_open = !valve_open
. = TRUE
- if("eject")
- if(holding)
- if(valve_open)
- valve_open = 0
- release_log += "Valve was closed by [usr] ([usr.ckey]), stopping the transfer into the [holding]
"
- if(istype(holding, /obj/item/tank))
- holding.manipulated_by = usr.real_name
- holding.loc = loc
- holding = null
- . = TRUE
update_appearance()
+/obj/machinery/portable_atmospherics/canister/on_eject(obj/item/tank/tank, mob/user)
+ user.action_feedback(SPAN_WARNING("[src]'s valve closes automatically as you yank \the [tank] out. That was close."), src)
+ valve_open = FALSE
+ return ..()
+
/obj/machinery/portable_atmospherics/canister/phoron/Initialize(mapload)
. = ..()
src.air_contents.adjust_gas(GAS_ID_PHORON, MolesForPressure())