mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Ports Bay's updated evacuation controller and bluespace jump. (#12445)
This commit is contained in:
@@ -3,22 +3,15 @@
|
||||
var/dat = ""
|
||||
dat += "Current Game Mode: <b>[SSticker.mode.name]</b><br>"
|
||||
dat += "Round Duration: [get_round_duration_formatted()]<br>"
|
||||
dat += "<b>Emergency Shuttle</b><br>"
|
||||
if (!emergency_shuttle.online())
|
||||
dat += "<vui-button :params=\"{ call_shuttle: 1 }\">Call Shuttle</vui-button><br>"
|
||||
dat += "<b>Evacuation</b><br>"
|
||||
if (evacuation_controller.is_idle())
|
||||
dat += "<vui-button :params=\"{ call_shuttle: 1 }\">Call Evacuation</vui-button><br>"
|
||||
else
|
||||
if (emergency_shuttle.wait_for_launch)
|
||||
var/timeleft = emergency_shuttle.estimate_launch_time()
|
||||
dat += "ETL: <vui-button :params=\"{ edit_shuttle_time: 1 }\">[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</vui-button><br>"
|
||||
|
||||
else if (emergency_shuttle.shuttle.has_arrive_time())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
dat += "ETA: <vui-button :params=\"{ edit_shuttle_time: 1 }\">[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</vui-button><br>"
|
||||
var/timeleft = evacuation_controller.get_eta()
|
||||
if (evacuation_controller.waiting_to_leave())
|
||||
dat += "ETA: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
|
||||
|
||||
if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
|
||||
dat += "Launching now...<br>"
|
||||
|
||||
dat += "<vui-button :params=\"{ delay_round_end: 1 }\">[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</vui-button><br>"
|
||||
dat += "<hr>"
|
||||
for(var/antag_type in all_antag_types)
|
||||
|
||||
@@ -112,53 +112,19 @@
|
||||
else if(href_list["call_shuttle"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if( SSticker.mode.name == "blob" )
|
||||
alert("You can't call the shuttle during blob!")
|
||||
return
|
||||
|
||||
switch(href_list["call_shuttle"])
|
||||
if("1")
|
||||
if ((!( ROUND_IS_STARTED ) || !emergency_shuttle.location()))
|
||||
return
|
||||
if (emergency_shuttle.can_call())
|
||||
emergency_shuttle.call_evac()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
|
||||
if("2")
|
||||
if (!( ROUND_IS_STARTED ) || !emergency_shuttle.location())
|
||||
return
|
||||
if (emergency_shuttle.can_call())
|
||||
emergency_shuttle.call_evac()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
|
||||
|
||||
else if (emergency_shuttle.can_recall())
|
||||
emergency_shuttle.recall()
|
||||
log_admin("[key_name(usr)] sent the Emergency Shuttle back",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>", 1)
|
||||
|
||||
href_list["secretsadmin"] = "check_antagonist"
|
||||
|
||||
else if(href_list["edit_shuttle_time"])
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
if (emergency_shuttle.wait_for_launch)
|
||||
var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
|
||||
|
||||
emergency_shuttle.launch_time = world.time + new_time_left*10
|
||||
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]</span>", 1)
|
||||
else if (emergency_shuttle.shuttle.has_arrive_time())
|
||||
|
||||
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
|
||||
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
|
||||
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]</span>", 1)
|
||||
else
|
||||
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
else if (evacuation_controller.cancel_evacuation())
|
||||
log_admin("[key_name(usr)] cancelled an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] cancelled an evacuation.", 1)
|
||||
|
||||
href_list["secretsadmin"] = "check_antagonist"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user