From 42cfb6868a5dcc65dd859b3d3897890a4ce93f56 Mon Sep 17 00:00:00 2001
From: TheYeetster1 <70362590+TheYeetster1@users.noreply.github.com>
Date: Thu, 26 Aug 2021 15:04:26 -0400
Subject: [PATCH] Bolds Normal and Fast mode, Removes redundent code, fixes
cut_speedwire
---
code/game/machinery/doors/airlock.dm | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 30d3801afd0..4cb0a1471be 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -814,12 +814,7 @@ About the new airlock wires panel:
safe = 1
to_chat(usr, "The door safeties have been enabled.")
if("speed-toggle")
- if(wires.is_cut(WIRE_SPEED))
- to_chat(usr, "The timing wire is cut - Cannot alter timing.")
- else if(normalspeed)
- normalspeed = FALSE
- else
- normalspeed = TRUE
+ toggle_speed(usr)
if("open-close")
open_close(usr)
else
@@ -865,15 +860,15 @@ About the new airlock wires panel:
update_icon()
/obj/machinery/door/airlock/proc/toggle_speed(mob/user)
- normalspeed = !normalspeed
if(wires.is_cut(WIRE_SPEED))
- to_chat(user, "The timing wire is cut - Cannot alter timing.")
- else if(normalspeed)
- normalspeed = TRUE
- to_chat(user, "The door is now in normal mode.")
- else if(!normalspeed)
- normalspeed = FALSE
- to_chat(user, "The door is now in fast mode.")
+ to_chat(user, "The timing wire has been cut - Cannot alter timing.")
+ return
+ normalspeed = !normalspeed
+
+ if(normalspeed)
+ to_chat(user, "The door is now in normal mode.")
+ else
+ to_chat(user, "The door is now in fast mode.")
/obj/machinery/door/airlock/attackby(obj/item/C, mob/user, params)
add_fingerprint(user)