From 9c4a808e7ea0750ddc97651588d5c5f1f1e81d78 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Thu, 3 Oct 2019 23:14:46 -0500 Subject: [PATCH] Adds Cryo QoL with hotkeys Ctrl click to swap power, Alt click to close/open machine. This is how you do a "QoL" PR. --- .../machinery/components/unary_devices/cryo.dm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 35b30107d8..ccd13d8d4a 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -394,6 +394,21 @@ . = TRUE update_icon() +/obj/machinery/atmospherics/components/unary/cryo_cell/CtrlClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !state_open) + on = !on + update_icon() + return ..() + +/obj/machinery/atmospherics/components/unary/cryo_cell/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + if(state_open) + close_machine() + else + open_machine() + update_icon() + return ..() + /obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user) return // we don't see the pipe network while inside cryo.