changed emergency shuttle announcements to use command alert datums (#27882)

* convert to command alert datum

* remove extra announcement

* fix
This commit is contained in:
gurfan
2020-09-21 20:08:01 -05:00
committed by GitHub
parent de1e2dcefd
commit bce02fc5e2
6 changed files with 60 additions and 13 deletions

View File

@@ -332,8 +332,9 @@
return
var/justification = stripped_input(usr, "Please input a reason for the shuttle call. You may leave it blank to not have one.", "Justification")
emergency_shuttle.incall()
world << sound('sound/AI/shuttlecalled.ogg')
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.[justification ? " Justification : '[justification]'" : ""]")
var/datum/command_alert/emergency_shuttle_called/CA = new /datum/command_alert/emergency_shuttle_called
CA.justification = justification
command_alert(CA)
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='notice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
@@ -343,8 +344,7 @@
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
world << sound('sound/AI/shuttlecalled.ogg')
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
command_alert(/datum/command_alert/emergency_shuttle_called)
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='notice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
if(1)

View File

@@ -927,8 +927,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
emergency_shuttle.incall()
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.[justification ? " Justification : '[justification]'" : ""]")
world << sound('sound/AI/shuttlecalled.ogg')
var/datum/command_alert/emergency_shuttle_called/CA = new /datum/command_alert/emergency_shuttle_called
if(justification)
CA.justification = justification
command_alert(CA)
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("<span class='notice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>", 1)