From cc35fb8b0cc2a41b9e4f354b2cb582e7279b8423 Mon Sep 17 00:00:00 2001 From: Arkatos1 Date: Mon, 22 Apr 2019 18:43:17 +0200 Subject: [PATCH] Code improvement --- code/ATMOSPHERICS/components/binary_devices/pump.dm | 5 +++-- code/ATMOSPHERICS/components/binary_devices/volume_pump.dm | 5 +++-- code/ATMOSPHERICS/components/trinary_devices/filter.dm | 5 +++-- code/ATMOSPHERICS/components/trinary_devices/mixer.dm | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 5010fbb5dae..7705efeb7d8 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -29,6 +29,7 @@ Thus, the two variables affect pump operation are set in New(): var/datum/radio_frequency/radio_connection /obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user) + ..() if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return @@ -37,7 +38,7 @@ Thus, the two variables affect pump operation are set in New(): if(!ishuman(usr) && !issilicon(usr)) return toggle() - return ..() + return /obj/machinery/atmospherics/binary/pump/AICtrlClick() toggle() @@ -52,7 +53,7 @@ Thus, the two variables affect pump operation are set in New(): if(!ishuman(usr) && !issilicon(usr)) return set_max() - return ..() + return /obj/machinery/atmospherics/binary/pump/AIAltClick() set_max() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index ccdc2cb11b6..b398aa1864f 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -29,6 +29,7 @@ Thus, the two variables affect pump operation are set in New(): var/datum/radio_frequency/radio_connection /obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user) + ..() if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return @@ -37,7 +38,7 @@ Thus, the two variables affect pump operation are set in New(): if(!ishuman(usr) && !issilicon(usr)) return toggle() - return ..() + return /obj/machinery/atmospherics/binary/volume_pump/AICtrlClick() toggle() @@ -52,7 +53,7 @@ Thus, the two variables affect pump operation are set in New(): if(!ishuman(usr) && !issilicon(usr)) return set_max() - return ..() + return /obj/machinery/atmospherics/binary/volume_pump/AIAltClick() set_max() diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index f3e8d5519da..9bb0ca13a2b 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -23,6 +23,7 @@ Filter types: var/datum/radio_frequency/radio_connection /obj/machinery/atmospherics/trinary/filter/CtrlClick(mob/living/user) + ..() if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return @@ -31,7 +32,7 @@ Filter types: if(!ishuman(usr) && !issilicon(usr)) return toggle() - return ..() + return /obj/machinery/atmospherics/trinary/filter/AICtrlClick() toggle() @@ -46,7 +47,7 @@ Filter types: if(!ishuman(usr) && !issilicon(usr)) return set_max() - return ..() + return /obj/machinery/atmospherics/trinary/filter/AIAltClick() set_max() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index e8ae6d5a757..5682bd15b91 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -13,6 +13,7 @@ //node 3 is the outlet, nodes 1 & 2 are intakes /obj/machinery/atmospherics/trinary/mixer/CtrlClick(mob/living/user) + ..() if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return @@ -21,7 +22,7 @@ if(!ishuman(usr) && !issilicon(usr)) return toggle() - return ..() + return /obj/machinery/atmospherics/trinary/mixer/AICtrlClick() toggle() @@ -36,7 +37,7 @@ if(!ishuman(usr) && !issilicon(usr)) return set_max() - return ..() + return /obj/machinery/atmospherics/trinary/mixer/AIAltClick() set_max()