diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 0d1c6ada2d0..154f094d941 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -658,11 +658,11 @@ Class Procs: * * user - the mob who is trying to interact with the machine. */ /obj/machinery/proc/can_use_shortcut(mob/living/user) - if(!ishuman(user) && !issilicon(user)) - return FALSE - if(!in_range(src, user) && !issilicon(user)) - return FALSE if(user.incapacitated()) to_chat(user, "You can't do that right now!") return FALSE - return TRUE + if(ishuman(user) && in_range(src, user)) + return TRUE + if(issilicon(user)) + return TRUE + return FALSE diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 1a877ce857a..bb255692633 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -366,9 +366,10 @@ Pipelines + Other Objects -> Pipe network * * user - the mob who is toggling the machine. */ /obj/machinery/atmospherics/proc/toggle(mob/living/user) - if(powered()) - on = !on - update_icon() + if(!powered()) + return + on = !on + update_icon() if(user) to_chat(user, "You toggle [src] [on ? "on" : "off"].") @@ -381,8 +382,9 @@ Pipelines + Other Objects -> Pipe network * * user - the mob who is setting the output pressure to maximum. */ /obj/machinery/atmospherics/proc/set_max(mob/living/user) - if(powered()) - target_pressure = MAX_OUTPUT_PRESSURE - update_icon() + if(!powered()) + return + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() if(user) to_chat(user, "You set the target pressure of [src] to maximum.") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 63cc657dfb6..e6fb4f66f8c 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -39,15 +39,13 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/pump/AICtrlClick(mob/living/silicon/user) toggle(user) - return ..() /obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user) if(can_use_shortcut(user)) set_max(user) -/obj/machinery/atmospherics/binary/pump/AIAltClick() - set_max() - return ..() +/obj/machinery/atmospherics/binary/pump/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/binary/pump/Destroy() if(SSradio) 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 641b492f009..f7e50707cdb 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -36,15 +36,13 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/volume_pump/AICtrlClick(mob/living/silicon/user) toggle(user) - return ..() /obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user) if(can_use_shortcut(user)) set_max(user) -/obj/machinery/atmospherics/binary/volume_pump/AIAltClick() - set_max() - return ..() +/obj/machinery/atmospherics/binary/volume_pump/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/binary/volume_pump/Destroy() if(SSradio) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 14b802ec19c..f40ecda9147 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -42,15 +42,13 @@ /obj/machinery/atmospherics/trinary/filter/AICtrlClick(mob/living/silicon/user) toggle(user) - return ..() /obj/machinery/atmospherics/trinary/filter/AltClick(mob/living/user) if(can_use_shortcut(user)) set_max(user) -/obj/machinery/atmospherics/trinary/filter/AIAltClick() - set_max() - return ..() +/obj/machinery/atmospherics/trinary/filter/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/trinary/filter/Destroy() if(SSradio) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 3e42cf411cd..3b34a95c1ba 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -23,15 +23,13 @@ /obj/machinery/atmospherics/trinary/mixer/AICtrlClick(mob/living/silicon/user) toggle(user) - return ..() /obj/machinery/atmospherics/trinary/mixer/AltClick(mob/living/user) if(can_use_shortcut(user)) set_max(user) -/obj/machinery/atmospherics/trinary/mixer/AIAltClick() - set_max() - return ..() +/obj/machinery/atmospherics/trinary/mixer/AIAltClick(mob/living/silicon/user) + set_max(user) /obj/machinery/atmospherics/trinary/mixer/flipped icon_state = "mmap"