Admin controlled shuttles improvements (#53237)

This PR improves options for admin controlled shuttles - all shuttle controls can be admin-locked, and players must request authorization so the shuttle can move or for controls to unlock. Before this PR, authorization request always redirected admin staff to control the CentCom ferry, even if request came from a shuttle elsewhere, which was a little odd.

Authorization request will now properly prompt the staff to control that specific shuttle, and now they also have quick option to unlock/lock the shuttle. Could come handy in events to restrict player movement.

Last change, escape pods no longer start as admin controlled, as they cannot be launched without atleast code red anyway. They instead properly state they are just locked.
This commit is contained in:
Arkatos1
2020-09-01 09:37:50 +02:00
committed by GitHub
parent 6c21e78705
commit b40e58f342
4 changed files with 35 additions and 6 deletions
+13 -3
View File
@@ -15,6 +15,8 @@
var/no_destination_swap = FALSE
/// ID of the currently selected destination of the attached shuttle
var/destination
/// If the console controls are locked
var/locked = FALSE
/// Authorization request cooldown to prevent request spam to admin staff
COOLDOWN_DECLARE(request_cooldown)
@@ -30,7 +32,7 @@
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
data["docked_location"] = M ? M.get_status_text_tgui() : "Unknown"
data["locations"] = list()
data["locked"] = FALSE
data["locked"] = locked
data["authorization_required"] = admin_controlled
data["timer_str"] = M ? M.getTimerStr() : "00:00"
data["destination"] = destination
@@ -39,8 +41,16 @@
return data
if(admin_controlled)
data["status"] = "Unauthorized Access"
else if(locked)
data["status"] = "Locked"
else
data["status"] = M.mode == SHUTTLE_IGNITING ? "Igniting" : M.mode != SHUTTLE_IDLE ? "In Transit" : "Idle"
switch(M.mode)
if(SHUTTLE_IGNITING)
data["status"] = "Igniting"
if(SHUTTLE_IDLE)
data["status"] = "Idle"
else
data["status"] = "In Transit"
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
if(!options.Find(S.id))
continue
@@ -106,7 +116,7 @@
return
COOLDOWN_START(src, request_cooldown, 1 MINUTES)
to_chat(usr, "<span class='notice'>Your request has been received by CentCom.</span>")
to_chat(GLOB.admins, "<b>FERRY: <font color='#3d5bc3'>[ADMIN_LOOKUPFLW(usr)] (<A HREF='?_src_=holder;[HrefToken()];secrets=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to CentCom.</font>")
to_chat(GLOB.admins, "<b>SHUTTLE: <font color='#3d5bc3'>[ADMIN_LOOKUPFLW(usr)] (<A HREF='?_src_=holder;[HrefToken()];move_shuttle=[shuttleId]'>Move Shuttle</a>)(<A HREF='?_src_=holder;[HrefToken()];unlock_shuttle=[REF(src)]'>Lock/Unlock Shuttle</a>)</b> is requesting to move or unlock the shuttle.</font>")
return TRUE
/obj/machinery/computer/shuttle/emag_act(mob/user)
+1 -1
View File
@@ -465,7 +465,7 @@
/obj/machinery/computer/shuttle/pod
name = "pod control computer"
admin_controlled = TRUE
locked = TRUE
possible_destinations = "pod_asteroid"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"