From 8a873b4a1c47f1b5712942ec9fb355d435888d62 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 22 Jun 2014 18:19:07 -0400 Subject: [PATCH] Adds escape pods to the controller --- code/controllers/shuttle_controller.dm | 53 +++++++++++++++++++++- code/modules/shuttles/shuttle_emergency.dm | 30 +----------- 2 files changed, 52 insertions(+), 31 deletions(-) diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index 7ff76877102..3bd74103f93 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -14,6 +14,7 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle /datum/shuttle_controller/emergency_shuttle var/datum/shuttle/ferry/shuttle + var/list/escape_pods var/launch_time //the time at which the shuttle will be launched var/auto_recall = 0 //if set, the shuttle will be auto-recalled @@ -40,6 +41,50 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle //shuttle.docking_controller_tag = "supply_shuttle" //shuttle.dock_target_station = "cargo_bay" shuttles["Escape"] = shuttle + + if (!escape_pods) + escape_pods = list() + + var/datum/shuttle/ferry/escape_pod/pod + + pod = new() + pod.location = 0 + pod.warmup_time = 0 + pod.area_station = locate(/area/shuttle/escape_pod1/station) + pod.area_offsite = locate(/area/shuttle/escape_pod1/centcom) + pod.area_transition = locate(/area/shuttle/escape_pod1/transit) + pod.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN + escape_pods += pod + + pod = new() + pod.location = 0 + pod.warmup_time = 0 + pod.area_station = locate(/area/shuttle/escape_pod2/station) + pod.area_offsite = locate(/area/shuttle/escape_pod2/centcom) + pod.area_transition = locate(/area/shuttle/escape_pod2/transit) + pod.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN + escape_pods += pod + + pod = new() + pod.location = 0 + pod.warmup_time = 0 + pod.area_station = locate(/area/shuttle/escape_pod3/station) + pod.area_offsite = locate(/area/shuttle/escape_pod3/centcom) + pod.area_transition = locate(/area/shuttle/escape_pod3/transit) + pod.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN + escape_pods += pod + + //There is no pod 4, apparently. + + pod = new() + pod.location = 0 + pod.warmup_time = 0 + pod.area_station = locate(/area/shuttle/escape_pod5/station) + pod.area_offsite = locate(/area/shuttle/escape_pod5/centcom) + pod.area_transition = locate(/area/shuttle/escape_pod5/transit) + pod.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN + escape_pods += pod + /datum/shuttle_controller/emergency_shuttle/proc/process() if (wait_for_launch) @@ -49,9 +94,13 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle //set the travel time if (!shuttle.location) //at station - shuttle.travel_time = SHUTTLE_TRANSIT_DURATION_RETURN departed = 1 //technically we haven't left yet, but this should be good enough - //TODO launch pods + + //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 diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index 1116b666c26..a30647e017b 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -38,32 +38,4 @@ for(var/obj/machinery/door/D in destination) spawn(0) - D.open() - -//Escape pod garbage, copied from the controller -/* - //pods - start_location = locate(/area/shuttle/escape_pod1/station) - end_location = locate(/area/shuttle/escape_pod1/transit) - end_location = locate(/area/shuttle/escape_pod1/centcom) - start_location.move_contents_to(end_location, null, NORTH) - - start_location = locate(/area/shuttle/escape_pod2/station) - end_location = locate(/area/shuttle/escape_pod2/transit) - end_location = locate(/area/shuttle/escape_pod2/centcom) - start_location.move_contents_to(end_location, null, NORTH) - - start_location = locate(/area/shuttle/escape_pod3/station) - end_location = locate(/area/shuttle/escape_pod3/transit) - end_location = locate(/area/shuttle/escape_pod3/centcom) - start_location.move_contents_to(end_location, null, NORTH) - - //There is no pod 4, apparently. - - start_location = locate(/area/shuttle/escape_pod5/station) - end_location = locate(/area/shuttle/escape_pod5/transit) - end_location = locate(/area/shuttle/escape_pod5/centcom) - start_location.move_contents_to(end_location, null, EAST) - - -*/ \ No newline at end of file + D.open() \ No newline at end of file