next set of globals (#19131)

This commit is contained in:
Kashargul
2026-02-09 00:36:52 +01:00
committed by GitHub
parent bc0df9f988
commit fa113ea3f5
101 changed files with 473 additions and 534 deletions
+4 -4
View File
@@ -4,9 +4,9 @@
/datum/shuttle/autodock/ferry/escape_pod/New()
move_time = move_time + rand(-30, 60)
if(name in emergency_shuttle.escape_pods)
if(name in GLOB.emergency_shuttle.escape_pods)
CRASH("An escape pod with the name '[name]' has already been defined.")
emergency_shuttle.escape_pods[name] = src
GLOB.emergency_shuttle.escape_pods[name] = src
..()
@@ -56,7 +56,7 @@
"docking_status" = docking_program.get_docking_status(),
"override_enabled" = docking_program.override_enabled,
"exterior_status" = docking_program.memory["door_status"], // TGUI DATA fails silently when there's no linked pod, leading to UI crashes
"can_force" = pod?.can_force() || (emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves
"can_force" = pod?.can_force() || (GLOB.emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves
"armed" = pod?.arming_controller.armed,
"internalTemplateName" = "EscapePodConsole",
)
@@ -72,7 +72,7 @@
if("force_launch")
if(pod.can_force())
pod.force_launch(src)
else if(emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves
else if(GLOB.emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves
pod.launch(src)
. = TRUE
+13 -13
View File
@@ -7,9 +7,9 @@
/datum/shuttle/autodock/ferry/emergency/New()
..()
radio_connection = SSradio.add_object(src, frequency, null)
if(emergency_shuttle.shuttle)
if(GLOB.emergency_shuttle.shuttle)
CRASH("An emergency shuttle has already been defined.")
emergency_shuttle.shuttle = src
GLOB.emergency_shuttle.shuttle = src
/datum/shuttle/autodock/ferry/emergency/arrived()
. = ..()
@@ -17,7 +17,7 @@
var/obj/machinery/computer/shuttle_control/emergency/C = in_use
C.reset_authorization()
emergency_shuttle.shuttle_arrived()
GLOB.emergency_shuttle.shuttle_arrived()
/datum/shuttle/autodock/ferry/emergency/long_jump(var/destination, var/interim, var/travel_time)
if (!location)
@@ -27,17 +27,17 @@
//update move_time and launch_time so we get correct ETAs
move_time = travel_time
emergency_shuttle.launch_time = world.time
GLOB.emergency_shuttle.launch_time = world.time
..(destination, interim, travel_time, direction)
/datum/shuttle/autodock/ferry/emergency/perform_shuttle_move()
if (current_location == landmark_station) //leaving the station
spawn(0)
emergency_shuttle.departed = 1
var/estimated_time = round(emergency_shuttle.estimate_arrival_time()/60,1)
GLOB.emergency_shuttle.departed = 1
var/estimated_time = round(GLOB.emergency_shuttle.estimate_arrival_time()/60,1)
if (emergency_shuttle.evac)
if (GLOB.emergency_shuttle.evac)
priority_announcement.Announce(replacetext(replacetext(using_map.emergency_shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"))
else
priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramdepart.ogg')
@@ -71,8 +71,8 @@
if (!can_launch(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence initiated!"))
if(usr)
@@ -85,8 +85,8 @@
if (!can_force(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!"))
if(usr)
@@ -99,8 +99,8 @@
if (!can_cancel(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence aborted!"))
if(usr)