diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm
index 5b1b6a60d1..7fb3a56c61 100644
--- a/code/controllers/emergency_shuttle_controller.dm
+++ b/code/controllers/emergency_shuttle_controller.dm
@@ -22,6 +22,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg'))
var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg'))
+/datum/emergency_shuttle_controller/New()
+ escape_pods = list()
+ ..()
+
/datum/emergency_shuttle_controller/proc/process()
if (wait_for_launch)
if (evac && auto_recall && world.time >= auto_recall_time)
diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm
index c95e4f242f..d881a65a4a 100644
--- a/code/controllers/shuttle_controller.dm
+++ b/code/controllers/shuttle_controller.dm
@@ -15,8 +15,13 @@ var/global/datum/shuttle_controller/shuttle_controller
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
/datum/shuttle_controller/proc/setup_shuttle_docks()
- for(var/shuttle_tag in shuttles)
- var/datum/shuttle/shuttle = shuttles[shuttle_tag]
+// for(var/shuttle_tag in shuttles)
+// var/datum/shuttle/shuttle = shuttles[shuttle_tag]
+ for(var/shuttle_type in subtypesof(/datum/shuttle))
+ var/datum/shuttle/shuttle = shuttle_type
+ if(initial(shuttle.category) == shuttle_type)
+ continue
+ shuttle = new shuttle()
shuttle.init_docking_controllers()
shuttle.dock() //makes all shuttles docked to something at round start go into the docked state
@@ -28,311 +33,3 @@ var/global/datum/shuttle_controller/shuttle_controller
shuttles = list()
process_shuttles = list()
- var/datum/shuttle/ferry/shuttle
-
- // Escape shuttle and pods
- shuttle = new/datum/shuttle/ferry/emergency()
- shuttle.location = 1
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/shuttle/escape/centcom)
- shuttle.area_station = locate(/area/shuttle/escape/station)
- shuttle.area_transition = locate(/area/shuttle/escape/transit)
- shuttle.docking_controller_tag = "escape_shuttle"
- shuttle.dock_target_station = "escape_dock"
- shuttle.dock_target_offsite = "centcom_dock"
- shuttle.transit_direction = NORTH
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
- //shuttle.docking_controller_tag = "supply_shuttle"
- //shuttle.dock_target_station = "cargo_bay"
- shuttles["Escape"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod1/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod1/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod1/transit)
- shuttle.docking_controller_tag = "escape_pod_1"
- shuttle.dock_target_station = "escape_pod_1_berth"
- shuttle.dock_target_offsite = "escape_pod_1_recovery"
- shuttle.transit_direction = NORTH
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 1"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod2/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod2/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod2/transit)
- shuttle.docking_controller_tag = "escape_pod_2"
- shuttle.dock_target_station = "escape_pod_2_berth"
- shuttle.dock_target_offsite = "escape_pod_2_recovery"
- shuttle.transit_direction = NORTH
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 2"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod3/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod3/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod3/transit)
- shuttle.docking_controller_tag = "escape_pod_3"
- shuttle.dock_target_station = "escape_pod_3_berth"
- shuttle.dock_target_offsite = "escape_pod_3_recovery"
- shuttle.transit_direction = NORTH
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 3"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod4/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod4/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod4/transit)
- shuttle.docking_controller_tag = "escape_pod_4"
- shuttle.dock_target_station = "escape_pod_4_berth"
- shuttle.dock_target_offsite = "escape_pod_4_recovery"
- shuttle.transit_direction = NORTH //should this be SOUTH? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 4"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod5/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod5/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod5/transit)
- shuttle.docking_controller_tag = "escape_pod_5"
- shuttle.dock_target_station = "escape_pod_5_berth"
- shuttle.dock_target_offsite = "escape_pod_5_recovery"
- shuttle.transit_direction = NORTH //should this be WEST? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 5"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/escape_pod6/station)
- shuttle.area_offsite = locate(/area/shuttle/escape_pod6/centcom)
- shuttle.area_transition = locate(/area/shuttle/escape_pod6/transit)
- shuttle.docking_controller_tag = "escape_pod_6"
- shuttle.dock_target_station = "escape_pod_6_berth"
- shuttle.dock_target_offsite = "escape_pod_6_recovery"
- shuttle.transit_direction = NORTH //should this be WEST? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Escape Pod 6"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/cryo/station)
- shuttle.area_offsite = locate(/area/shuttle/cryo/centcom)
- shuttle.area_transition = locate(/area/shuttle/cryo/transit)
- shuttle.docking_controller_tag = "cryostorage_shuttle"
- shuttle.dock_target_station = "cryostorage_shuttle_berth"
- shuttle.dock_target_offsite = "cryostorage_shuttle_recovery"
- shuttle.transit_direction = NORTH //should this be WEST? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Cryostorage Shuttle"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/large_escape_pod1/station)
- shuttle.area_offsite = locate(/area/shuttle/large_escape_pod1/centcom)
- shuttle.area_transition = locate(/area/shuttle/large_escape_pod1/transit)
- shuttle.docking_controller_tag = "large_escape_pod_1"
- shuttle.dock_target_station = "large_escape_pod_1_berth"
- shuttle.dock_target_offsite = "large_escape_pod_1_recovery"
- shuttle.transit_direction = EAST //should this be WEST? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Large Escape Pod 1"] = shuttle
-
- shuttle = new/datum/shuttle/ferry/escape_pod()
- shuttle.location = 0
- shuttle.warmup_time = 0
- shuttle.area_station = locate(/area/shuttle/large_escape_pod2/station)
- shuttle.area_offsite = locate(/area/shuttle/large_escape_pod2/centcom)
- shuttle.area_transition = locate(/area/shuttle/large_escape_pod2/transit)
- shuttle.docking_controller_tag = "large_escape_pod_2"
- shuttle.dock_target_station = "large_escape_pod_2_berth"
- shuttle.dock_target_offsite = "large_escape_pod_2_recovery"
- shuttle.transit_direction = EAST //should this be WEST? I have no idea.
- shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
- process_shuttles += shuttle
- shuttles["Large Escape Pod 2"] = shuttle
-
- //give the emergency shuttle controller it's shuttles
- emergency_shuttle.shuttle = shuttles["Escape"]
- emergency_shuttle.escape_pods = list(
- shuttles["Escape Pod 1"],
- shuttles["Escape Pod 2"],
- shuttles["Escape Pod 3"],
- shuttles["Escape Pod 4"],
- shuttles["Escape Pod 5"],
- shuttles["Escape Pod 6"],
- shuttles["Cryostorage Shuttle"],
- shuttles["Large Escape Pod 1"],
- shuttles["Large Escape Pod 2"],
- )
-
- // Supply shuttle
- shuttle = new/datum/shuttle/ferry/supply()
- shuttle.location = 1
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/supply/dock)
- shuttle.area_station = locate(/area/supply/station)
- shuttle.docking_controller_tag = "supply_shuttle"
- shuttle.dock_target_station = "cargo_bay"
- shuttles["Supply"] = shuttle
- process_shuttles += shuttle
-
- supply_controller.shuttle = shuttle
-
- // Admin shuttles.
- shuttle = new()
- shuttle.location = 1
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/shuttle/transport1/centcom)
- shuttle.area_station = locate(/area/shuttle/transport1/station)
- shuttle.docking_controller_tag = "centcom_shuttle"
- shuttle.dock_target_station = "centcom_shuttle_dock_airlock"
- shuttle.dock_target_offsite = "centcom_shuttle_bay"
- shuttles["CentCom"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new()
- shuttle.location = 1
- shuttle.warmup_time = 10 //want some warmup time so people can cancel.
- shuttle.area_offsite = locate(/area/shuttle/administration/centcom)
- shuttle.area_station = locate(/area/shuttle/administration/station)
- shuttle.docking_controller_tag = "admin_shuttle"
- shuttle.dock_target_station = "admin_shuttle_dock_airlock"
- shuttle.dock_target_offsite = "admin_shuttle_bay"
- shuttles["Administration"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new()
- shuttle.location = 1
- shuttle.warmup_time = 10 //want some warmup time so people can cancel.
- shuttle.area_offsite = locate(/area/shuttle/trade/centcom)
- shuttle.area_station = locate(/area/shuttle/trade/station)
- shuttle.docking_controller_tag = "trade_shuttle"
- shuttle.dock_target_station = "trade_shuttle_dock_airlock"
- shuttle.dock_target_offsite = "trade_shuttle_bay"
- shuttles["Trade"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new()
- shuttle.area_offsite = locate(/area/shuttle/alien/base)
- shuttle.area_station = locate(/area/shuttle/alien/mine)
- shuttles["Alien"] = shuttle
- //process_shuttles += shuttle //don't need to process this. It can only be moved using admin magic anyways.
-
- // Public shuttles
- shuttle = new()
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/shuttle/constructionsite/site)
- shuttle.area_station = locate(/area/shuttle/constructionsite/station)
- shuttle.docking_controller_tag = "engineering_shuttle"
- shuttle.dock_target_station = "engineering_dock_airlock"
- shuttle.dock_target_offsite = "edock_airlock"
- shuttles["Engineering"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new()
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/shuttle/mining/outpost)
- shuttle.area_station = locate(/area/shuttle/mining/station)
- shuttle.docking_controller_tag = "mining_shuttle"
- shuttle.dock_target_station = "mining_dock_airlock"
- shuttle.dock_target_offsite = "mining_outpost_airlock"
- shuttles["Mining"] = shuttle
- process_shuttles += shuttle
-
- shuttle = new()
- shuttle.warmup_time = 10
- shuttle.area_offsite = locate(/area/shuttle/research/outpost)
- shuttle.area_station = locate(/area/shuttle/research/station)
- shuttle.docking_controller_tag = "research_shuttle"
- shuttle.dock_target_station = "research_dock_airlock"
- shuttle.dock_target_offsite = "research_outpost_dock"
- shuttles["Research"] = shuttle
- process_shuttles += shuttle
-
- // ERT Shuttle
- var/datum/shuttle/ferry/multidock/specops/ERT = new()
- ERT.location = 0
- ERT.warmup_time = 10
- ERT.area_offsite = locate(/area/shuttle/specops/station) //centcom is the home station, the player station is offsite
- ERT.area_station = locate(/area/shuttle/specops/centcom)
- ERT.docking_controller_tag = "specops_shuttle_port"
- ERT.docking_controller_tag_station = "specops_shuttle_port"
- ERT.docking_controller_tag_offsite = "specops_shuttle_fore"
- ERT.dock_target_station = "specops_centcom_dock"
- ERT.dock_target_offsite = "specops_dock_airlock"
- shuttles["Special Operations"] = ERT
- process_shuttles += ERT
-
- //Skipjack.
- var/datum/shuttle/multi_shuttle/VS = new/datum/shuttle/multi_shuttle()
- VS.origin = locate(/area/skipjack_station/start)
-
- VS.destinations = list(
- "Fore Starboard Solars" = locate(/area/skipjack_station/northeast_solars),
- "Fore Port Solars" = locate(/area/skipjack_station/northwest_solars),
- "Aft Starboard Solars" = locate(/area/skipjack_station/southeast_solars),
- "Aft Port Solars" = locate(/area/skipjack_station/southwest_solars),
- "Mining Station" = locate(/area/skipjack_station/mining)
- )
-
- VS.announcer = "Colony Automated Radar Array"
- VS.arrival_message = "Attention. Unidentified object approaching the colony."
- VS.departure_message = "Attention. Unidentified object exiting local space. Unidentified object expected to escape Kara gravity well with current velocity."
- VS.interim = locate(/area/skipjack_station/transit)
-
- VS.warmup_time = 0
- shuttles["Skipjack"] = VS
-
- //Nuke Ops shuttle.
- var/datum/shuttle/multi_shuttle/MS = new/datum/shuttle/multi_shuttle()
- MS.origin = locate(/area/syndicate_station/start)
- MS.start_location = "Mercenary Base"
-
- MS.destinations = list(
- "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 Station" = locate(/area/syndicate_station/mining),
- "Arrivals dock" = locate(/area/syndicate_station/arrivals_dock),
- )
-
- MS.docking_controller_tag = "merc_shuttle"
- MS.destination_dock_targets = list(
- "Mercenary Base" = "merc_base",
- "Arrivals dock" = "nuke_shuttle_dock_airlock",
- )
-
- MS.announcer = "Automated Traffic Control"
- MS.arrival_message = "Attention. A vessel is approaching the colony."
- MS.departure_message = "Attention. A vessel is now leaving from the colony."
- MS.interim = locate(/area/syndicate_station/transit)
-
- MS.warmup_time = 0
- shuttles["Mercenary"] = MS
-
diff --git a/code/modules/shuttles/_defines.dm b/code/modules/shuttles/_defines.dm
new file mode 100644
index 0000000000..ad8c39466b
--- /dev/null
+++ b/code/modules/shuttles/_defines.dm
@@ -0,0 +1,4 @@
+#define SHUTTLE_FLAGS_NONE 0
+#define SHUTTLE_FLAGS_PROCESS 1
+#define SHUTTLE_FLAGS_SUPPLY 2
+#define SHUTTLE_FLAGS_ALL (~SHUTTLE_FLAGS_NONE)
\ No newline at end of file
diff --git a/code/modules/shuttles/escape_pods.dm b/code/modules/shuttles/escape_pods.dm
index fd6aabc4a2..b832e94dbd 100644
--- a/code/modules/shuttles/escape_pods.dm
+++ b/code/modules/shuttles/escape_pods.dm
@@ -1,16 +1,24 @@
/datum/shuttle/ferry/escape_pod
var/datum/computer/file/embedded_program/docking/simple/escape_pod/arming_controller
+ category = /datum/shuttle/ferry/escape_pod
+
+/datum/shuttle/ferry/escape_pod/New()
+ move_time = move_time + rand(-30, 60)
+ if(name in emergency_shuttle.escape_pods)
+ CRASH("An escape pod with the name '[name]' has already been defined.")
+ emergency_shuttle.escape_pods[name] = src
+ ..()
/datum/shuttle/ferry/escape_pod/init_docking_controllers()
..()
arming_controller = locate(dock_target_station)
if(!istype(arming_controller))
- world << "warning: escape pod with station dock tag [dock_target_station] could not find it's dock target!"
-
+ warning("warning: escape pod with station dock tag [dock_target_station] could not find it's dock target!")
+
if(docking_controller)
var/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/controller_master = docking_controller.master
if(!istype(controller_master))
- world << "warning: escape pod with docking tag [docking_controller_tag] could not find it's controller master!"
+ warning("warning: escape pod with docking tag [docking_controller_tag] could not find it's controller master!")
else
controller_master.pod = src
@@ -29,7 +37,7 @@
/datum/shuttle/ferry/escape_pod/can_cancel()
return 0
-
+
//This controller goes on the escape pod itself
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod
name = "escape pod controller"
@@ -58,7 +66,7 @@
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/Topic(href, href_list)
if(..())
return 1
-
+
if("manual_arm")
pod.arming_controller.arm()
if("force_launch")
@@ -87,7 +95,7 @@
if (istype(docking_program, /datum/computer/file/embedded_program/docking/simple/escape_pod))
var/datum/computer/file/embedded_program/docking/simple/escape_pod/P = docking_program
armed = P.armed
-
+
data = list(
"docking_status" = docking_program.get_docking_status(),
"override_enabled" = docking_program.override_enabled,
diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm
index 8c6e611886..f7f655ba4d 100644
--- a/code/modules/shuttles/shuttle.dm
+++ b/code/modules/shuttles/shuttle.dm
@@ -4,6 +4,7 @@
//shuttle moving state defines are in setup.dm
/datum/shuttle
+ var/name = ""
var/warmup_time = 0
var/moving_status = SHUTTLE_IDLE
@@ -12,6 +13,28 @@
var/arrive_time = 0 //the time at which the shuttle arrives when long jumping
+ var/flags = SHUTTLE_FLAGS_PROCESS
+ var/category = /datum/shuttle
+
+/datum/shuttle/New()
+ ..()
+ if(src.name in shuttle_controller.shuttles)
+ CRASH("A shuttle with the name '[name]' is already defined.")
+ shuttle_controller.shuttles[src.name] = src
+ if(flags & SHUTTLE_FLAGS_PROCESS)
+ shuttle_controller.process_shuttles += src
+ if(flags & SHUTTLE_FLAGS_SUPPLY)
+ if(supply_controller.shuttle)
+ CRASH("A supply shuttle is already defined.")
+ supply_controller.shuttle = src
+
+/datum/shuttle/Destroy()
+ shuttle_controller.shuttles -= src.name
+ shuttle_controller.process_shuttles -= src
+ if(supply_controller.shuttle == src)
+ supply_controller.shuttle = null
+ . = ..()
+
/datum/shuttle/proc/init_docking_controllers()
if(docking_controller_tag)
docking_controller = locate(docking_controller_tag)
diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm
index beea1781b4..347243ae5c 100644
--- a/code/modules/shuttles/shuttle_emergency.dm
+++ b/code/modules/shuttles/shuttle_emergency.dm
@@ -1,5 +1,11 @@
/datum/shuttle/ferry/emergency
- //pass
+ category = /datum/shuttle/ferry/emergency
+
+/datum/shuttle/ferry/emergency/New()
+ if(emergency_shuttle.shuttle)
+ CRASH("An emergency shuttle has already been defined.")
+ emergency_shuttle.shuttle = src
+ ..()
/datum/shuttle/ferry/emergency/arrived()
if (istype(in_use, /obj/machinery/computer/shuttle_control/emergency))
diff --git a/code/modules/shuttles/shuttle_ferry.dm b/code/modules/shuttles/shuttle_ferry.dm
index 0a288a1ba9..d076357735 100644
--- a/code/modules/shuttles/shuttle_ferry.dm
+++ b/code/modules/shuttles/shuttle_ferry.dm
@@ -11,13 +11,21 @@
var/move_time = 0 //the time spent in the transition area
var/transit_direction = null //needed for area/move_contents_to() to properly handle shuttle corners - not exactly sure how it works.
- var/area_station
- var/area_offsite
+ var/area/area_station
+ var/area/area_offsite
//TODO: change location to a string and use a mapping for area and dock targets.
var/dock_target_station
var/dock_target_offsite
var/last_dock_attempt_time = 0
+ category = /datum/shuttle/ferry
+
+/datum/shuttle/ferry/New()
+ area_offsite = locate(area_offsite)
+ area_station = locate(area_station)
+ if(area_transition)
+ area_transition = locate(area_transition)
+ ..()
/datum/shuttle/ferry/short_jump(var/area/origin,var/area/destination)
if(isnull(location))
diff --git a/code/modules/shuttles/shuttle_specops.dm b/code/modules/shuttles/shuttle_specops.dm
index 434bb37f42..d9cc121f79 100644
--- a/code/modules/shuttles/shuttle_specops.dm
+++ b/code/modules/shuttles/shuttle_specops.dm
@@ -13,16 +13,17 @@
var/docking_controller_tag_offsite
var/datum/computer/file/embedded_program/docking/docking_controller_station
var/datum/computer/file/embedded_program/docking/docking_controller_offsite
+ category = /datum/shuttle/ferry/multidock
/datum/shuttle/ferry/multidock/init_docking_controllers()
if(docking_controller_tag_station)
docking_controller_station = locate(docking_controller_tag_station)
if(!istype(docking_controller_station))
- world << "warning: shuttle with docking tag [docking_controller_station] could not find it's controller!"
+ warning("warning: shuttle with docking tag [docking_controller_station] could not find it's controller!")
if(docking_controller_tag_offsite)
docking_controller_offsite = locate(docking_controller_tag_offsite)
if(!istype(docking_controller_offsite))
- world << "warning: shuttle with docking tag [docking_controller_offsite] could not find it's controller!"
+ warning("warning: shuttle with docking tag [docking_controller_offsite] could not find it's controller!")
if (!location)
docking_controller = docking_controller_station
else
@@ -43,6 +44,7 @@
var/reset_time = 0 //the world.time at which the shuttle will be ready to move again.
var/launch_prep = 0
var/cancel_countdown = 0
+ category = /datum/shuttle/ferry/multidock/specops
/datum/shuttle/ferry/multidock/specops/New()
..()
diff --git a/code/modules/shuttles/shuttle_supply.dm b/code/modules/shuttles/shuttle_supply.dm
index c4122434e7..9a6b7f3380 100644
--- a/code/modules/shuttles/shuttle_supply.dm
+++ b/code/modules/shuttles/shuttle_supply.dm
@@ -2,11 +2,12 @@
var/away_location = 1 //the location to hide at while pretending to be in-transit
var/late_chance = 80
var/max_late_time = 300
+ category = /datum/shuttle/ferry/supply
/datum/shuttle/ferry/supply/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE)
return
-
+
if(isnull(location))
return
@@ -18,21 +19,21 @@
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
- if (moving_status == SHUTTLE_IDLE)
+ if (moving_status == SHUTTLE_IDLE)
return //someone cancelled the launch
-
+
if (at_station() && forbidden_atoms_check())
//cancel the launch because of forbidden atoms. announce over supply channel?
moving_status = SHUTTLE_IDLE
return
-
+
if (!at_station()) //at centcom
supply_controller.buy()
-
+
//We pretend it's a long_jump by making the shuttle stay at centcom for the "in-transit" period.
var/area/away_area = get_location_area(away_location)
moving_status = SHUTTLE_INTRANSIT
-
+
//If we are at the away_area then we are just pretending to move, otherwise actually do the move
if (origin != away_area)
move(origin, away_area)
@@ -46,11 +47,11 @@
//late
if (prob(late_chance))
sleep(rand(0,max_late_time))
-
+
move(away_area, destination)
-
+
moving_status = SHUTTLE_IDLE
-
+
if (!at_station()) //at centcom
supply_controller.sell()
@@ -58,7 +59,7 @@
/datum/shuttle/ferry/supply/proc/forbidden_atoms_check()
if (!at_station())
return 0 //if badmins want to send mobs or a nuke on the supply shuttle from centcom we don't care
-
+
return supply_controller.forbidden_atoms_check(get_location_area())
/datum/shuttle/ferry/supply/proc/at_station()
diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm
index 47b430329a..9dc7e4312e 100644
--- a/code/modules/shuttles/shuttles_multi.dm
+++ b/code/modules/shuttles/shuttles_multi.dm
@@ -1,6 +1,7 @@
//This is a holder for things like the Skipjack and Nuke shuttle.
/datum/shuttle/multi_shuttle
+ flags = SHUTTLE_FLAGS_NONE
var/cloaked = 1
var/at_origin = 1
var/returned_home = 0
@@ -22,8 +23,13 @@
var/list/destination_dock_targets = list()
var/area/origin
var/return_warning = 0
+ category = /datum/shuttle/multi_shuttle
/datum/shuttle/multi_shuttle/New()
+ origin = locate(origin)
+ interim = locate(interim)
+ for(var/destination in destinations)
+ destinations[destination] = locate(destinations[destination])
..()
/datum/shuttle/multi_shuttle/init_docking_controllers()
@@ -36,7 +42,7 @@
var/datum/computer/file/embedded_program/docking/C = locate(controller_tag)
if(!istype(C))
- world << "warning: shuttle with docking tag [controller_tag] could not find it's controller!"
+ warning("warning: shuttle with docking tag [controller_tag] could not find it's controller!")
else
destination_dock_controllers[destination] = C
diff --git a/maps/northern_star/northern_star.dm b/maps/northern_star/northern_star.dm
index 2212774657..fe95bbaeb6 100644
--- a/maps/northern_star/northern_star.dm
+++ b/maps/northern_star/northern_star.dm
@@ -7,6 +7,7 @@
#include "polaris-5.dmm"
#include "northern_star_defines.dm"
+ #include "northern_star_shuttles.dm"
#define USING_MAP_DATUM /datum/map/northern_star
diff --git a/maps/northern_star/northern_star_shuttles.dm b/maps/northern_star/northern_star_shuttles.dm
new file mode 100644
index 0000000000..44a5e1a5bd
--- /dev/null
+++ b/maps/northern_star/northern_star_shuttles.dm
@@ -0,0 +1,272 @@
+// Escape shuttle and pods
+/datum/shuttle/ferry/emergency/centcom
+ name = "Escape"
+ location = 1
+ warmup_time = 10
+ area_offsite = /area/shuttle/escape/centcom
+ area_station = /area/shuttle/escape/station
+ area_transition = /area/shuttle/escape/transit
+ docking_controller_tag = "escape_shuttle"
+ dock_target_station = "escape_dock"
+ dock_target_offsite = "centcom_dock"
+ transit_direction = NORTH
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_one
+ name = "Escape Pod 1"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod1/station
+ area_offsite = /area/shuttle/escape_pod1/centcom
+ area_transition = /area/shuttle/escape_pod1/transit
+ docking_controller_tag = "escape_pod_1"
+ dock_target_station = "escape_pod_1_berth"
+ dock_target_offsite = "escape_pod_1_recovery"
+ transit_direction = NORTH
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_two
+ name = "Escape Pod 2"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod2/station
+ area_offsite = /area/shuttle/escape_pod2/centcom
+ area_transition = /area/shuttle/escape_pod2/transit
+ docking_controller_tag = "escape_pod_2"
+ dock_target_station = "escape_pod_2_berth"
+ dock_target_offsite = "escape_pod_2_recovery"
+ transit_direction = NORTH
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_three
+ name = "Escape Pod 3"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod3/station
+ area_offsite = /area/shuttle/escape_pod3/centcom
+ area_transition = /area/shuttle/escape_pod3/transit
+ docking_controller_tag = "escape_pod_3"
+ dock_target_station = "escape_pod_3_berth"
+ dock_target_offsite = "escape_pod_3_recovery"
+ transit_direction = NORTH
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_four
+ name = "Escape Pod 4"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod4/station
+ area_offsite = /area/shuttle/escape_pod4/centcom
+ area_transition = /area/shuttle/escape_pod4/transit
+ docking_controller_tag = "escape_pod_4"
+ dock_target_station = "escape_pod_4_berth"
+ dock_target_offsite = "escape_pod_4_recovery"
+ transit_direction = NORTH //should this be SOUTH? I have no idea.
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_five
+ name = "Escape Pod 5"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod5/station
+ area_offsite = /area/shuttle/escape_pod5/centcom
+ area_transition = /area/shuttle/escape_pod5/transit
+ docking_controller_tag = "escape_pod_5"
+ dock_target_station = "escape_pod_5_berth"
+ dock_target_offsite = "escape_pod_5_recovery"
+ transit_direction = NORTH //should this be WEST? I have no idea.
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_six
+ name = "Escape Pod 6"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/escape_pod6/station
+ area_offsite = /area/shuttle/escape_pod6/centcom
+ area_transition = /area/shuttle/escape_pod6/transit
+ docking_controller_tag = "escape_pod_6"
+ dock_target_station = "escape_pod_6_berth"
+ dock_target_offsite = "escape_pod_6_recovery"
+ transit_direction = NORTH //should this be WEST? I have no idea.
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/escape_pod_cryo
+ name = "Cryostorage Shuttle"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/cryo/station
+ area_offsite = /area/shuttle/cryo/centcom
+ area_transition = /area/shuttle/cryo/transit
+ docking_controller_tag = "cryostorage_shuttle"
+ dock_target_station = "cryostorage_shuttle_berth"
+ dock_target_offsite = "cryostorage_shuttle_recovery"
+ transit_direction = NORTH
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/large_escape_pod1
+ name = "Large Escape Pod 1"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/large_escape_pod1/station
+ area_offsite = /area/shuttle/large_escape_pod1/centcom
+ area_transition = /area/shuttle/large_escape_pod1/transit
+ docking_controller_tag = "large_escape_pod_1"
+ dock_target_station = "large_escape_pod_1_berth"
+ dock_target_offsite = "large_escape_pod_1_recovery"
+ transit_direction = EAST
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+/datum/shuttle/ferry/escape_pod/large_escape_pod2
+ name = "Large Escape Pod 2"
+ location = 0
+ warmup_time = 0
+ area_station = /area/shuttle/large_escape_pod2/station
+ area_offsite = /area/shuttle/large_escape_pod2/centcom
+ area_transition = /area/shuttle/large_escape_pod2/transit
+ docking_controller_tag = "large_escape_pod_2"
+ dock_target_station = "large_escape_pod_2_berth"
+ dock_target_offsite = "large_escape_pod_2_recovery"
+ transit_direction = EAST
+ move_time = SHUTTLE_TRANSIT_DURATION_RETURN
+
+// Cargo shuttle.
+/datum/shuttle/ferry/supply/cargo
+ name = "Supply"
+ location = 1
+ warmup_time = 10
+ area_offsite = /area/supply/dock
+ area_station = /area/supply/station
+ docking_controller_tag = "supply_shuttle"
+ dock_target_station = "cargo_bay"
+ flags = SHUTTLE_FLAGS_PROCESS|SHUTTLE_FLAGS_SUPPLY
+
+// The "Elevators"
+/datum/shuttle/ferry/engineering
+ name = "Engineering"
+ warmup_time = 10
+ area_offsite = /area/shuttle/constructionsite/site
+ area_station = /area/shuttle/constructionsite/station
+ docking_controller_tag = "engineering_shuttle"
+ dock_target_station = "engineering_dock_airlock"
+ dock_target_offsite = "edock_airlock"
+
+/datum/shuttle/ferry/mining
+ name = "Mining"
+ warmup_time = 10
+ area_offsite = /area/shuttle/mining/outpost
+ area_station = /area/shuttle/mining/station
+ docking_controller_tag = "mining_shuttle"
+ dock_target_station = "mining_dock_airlock"
+ dock_target_offsite = "mining_outpost_airlock"
+
+/datum/shuttle/ferry/research
+ name = "Research"
+ warmup_time = 10
+ area_offsite = /area/shuttle/research/outpost
+ area_station = /area/shuttle/research/station
+ docking_controller_tag = "research_shuttle"
+ dock_target_station = "research_dock_airlock"
+ dock_target_offsite = "research_outpost_dock"
+
+// Admin shuttles.
+/datum/shuttle/ferry/centcom
+ name = "Centcom"
+ location = 1
+ warmup_time = 10
+ area_offsite = /area/shuttle/transport1/centcom
+ area_station = /area/shuttle/transport1/station
+ docking_controller_tag = "centcom_shuttle"
+ dock_target_station = "centcom_shuttle_dock_airlock"
+ dock_target_offsite = "centcom_shuttle_bay"
+
+/datum/shuttle/ferry/administration
+ name = "Administration"
+ location = 1
+ warmup_time = 10 //want some warmup time so people can cancel.
+ area_offsite = /area/shuttle/administration/centcom
+ area_station = /area/shuttle/administration/station
+ docking_controller_tag = "admin_shuttle"
+ dock_target_station = "admin_shuttle_dock_airlock"
+ dock_target_offsite = "admin_shuttle_bay"
+
+// Traders
+/datum/shuttle/ferry/trade
+ name = "Trade"
+ location = 1
+ warmup_time = 10 //want some warmup time so people can cancel.
+ area_offsite = /area/shuttle/trade/centcom
+ area_station = /area/shuttle/trade/station
+ docking_controller_tag = "trade_shuttle"
+ dock_target_station = "trade_shuttle_dock_airlock"
+ dock_target_offsite = "trade_shuttle_bay"
+
+// Is this even used?
+/datum/shuttle/ferry/alien
+ name = "Alien"
+ area_offsite = /area/shuttle/alien/base
+ area_station = /area/shuttle/alien/mine
+ flags = SHUTTLE_FLAGS_NONE
+
+// Mercenary
+/datum/shuttle/multi_shuttle/mercenary
+ name = "Mercenary"
+ warmup_time = 0
+ origin = /area/syndicate_station/start
+ interim = /area/syndicate_station/transit
+ start_location = "Mercenary Base"
+ 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 Station" = /area/syndicate_station/mining,
+ "Arrivals dock" = /area/syndicate_station/arrivals_dock,
+ )
+ docking_controller_tag = "merc_shuttle"
+ destination_dock_targets = list(
+ "Mercenary Base" = "merc_base",
+ "Arrivals dock" = "nuke_shuttle_dock_airlock",
+ )
+ announcer = "Automated Traffic Control"
+
+/datum/shuttle/multi_shuttle/mercenary/New()
+ arrival_message = "Attention. A vessel is approaching the colony."
+ departure_message = "Attention. A vessel is now leaving from the colony."
+ ..()
+
+// Heist
+/datum/shuttle/multi_shuttle/skipjack
+ name = "Skipjack"
+ warmup_time = 0
+ origin = /area/skipjack_station/start
+ interim = /area/skipjack_station/transit
+ destinations = list(
+ "Fore Starboard Solars" = /area/skipjack_station/northeast_solars,
+ "Fore Port Solars" = /area/skipjack_station/northwest_solars,
+ "Aft Starboard Solars" = /area/skipjack_station/southeast_solars,
+ "Aft Port Solars" = /area/skipjack_station/southwest_solars,
+ "Mining Station" = /area/skipjack_station/mining
+ )
+ announcer = "Automated Traffic Control"
+
+/datum/shuttle/multi_shuttle/skipjack/New()
+ arrival_message = "Attention. Unidentified object approaching the colony."
+ departure_message = "Attention. Unidentified object exiting local space. Unidentified object expected to escape Kara gravity well with current velocity."
+ ..()
+
+/datum/shuttle/ferry/multidock/specops/ert
+ name = "Special Operations"
+ location = 0
+ warmup_time = 10
+ area_offsite = /area/shuttle/specops/station //centcom is the home station, the Exodus is offsite
+ area_station = /area/shuttle/specops/centcom
+ docking_controller_tag = "specops_shuttle_port"
+ docking_controller_tag_station = "specops_shuttle_port"
+ docking_controller_tag_offsite = "specops_shuttle_fore"
+ dock_target_station = "specops_centcom_dock"
+ dock_target_offsite = "specops_dock_airlock"
+
+
diff --git a/polaris.dme b/polaris.dme
index 3b49b9566b..c9e1935850 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -2039,6 +2039,7 @@
#include "code\modules\shieldgen\shield_diffuser.dm"
#include "code\modules\shieldgen\shield_gen.dm"
#include "code\modules\shieldgen\shield_gen_external.dm"
+#include "code\modules\shuttles\_defines.dm"
#include "code\modules\shuttles\antagonist.dm"
#include "code\modules\shuttles\departmental.dm"
#include "code\modules\shuttles\escape_pods.dm"