mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Emergency Shuttle Toggle (#53912)
Admins now have the option to enable or disable the shuttle(located in the admin tab). Disabling the shuttle will basically pause it where it is, regardless(unless game is over). Until the admins enable it again. It will resume exactly back to where it was and continue from there. This is great for events. You can't recall or call the shuttle while it's disabled. Admins also now get the option when calling the shuttle to disable the recall of said shuttle unless they cancel it or select enable shuttle.
This commit is contained in:
@@ -59,6 +59,8 @@ GLOBAL_PROTECT(admin_verbs_admin)
|
||||
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/
|
||||
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
|
||||
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/
|
||||
/client/proc/admin_disable_shuttle, /*allows us to disable the emergency shuttle admin-wise so that it cannot be called*/
|
||||
/client/proc/admin_enable_shuttle, /*undoes the above*/
|
||||
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
|
||||
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
|
||||
/client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/
|
||||
|
||||
@@ -726,7 +726,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[view]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/admin_call_shuttle()
|
||||
|
||||
set category = "Admin - Events"
|
||||
set name = "Call Shuttle"
|
||||
|
||||
@@ -736,14 +735,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "Yes (No Recall)", "No")
|
||||
switch(confirm)
|
||||
if(null, "No")
|
||||
return
|
||||
if("Yes (No Recall)")
|
||||
SSshuttle.adminEmergencyNoRecall = TRUE
|
||||
SSshuttle.emergency.mode = SHUTTLE_IDLE
|
||||
|
||||
SSshuttle.emergency.request()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Call Shuttle") //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='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""].</span>")
|
||||
return
|
||||
|
||||
/client/proc/admin_cancel_shuttle()
|
||||
@@ -754,6 +757,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
if(SSshuttle.adminEmergencyNoRecall)
|
||||
SSshuttle.adminEmergencyNoRecall = FALSE
|
||||
|
||||
if(EMERGENCY_AT_LEAST_DOCKED)
|
||||
return
|
||||
|
||||
@@ -764,6 +770,55 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
return
|
||||
|
||||
/client/proc/admin_disable_shuttle()
|
||||
set category = "Admin - Events"
|
||||
set name = "Disable Shuttle"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DISABLED)
|
||||
to_chat(usr, "<span class='warning'>Error, shuttle is already disabled.</span>")
|
||||
return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] disabled the shuttle.</span>")
|
||||
|
||||
SSshuttle.lastMode = SSshuttle.emergency.mode
|
||||
SSshuttle.lastCallTime = SSshuttle.emergency.timeLeft(1)
|
||||
SSshuttle.adminEmergencyNoRecall = TRUE
|
||||
SSshuttle.emergency.setTimer(0)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DISABLED
|
||||
priority_announce("Warning: Emergency Shuttle uplink failure, shuttle disabled until further notice.", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
|
||||
|
||||
/client/proc/admin_enable_shuttle()
|
||||
set category = "Admin - Events"
|
||||
set name = "Enable Shuttle"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_DISABLED)
|
||||
to_chat(usr, "<span class='warning'>Error, shuttle not disabled.</span>")
|
||||
return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] enabled the emergency shuttle.</span>")
|
||||
SSshuttle.adminEmergencyNoRecall = FALSE
|
||||
SSshuttle.emergencyNoRecall = FALSE
|
||||
if(SSshuttle.lastMode == SHUTTLE_DISABLED) //If everything goes to shit, fix it.
|
||||
SSshuttle.lastMode = SHUTTLE_IDLE
|
||||
|
||||
SSshuttle.emergency.mode = SSshuttle.lastMode
|
||||
if(SSshuttle.lastCallTime < 10 SECONDS && SSshuttle.lastMode != SHUTTLE_IDLE)
|
||||
SSshuttle.lastCallTime = 10 SECONDS //Make sure no insta departures.
|
||||
SSshuttle.emergency.setTimer(SSshuttle.lastCallTime)
|
||||
priority_announce("Warning: Emergency Shuttle uplink reestablished, shuttle enabled.", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
|
||||
|
||||
/client/proc/everyone_random()
|
||||
set category = "Fun"
|
||||
set name = "Make Everyone Random"
|
||||
|
||||
Reference in New Issue
Block a user