AI door bolt logging (#16577)

* Door bolt logging and hiddenprints

* Early return consistency
This commit is contained in:
SabreML
2021-08-25 19:19:58 +01:00
committed by GitHub
parent 422e033d59
commit e005cc5ce1
+9 -3
View File
@@ -851,10 +851,16 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/proc/toggle_bolt(mob/user)
if(wires.is_cut(WIRE_DOOR_BOLTS))
to_chat(user, "<span class='warning'>The door bolt control wire has been cut - Door bolts permanently dropped.</span>")
else if(lock())
to_chat(user, "<span class='notice'>The door bolts have been dropped.</span>")
else if(unlock())
return
if(unlock()) // Trying to unbolt
to_chat(user, "<span class='notice'>The door bolts have been raised.</span>")
return
if(lock()) // Trying to bolt
to_chat(user, "<span class='notice'>The door bolts have been dropped.</span>")
user.create_log(MISC_LOG, "Bolted", src)
add_hiddenprint(user)
/obj/machinery/door/airlock/proc/toggle_emergency_status(mob/user)
emergency = !emergency