Bolds Normal and Fast mode, Removes redundent code, fixes cut_speedwire

This commit is contained in:
TheYeetster1
2021-08-26 15:04:26 -04:00
parent 345c087068
commit 42cfb6868a
+9 -14
View File
@@ -814,12 +814,7 @@ About the new airlock wires panel:
safe = 1
to_chat(usr, "<span class='notice'>The door safeties have been enabled.</span>")
if("speed-toggle")
if(wires.is_cut(WIRE_SPEED))
to_chat(usr, "<span class='warning'>The timing wire is cut - Cannot alter timing.</span>")
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, "<span class='warning'>The timing wire is cut - Cannot alter timing.</span>")
else if(normalspeed)
normalspeed = TRUE
to_chat(user, "<span class='notice'>The door is now in normal mode.</span>")
else if(!normalspeed)
normalspeed = FALSE
to_chat(user, "<span class='notice'>The door is now in fast mode.</span>")
to_chat(user, "<span class='warning'>The timing wire has been cut - Cannot alter timing.</span>")
return
normalspeed = !normalspeed
if(normalspeed)
to_chat(user, "<span class='notice'>The door is now in <b>normal</b> mode.</span>")
else
to_chat(user, "<span class='notice'>The door is now in <b>fast</b> mode.</span>")
/obj/machinery/door/airlock/attackby(obj/item/C, mob/user, params)
add_fingerprint(user)