From 22620e77f70c16657ca9ab4e42e989c79396a384 Mon Sep 17 00:00:00 2001 From: 1080pCat <96908085+1080pCat@users.noreply.github.com> Date: Wed, 20 Sep 2023 03:58:29 +1000 Subject: [PATCH] Cantt suck in air if the fan is covered! (#22357) --- .../atmospherics/machinery/portable/portable_atmospherics.dm | 2 ++ .../modules/atmospherics/machinery/portable/portable_pump.dm | 5 ++++- code/modules/atmospherics/machinery/portable/scrubber.dm | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index f3f0784ced4..01bea1b4abe 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -148,6 +148,8 @@ if(connect(possible_port)) to_chat(user, "You connect [src] to the port.") update_icon() + if(on) + on = !on return else to_chat(user, "[src] failed to connect to the port.") diff --git a/code/modules/atmospherics/machinery/portable/portable_pump.dm b/code/modules/atmospherics/machinery/portable/portable_pump.dm index 89aacb74b1b..c4b25889c47 100644 --- a/code/modules/atmospherics/machinery/portable/portable_pump.dm +++ b/code/modules/atmospherics/machinery/portable/portable_pump.dm @@ -141,12 +141,15 @@ return data -/obj/machinery/atmospherics/portable/pump/ui_act(action, list/params) +/obj/machinery/atmospherics/portable/pump/ui_act(action, list/params, datum/tgui/ui) if(..()) return switch(action) if("power") + if(connected_port) + to_chat(ui.user, "[src] fails to turn on, the port is covered!") + return on = !on if(on && direction == DIRECTION_OUT) investigate_log("[key_name(usr)] started a transfer into [holding_tank].
", "atmos") diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index c8ec38694ef..c5f1f656056 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -136,12 +136,15 @@ return data -/obj/machinery/atmospherics/portable/scrubber/ui_act(action, list/params) +/obj/machinery/atmospherics/portable/scrubber/ui_act(action, list/params, datum/tgui/ui) if(..()) return switch(action) if("power") + if(connected_port) + to_chat(ui.user, "[src] fails to turn on, the port is covered!") + return on = !on update_icon() return TRUE