Ports Bay's updated evacuation controller and bluespace jump. (#12445)

This commit is contained in:
Matt Atlas
2021-09-07 17:12:10 +02:00
committed by GitHub
parent 0b6631781a
commit b64224770c
59 changed files with 1137 additions and 597 deletions
+22 -27
View File
@@ -888,67 +888,62 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/admin_call_shuttle()
set category = "Admin"
set name = "Call Shuttle"
set name = "Call Evacuation"
if ((!( ROUND_IS_STARTED ) || !emergency_shuttle.location()))
if ((!( ROUND_IS_STARTED ) || !evacuation_controller))
return
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
if(alert(src, "Are you sure?", "Confirm", "Yes", "No") != "Yes")
return
var/choice
if(SSticker.mode.auto_recall_shuttle)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
if(input("The evacuation will just be cancelled if you call it. Call anyway?") in list("Confirm", "Cancel") != "Confirm")
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
emergency_shuttle.call_evac()
else
emergency_shuttle.call_transfer()
var/choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
evacuation_controller.call_evacuation(usr, (choice == "Emergency"))
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.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>", 1)
log_admin("[key_name(usr)] admin-called an evacuation.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-called an evacuation</span>", 1)
return
/client/proc/admin_cancel_shuttle()
set category = "Admin"
set name = "Cancel Shuttle"
set name = "Cancel Evacuation"
if(!check_rights(R_ADMIN)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ROUND_IS_STARTED || !emergency_shuttle.can_recall())
if(!ROUND_IS_STARTED || !evacuation_controller)
return
emergency_shuttle.recall()
evacuation_controller.cancel_evacuation()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>", 1)
log_admin("[key_name(usr)] admin-cancelled the evacuation.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-cancelled the evacuation.</span>", 1)
return
/client/proc/admin_deny_shuttle()
set category = "Admin"
set name = "Toggle Deny Shuttle"
set name = "Toggle Deny Evacuation"
if (!ROUND_IS_STARTED)
return
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
evacuation_controller.deny = !evacuation_controller.deny
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
log_admin("[key_name(src)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs"