mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Replaces the emergency shuttle control console
Replaces the old emergency shuttle control console with a nice new NanoUI one. Improves the NanoUI for the docking controllers.
This commit is contained in:
@@ -21,6 +21,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
var/auto_recall_time //the time at which the shuttle will be auto-recalled
|
||||
var/evac = 0 //1 = emergency evacuation, 0 = crew transfer
|
||||
var/wait_for_launch = 0 //if the shuttle is waiting to launch
|
||||
var/autopilot = 1 //set to 0 to disable the shuttle automatically launching
|
||||
|
||||
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
|
||||
var/departed = 0 //if the shuttle has left the station at least once
|
||||
@@ -76,32 +77,23 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
if (world.time >= launch_time) //time to launch the shuttle
|
||||
stop_launch_countdown()
|
||||
|
||||
//set the travel time
|
||||
if (!shuttle.location) //leaving from the station
|
||||
//launch the pods!
|
||||
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
||||
pod.launch(src)
|
||||
|
||||
shuttle.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN
|
||||
else
|
||||
shuttle.travel_time = SHUTTLE_TRANSIT_DURATION
|
||||
|
||||
shuttle.launch(src)
|
||||
if(autopilot)
|
||||
shuttle.launch(src)
|
||||
|
||||
//called when the shuttle has arrived.
|
||||
/datum/emergency_shuttle_controller/proc/shuttle_arrived()
|
||||
if (!shuttle.location) //at station
|
||||
if (!shuttle.location && autopilot) //at station
|
||||
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
|
||||
|
||||
//begins the launch countdown and sets the amount of time left until launch
|
||||
//if the launch countdown has already been set then this may reduce the countdown time, but not extend it
|
||||
//to reset for a later time, just stop the timer first
|
||||
/datum/emergency_shuttle_controller/proc/set_launch_countdown(var/seconds)
|
||||
if (wait_for_launch)
|
||||
launch_time = min(world.time + seconds*10, launch_time)
|
||||
else
|
||||
wait_for_launch = 1
|
||||
launch_time = world.time + seconds*10
|
||||
wait_for_launch = 1
|
||||
launch_time = world.time + seconds*10
|
||||
|
||||
/datum/emergency_shuttle_controller/proc/stop_launch_countdown()
|
||||
wait_for_launch = 0
|
||||
@@ -111,6 +103,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
if(!can_call()) return
|
||||
|
||||
//set the launch timer
|
||||
autopilot = 1
|
||||
set_launch_countdown(get_shuttle_prep_time())
|
||||
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
||||
|
||||
@@ -126,10 +119,11 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
if(!can_call()) return
|
||||
|
||||
//set the launch timer
|
||||
autopilot = 1
|
||||
set_launch_countdown(get_shuttle_prep_time())
|
||||
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
||||
|
||||
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(estimate_arrival_time()/60)] minutes.")
|
||||
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
|
||||
|
||||
//recalls the shuttle
|
||||
/datum/emergency_shuttle_controller/proc/recall()
|
||||
@@ -192,10 +186,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
//returns the time left until the shuttle arrives at it's destination, in seconds
|
||||
/datum/emergency_shuttle_controller/proc/estimate_arrival_time()
|
||||
var/eta
|
||||
if (isnull(shuttle.jump_time))
|
||||
eta = launch_time + shuttle.travel_time
|
||||
if (isnull(shuttle.last_move_time))
|
||||
eta = launch_time + shuttle.travel_time*10
|
||||
else
|
||||
eta = shuttle.jump_time + shuttle.travel_time
|
||||
eta = shuttle.last_move_time + shuttle.travel_time*10
|
||||
return (eta - world.time)/10
|
||||
|
||||
//returns the time left until the shuttle launches, in seconds
|
||||
@@ -285,9 +279,4 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
|
||||
S.direction = spawndir
|
||||
spawn()
|
||||
S.startmove()
|
||||
|
||||
#undef SHUTTLE_PREPTIME
|
||||
#undef SHUTTLE_LEAVETIME
|
||||
#undef SHUTTLE_TRANSIT_DURATION
|
||||
#undef SHUTTLE_TRANSIT_DURATION_RETURN
|
||||
S.startmove()
|
||||
@@ -130,19 +130,19 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
VS.origin = /area/shuttle/vox/station
|
||||
|
||||
VS.destinations = list(
|
||||
"Fore Starboard Solars" = /area/vox_station/northeast_solars,
|
||||
"Fore Port Solars" = /area/vox_station/northwest_solars,
|
||||
"Aft Starboard Solars" = /area/vox_station/southeast_solars,
|
||||
"Aft Port Solars" = /area/vox_station/southwest_solars,
|
||||
"Mining asteroid" = /area/vox_station/mining
|
||||
"Fore Starboard Solars" = locate(/area/vox_station/northeast_solars),
|
||||
"Fore Port Solars" = locate(/area/vox_station/northwest_solars),
|
||||
"Aft Starboard Solars" = locate(/area/vox_station/southeast_solars),
|
||||
"Aft Port Solars" = locate(/area/vox_station/southwest_solars),
|
||||
"Mining asteroid" = locate(/area/vox_station/mining)
|
||||
)
|
||||
|
||||
VS.announcer = "NSV Icarus"
|
||||
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.interim = /area/vox_station/transit
|
||||
VS.interim = locate(/area/vox_station/transit)
|
||||
|
||||
VS.warmup_time = 10
|
||||
VS.warmup_time = 0
|
||||
shuttles["Vox Skipjack"] = VS
|
||||
|
||||
//Nuke Ops shuttle.
|
||||
@@ -150,22 +150,22 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
MS.origin = /area/syndicate_station/start
|
||||
|
||||
MS.destinations = list(
|
||||
"Northwest of the station" = /area/syndicate_station/northwest,
|
||||
"North of the station" = /area/syndicate_station/north,
|
||||
"Northeast of the station" = /area/syndicate_station/northeast,
|
||||
"Southwest of the station" = /area/syndicate_station/southwest,
|
||||
"South of the station" = /area/syndicate_station/south,
|
||||
"Southeast of the station" = /area/syndicate_station/southeast,
|
||||
"Telecomms Satellite" = /area/syndicate_station/commssat,
|
||||
"Mining Asteroid" = /area/syndicate_station/mining
|
||||
"Northwest of the station" = locate(/area/syndicate_station/northwest),
|
||||
"North of the station" = locate(/area/syndicate_station/north),
|
||||
"Northeast of the station" = locate(/area/syndicate_station/northeast),
|
||||
"Southwest of the station" = locate(/area/syndicate_station/southwest),
|
||||
"South of the station" = locate(/area/syndicate_station/south),
|
||||
"Southeast of the station" = locate(/area/syndicate_station/southeast),
|
||||
"Telecomms Satellite" = locate(/area/syndicate_station/commssat),
|
||||
"Mining Asteroid" = locate(/area/syndicate_station/mining)
|
||||
)
|
||||
|
||||
MS.announcer = "NSV Icarus"
|
||||
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||
MS.interim = /area/syndicate_station/transit
|
||||
MS.interim = locate(/area/syndicate_station/transit)
|
||||
|
||||
MS.warmup_time = 10
|
||||
MS.warmup_time = 0
|
||||
shuttles["Syndicate"] = MS
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user