diff --git a/aurorastation.dme b/aurorastation.dme index b353758e1f3..fbadf7b6954 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2483,6 +2483,7 @@ #include "code\modules\shuttles\escape_pods.dm" #include "code\modules\shuttles\shuttle.dm" #include "code\modules\shuttles\shuttle_arrival.dm" +#include "code\modules\shuttles\shuttle_autoreturn.dm" #include "code\modules\shuttles\shuttle_console.dm" #include "code\modules\shuttles\shuttle_emergency.dm" #include "code\modules\shuttles\shuttle_ferry.dm" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f73ee0ab596..131c52431e4 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -384,6 +384,7 @@ var/list/admin_verbs_cciaa = list( /client/proc/cmd_admin_create_centcom_report, /client/proc/cmd_cciaa_say, /datum/admins/proc/create_admin_fax, + /client/proc/launch_ccia_shuttle, /client/proc/check_fax_history, /client/proc/aooc, /client/proc/check_antagonists, diff --git a/code/modules/cciaa/cciaa.dm b/code/modules/cciaa/cciaa.dm index de3d3507a1a..d6e9b88a32c 100644 --- a/code/modules/cciaa/cciaa.dm +++ b/code/modules/cciaa/cciaa.dm @@ -98,4 +98,13 @@ else data += "
No faxes have been sent out.
" - usr << browse("Centcomm Fax History[data]", "window=Centcomm Fax History") \ No newline at end of file + usr << browse("Centcomm Fax History[data]", "window=Centcomm Fax History") + + +/client/proc/launch_ccia_shuttle() + set name = "Launch CCIA Shuttle" + set desc = "Launches the CCIA Shuttle." + set category = "Special Verbs" + + var/datum/shuttle/ferry/S = shuttle_controller.shuttles["Centcom"] + S.launch(usr) diff --git a/code/modules/shuttles/shuttle_autoreturn.dm b/code/modules/shuttles/shuttle_autoreturn.dm new file mode 100644 index 00000000000..3be34bf905c --- /dev/null +++ b/code/modules/shuttles/shuttle_autoreturn.dm @@ -0,0 +1,17 @@ +/datum/shuttle/ferry/autoreturn + var/auto_return_time = 60 //Time after which the shuttle should return in seconds + +/datum/shuttle/ferry/autoreturn/arrived() + addtimer(CALLBACK(src, .proc/announce_return), 20) + addtimer(CALLBACK(src, .proc/do_return), auto_return_time*10) + +/datum/shuttle/ferry/autoreturn/proc/announce_return() + if(!location) + for(var/turf/T in get_area_turfs(area_station)) + var/mob/M = locate(/mob) in T + to_chat(M, span("notice","You have arrived at [current_map.station_name]. The shuttle will return in [auto_return_time] seconds.")) + +/datum/shuttle/ferry/autoreturn/proc/do_return() + if(!location) + launch(null) + force_launch(null) diff --git a/code/modules/shuttles/shuttle_ferry.dm b/code/modules/shuttles/shuttle_ferry.dm index 049b90b3a67..c93b6ebd36a 100644 --- a/code/modules/shuttles/shuttle_ferry.dm +++ b/code/modules/shuttles/shuttle_ferry.dm @@ -19,7 +19,7 @@ var/last_dock_attempt_time = 0 -/datum/shuttle/ferry/short_jump(var/area/origin,var/area/destination) +/datum/shuttle/ferry/short_jump(var/area/origin, var/area/destination) if(isnull(location)) return diff --git a/html/changelogs/arrow768-autoreturn.yml b/html/changelogs/arrow768-autoreturn.yml new file mode 100644 index 00000000000..aff1de9c9ce --- /dev/null +++ b/html/changelogs/arrow768-autoreturn.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Arrow768 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "The CCIA shuttle automatically returns to CentCom." diff --git a/maps/aurora/code/aurora_shuttles.dm b/maps/aurora/code/aurora_shuttles.dm index c4a6fd4cd71..4ae61c76f3f 100644 --- a/maps/aurora/code/aurora_shuttles.dm +++ b/maps/aurora/code/aurora_shuttles.dm @@ -51,31 +51,7 @@ shuttles["Escape Pod 3"] ) - // 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 - START_PROCESSING(shuttle_controller, 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 - START_PROCESSING(shuttle_controller, shuttle) - // Merchant Shuttle - shuttle = new() shuttle.location = 1 shuttle.warmup_time = 5 @@ -90,6 +66,30 @@ shuttles["Merchant"] = shuttle START_PROCESSING(shuttle_controller, shuttle) + // Admin 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 + START_PROCESSING(shuttle_controller, shuttle) + + // CCIA Shuttle + var/datum/shuttle/ferry/autoreturn/A = new() + A.location = 1 + A.warmup_time = 10 + A.area_offsite = locate(/area/shuttle/transport1/centcom) + A.area_station = locate(/area/shuttle/transport1/station) + A.docking_controller_tag = "centcom_shuttle" + A.dock_target_station = "centcom_shuttle_dock_airlock" + A.dock_target_offsite = "centcom_shuttle_bay" + shuttles["Centcom"] = A + START_PROCESSING(shuttle_controller, A) + // ERT Shuttle var/datum/shuttle/ferry/multidock/specops/ERT = new() ERT.location = 0 @@ -198,4 +198,4 @@ distress.dock_target_offsite = "distress_shuttle_origin" shuttles["Distress"] = distress - START_PROCESSING(shuttle_controller, distress) \ No newline at end of file + START_PROCESSING(shuttle_controller, distress)