From a09df344209553a0051e19101e6929296eceec54 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 12:09:14 +0300 Subject: [PATCH 01/24] Gas pump CTRL and Alt click function --- .../machinery/components/binary_devices/pump.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index e7df188f70..2f8f490987 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -27,7 +27,19 @@ Thus, the two variables affect pump operation are set in New(): construction_type = /obj/item/pipe/directional pipe_state = "pump" + +/obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + on = !on + update_icon() + return ..() + update_icon() + return ..() +/obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + target_pressure = MAX_OUTPUT_PRESSURE + /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From 54e013272a0eb418d2886962618e7f9dc9bab79d Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 12:12:15 +0300 Subject: [PATCH 02/24] Volume pump CTRL and alt click functionality --- .../components/binary_devices/volume_pump.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 46b646cabf..99b0165f13 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -28,6 +28,18 @@ Thus, the two variables affect pump operation are set in New(): construction_type = /obj/item/pipe/directional pipe_state = "volumepump" +/obj/machinery/atmospherics/components/binary/volume_pump/CtrlClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + on = !on + update_icon() + return ..() + +/obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + transfer_rate = MAX_TRANSFER_RATE + update_icon() + return ..() + /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X @@ -192,4 +204,4 @@ Thus, the two variables affect pump operation are set in New(): else investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]") - return TRUE \ No newline at end of file + return TRUE From 277a498f288b43d3e2174343f6ec9514154f4403 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 12:13:45 +0300 Subject: [PATCH 03/24] Update filter.dm --- .../machinery/components/trinary_devices/filter.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 4101deb00c..a65785a77e 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -12,6 +12,18 @@ construction_type = /obj/item/pipe/trinary/flippable pipe_state = "filter" +/obj/machinery/atmospherics/components/trinary/filter/CtrlClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + on = !on + update_icon() + return ..() + +/obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() + return ..() + /obj/machinery/atmospherics/components/trinary/filter/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From ea1edd965dbf18c496ff62f95ba382b1f265e0ac Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 12:18:13 +0300 Subject: [PATCH 04/24] Update mixer.dm --- .../machinery/components/trinary_devices/mixer.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 4dd2972526..50c1db2b04 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -14,6 +14,17 @@ pipe_state = "mixer" //node 3 is the outlet, nodes 1 & 2 are intakes +/obj/machinery/atmospherics/components/trinary/mixer/CtrlClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + on = !on + update_icon() + return ..() + +/obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() + return ..() /obj/machinery/atmospherics/components/trinary/mixer/layer1 piping_layer = PIPING_LAYER_MIN From 77bfcc61eddc796c98bfb2e18cd98ae9dfe471cf Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 13:37:05 +0300 Subject: [PATCH 05/24] Update pump.dm --- .../atmospherics/machinery/components/binary_devices/pump.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 2f8f490987..7a775fb584 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -29,7 +29,7 @@ Thus, the two variables affect pump operation are set in New(): pipe_state = "pump" /obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() return ..() @@ -37,7 +37,7 @@ Thus, the two variables affect pump operation are set in New(): return ..() /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE /obj/machinery/atmospherics/components/binary/pump/layer1 From e91338f9e377f162529865368f78e38feaf097ee Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 13:47:23 +0300 Subject: [PATCH 06/24] Update volume_pump.dm --- .../machinery/components/binary_devices/volume_pump.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 99b0165f13..405af80e0c 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -29,13 +29,13 @@ Thus, the two variables affect pump operation are set in New(): pipe_state = "volumepump" /obj/machinery/atmospherics/components/binary/volume_pump/CtrlClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() return ..() /obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) transfer_rate = MAX_TRANSFER_RATE update_icon() return ..() From 07db00be8f15d6d554bb62c7fbb8673f64e787e7 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 13:48:03 +0300 Subject: [PATCH 07/24] Update filter.dm --- .../machinery/components/trinary_devices/filter.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index a65785a77e..5640a1a587 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -13,13 +13,13 @@ pipe_state = "filter" /obj/machinery/atmospherics/components/trinary/filter/CtrlClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() return ..() /obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE update_icon() return ..() From fc54f4b7bf7dbcd274d5b82f5c0abd9866514c2c Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 13:49:24 +0300 Subject: [PATCH 08/24] Update mixer.dm --- .../machinery/components/trinary_devices/mixer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 50c1db2b04..3b0e89b99d 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -15,13 +15,13 @@ //node 3 is the outlet, nodes 1 & 2 are intakes /obj/machinery/atmospherics/components/trinary/mixer/CtrlClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() return ..() /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE update_icon() return ..() From 5d06de81b686ece5bc393d8550262512104b60e9 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:00:27 +0300 Subject: [PATCH 09/24] Fixes inconsistent indentation --- .../atmospherics/machinery/components/binary_devices/pump.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 7a775fb584..be59e801d0 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -33,9 +33,7 @@ Thus, the two variables affect pump operation are set in New(): on = !on update_icon() return ..() - update_icon() - return ..() - + /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE From 5b2fc29d1f319c6ebe44d11eaddde6d6d9d274f5 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:08:25 +0300 Subject: [PATCH 10/24] Pumps now let you know when their output is maxed using Alt --- .../atmospherics/machinery/components/binary_devices/pump.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index be59e801d0..864d135f7c 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -37,7 +37,7 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE - + to_chat(user, "You maximize the pressure on the [src]") /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From 661c1d90205ff304a2e90fd61373f31390fa8fad Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:18:38 +0300 Subject: [PATCH 11/24] Add fancy colours to the plaintext. --- .../atmospherics/machinery/components/binary_devices/pump.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 864d135f7c..3a5b37b993 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -37,7 +37,7 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE - to_chat(user, "You maximize the pressure on the [src]") + to_chat(user,"You maximize the pressure on the [src].") /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From 5a7ab390cee3a76a836476aa4b96d3011cf5cc64 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:20:36 +0300 Subject: [PATCH 12/24] Gah, forgot to do spacing --- .../atmospherics/machinery/components/binary_devices/pump.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 3a5b37b993..cf33b46b63 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -38,6 +38,7 @@ Thus, the two variables affect pump operation are set in New(): if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") + /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From 40e90d1e3430a2325fc1b00159064003c7252596 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:21:40 +0300 Subject: [PATCH 13/24] Adds volume pump max text, as unlikely as it may be. Removes unnecesary icon update. --- .../machinery/components/binary_devices/volume_pump.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 405af80e0c..a10b82d33e 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -37,8 +37,7 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) transfer_rate = MAX_TRANSFER_RATE - update_icon() - return ..() + to_chat(user,"You maximize the pressure on the [src].") /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN From 7b82ce463bfcd5b4e503fcb27f4879967cdab0ee Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:23:10 +0300 Subject: [PATCH 14/24] Ditto Removes icon update, adds text confirmation to maxed pump in filter --- .../machinery/components/trinary_devices/filter.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 5640a1a587..e97c4574f0 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -21,8 +21,7 @@ /obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE - update_icon() - return ..() + to_chat(user,"You maximize the pressure on the [src].") /obj/machinery/atmospherics/components/trinary/filter/layer1 piping_layer = PIPING_LAYER_MIN From 9e025a03bd78106c804ed57752807f0716219fcd Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 24 May 2019 15:23:54 +0300 Subject: [PATCH 15/24] Ditto Adds output max confirmation, removes unneeded icon update --- .../machinery/components/trinary_devices/mixer.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 3b0e89b99d..9df4efe8cd 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -23,9 +23,8 @@ /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE - update_icon() - return ..() - + to_chat(user,"You maximize the pressure on the [src].") + /obj/machinery/atmospherics/components/trinary/mixer/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X From 96ab12cb4837c550464c5db06620b96b80f875b8 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sat, 25 May 2019 13:59:35 +0300 Subject: [PATCH 16/24] Update code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm Co-Authored-By: Poojawa --- .../machinery/components/binary_devices/volume_pump.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index a10b82d33e..c217b640bd 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -38,6 +38,7 @@ Thus, the two variables affect pump operation are set in New(): if(user.canUseTopic(src, BE_CLOSE, FALSE,)) transfer_rate = MAX_TRANSFER_RATE to_chat(user,"You maximize the pressure on the [src].") + investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN From 749e3a6f6aa34060f1a48592233a847eedcf45a4 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sat, 25 May 2019 14:01:55 +0300 Subject: [PATCH 17/24] Apply suggestions from code review Added logging as suggested by Poojawa Co-Authored-By: Poojawa --- .../atmospherics/machinery/components/binary_devices/pump.dm | 1 + .../machinery/components/binary_devices/volume_pump.dm | 1 + 2 files changed, 2 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index cf33b46b63..46b898247a 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -38,6 +38,7 @@ Thus, the two variables affect pump operation are set in New(): if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") + investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index c217b640bd..1c6543681e 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -39,6 +39,7 @@ Thus, the two variables affect pump operation are set in New(): transfer_rate = MAX_TRANSFER_RATE to_chat(user,"You maximize the pressure on the [src].") investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN From 08bb998cf362bb2033a5fa2dd665b4865c11a21a Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sat, 25 May 2019 14:06:45 +0300 Subject: [PATCH 18/24] Fixes some oofs --- .../machinery/components/binary_devices/volume_pump.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 1c6543681e..c217b640bd 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -39,7 +39,6 @@ Thus, the two variables affect pump operation are set in New(): transfer_rate = MAX_TRANSFER_RATE to_chat(user,"You maximize the pressure on the [src].") investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN From 869fac49a7d606ef1bbfcac31b84d39da0e8468d Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 03:29:27 +0300 Subject: [PATCH 19/24] Apply suggestions from code review Fixes compile errors Co-Authored-By: Poojawa --- .../atmospherics/machinery/components/binary_devices/pump.dm | 1 + .../machinery/components/binary_devices/volume_pump.dm | 1 + 2 files changed, 2 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 46b898247a..3aeb799bdb 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -35,6 +35,7 @@ Thus, the two variables affect pump operation are set in New(): return ..() /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) + var/area/A = get_area(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index c217b640bd..f41b1607c5 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -35,6 +35,7 @@ Thus, the two variables affect pump operation are set in New(): return ..() /obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) + var/area/A = get_area(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) transfer_rate = MAX_TRANSFER_RATE to_chat(user,"You maximize the pressure on the [src].") From ac066c34257d6c779390e2ce44fc31a0f6dad69f Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 17:27:21 +0300 Subject: [PATCH 20/24] Logging Adds logging and message to admins for CTRL and Alt --- .../machinery/components/binary_devices/pump.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 3aeb799bdb..abdc3ada57 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -29,17 +29,23 @@ Thus, the two variables affect pump operation are set in New(): pipe_state = "pump" /obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - return ..() + investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + return ..() /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN From b494e21ef655a7bf57c37fab20b6d460dd53ee8a Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 17:31:23 +0300 Subject: [PATCH 21/24] Update volume_pump.dm Adds logging and message to admins --- .../machinery/components/binary_devices/volume_pump.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index f41b1607c5..dd12a73cd1 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -29,17 +29,23 @@ Thus, the two variables affect pump operation are set in New(): pipe_state = "volumepump" /obj/machinery/atmospherics/components/binary/volume_pump/CtrlClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - return ..() + investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + return ..() /obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) - transfer_rate = MAX_TRANSFER_RATE + target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN From 3eff4743007766f6f9deea7c800a0edbff82c28d Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 17:33:25 +0300 Subject: [PATCH 22/24] Update filter.dm Adds logging and to-admin --- .../machinery/components/trinary_devices/filter.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index e97c4574f0..1e52e238cf 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -13,15 +13,23 @@ pipe_state = "filter" /obj/machinery/atmospherics/components/trinary/filter/CtrlClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - return ..() - + investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + return ..() + /obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") + investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/trinary/filter/layer1 piping_layer = PIPING_LAYER_MIN From 3f7f8a3560889ca8f6ff92e934c3a54c99d482f3 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 17:34:48 +0300 Subject: [PATCH 23/24] Update mixer.dm Adds logging and to-admin --- .../machinery/components/trinary_devices/mixer.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 9df4efe8cd..ba9fdf31af 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -15,15 +15,23 @@ //node 3 is the outlet, nodes 1 & 2 are intakes /obj/machinery/atmospherics/components/trinary/mixer/CtrlClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - return ..() - + investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + return ..() + /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") + investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/trinary/mixer/layer1 piping_layer = PIPING_LAYER_MIN From 352b07d5b19eb2af9f6281d05a1594adc1def50f Mon Sep 17 00:00:00 2001 From: Arturlang Date: Sun, 26 May 2019 17:49:48 +0300 Subject: [PATCH 24/24] Goddamnit, TABS, not spaces. Also removes alt click function for vol pumps, since thats unnecesary. --- .../components/binary_devices/volume_pump.dm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index dd12a73cd1..2efff16301 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -36,16 +36,7 @@ Thus, the two variables affect pump operation are set in New(): update_icon() investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") - return ..() - -/obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) - var/area/A = get_area(src) - var/turf/T = get_turf(src) - if(user.canUseTopic(src, BE_CLOSE, FALSE,)) - target_pressure = MAX_OUTPUT_PRESSURE - to_chat(user,"You maximize the pressure on the [src].") - investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + return ..() /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN