diff --git a/aurorastation.dme b/aurorastation.dme index 51391d85bf6..b69685d4f89 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2558,6 +2558,7 @@ #include "code\modules\modular_computers\file_system\programs\command\account_database.dm" #include "code\modules\modular_computers\file_system\programs\command\card.dm" #include "code\modules\modular_computers\file_system\programs\command\command_and_communications.dm" +#include "code\modules\modular_computers\file_system\programs\command\docks.dm" #include "code\modules\modular_computers\file_system\programs\command\teleporter.dm" #include "code\modules\modular_computers\file_system\programs\engineering\_engineering.dm" #include "code\modules\modular_computers\file_system\programs\engineering\atmoscontrol.dm" diff --git a/code/modules/cciaa/cciaa.dm b/code/modules/cciaa/cciaa.dm index 2a29ae89296..99d3de52d45 100644 --- a/code/modules/cciaa/cciaa.dm +++ b/code/modules/cciaa/cciaa.dm @@ -98,5 +98,5 @@ set desc = "Launches the CCIA Shuttle." set category = "Special Verbs" - var/datum/shuttle/autodock/ferry/S = SSshuttle.shuttles["Agent Shuttle"] + var/datum/shuttle/autodock/ferry/S = SSshuttle.shuttles["SCC Shuttle"] S.launch(usr) diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm index c90f1fe82ff..6aa52e44c6d 100644 --- a/code/modules/modular_computers/computers/modular_computer/core.dm +++ b/code/modules/modular_computers/computers/modular_computer/core.dm @@ -94,6 +94,7 @@ soundloop = new(src, enabled) initial_name = name listener = new("modular_computers", src) + sync_linked() /obj/item/modular_computer/Destroy() kill_program(TRUE) @@ -495,3 +496,26 @@ /obj/item/modular_computer/on_slotmove(var/mob/living/user, slot) . = ..(user, slot) BITSET(user.hud_updateflag, ID_HUD) //Same reasoning as for IDs + +// A late init operation called in SSshuttle for ship computers and holopads, used to attach the thing to the right ship. +/obj/item/modular_computer/proc/attempt_hook_up(var/obj/effect/overmap/visitable/sector) + SHOULD_CALL_PARENT(TRUE) + if(!istype(sector)) + return FALSE + if(sector.check_ownership(src)) + linked = sector + return TRUE + return FALSE + +/obj/item/modular_computer/proc/sync_linked() + var/obj/effect/overmap/visitable/sector = map_sectors["[z]"] + if(!sector) + return + return attempt_hook_up_recursive(sector) + +/obj/item/modular_computer/proc/attempt_hook_up_recursive(var/obj/effect/overmap/visitable/sector) + if(attempt_hook_up(sector)) + return sector + for(var/obj/effect/overmap/visitable/candidate in sector) + if((. = .(candidate))) + return diff --git a/code/modules/modular_computers/computers/modular_computer/variables.dm b/code/modules/modular_computers/computers/modular_computer/variables.dm index 159c9add5f7..01962bd2510 100644 --- a/code/modules/modular_computers/computers/modular_computer/variables.dm +++ b/code/modules/modular_computers/computers/modular_computer/variables.dm @@ -32,6 +32,7 @@ var/doorcode = "smindicate" var/hidden = FALSE var/initial_name + var/obj/effect/overmap/visitable/linked // overmap sector the computer is linked to // Modular computers can run on various devices. Each DEVICE (Laptop, Console, Tablet,..) // must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently diff --git a/code/modules/modular_computers/file_system/programs/app_presets.dm b/code/modules/modular_computers/file_system/programs/app_presets.dm index 173bb5d1ce5..c1e48381018 100644 --- a/code/modules/modular_computers/file_system/programs/app_presets.dm +++ b/code/modules/modular_computers/file_system/programs/app_presets.dm @@ -199,6 +199,7 @@ new /datum/computer_file/program/civilian/cargoorder(comp), new /datum/computer_file/program/card_mod(comp), new /datum/computer_file/program/comm(comp, TRUE), + new /datum/computer_file/program/docks(comp), new /datum/computer_file/program/records/employment(comp) ) return _prg_list @@ -260,6 +261,7 @@ new /datum/computer_file/program/civilian/cargocontrol(comp), new /datum/computer_file/program/card_mod(comp), new /datum/computer_file/program/comm(comp, FALSE), + new /datum/computer_file/program/docks(comp), new /datum/computer_file/program/records/employment(comp), new /datum/computer_file/program/records/security(comp) ) @@ -280,6 +282,7 @@ new /datum/computer_file/program/chat_client(comp), new /datum/computer_file/program/card_mod(comp), new /datum/computer_file/program/comm(comp, TRUE), + new /datum/computer_file/program/docks(comp), new /datum/computer_file/program/camera_monitor(comp), new /datum/computer_file/program/digitalwarrant(comp), new /datum/computer_file/program/penal_mechs(comp), @@ -478,7 +481,7 @@ description = "Contains the most common cargo programs as well as the OM's ones." available = FALSE -/datum/modular_computer_app_presets/supply/return_install_programs(obj/item/modular_computer/comp) +/datum/modular_computer_app_presets/supply/om/return_install_programs(obj/item/modular_computer/comp) var/list/_prg_list = list( new /datum/computer_file/program/ntnetdownload(comp), new /datum/computer_file/program/filemanager(comp), @@ -488,7 +491,8 @@ new /datum/computer_file/program/civilian/cargocontrol(comp), new /datum/computer_file/program/civilian/cargoorder(comp), new /datum/computer_file/program/civilian/cargodelivery(comp), - new /datum/computer_file/program/comm(comp, FALSE) + new /datum/computer_file/program/comm(comp, FALSE), + new /datum/computer_file/program/docks(comp) ) return _prg_list diff --git a/code/modules/modular_computers/file_system/programs/command/docks.dm b/code/modules/modular_computers/file_system/programs/command/docks.dm new file mode 100644 index 00000000000..8d999c9187b --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/command/docks.dm @@ -0,0 +1,53 @@ +/datum/computer_file/program/docks + filename = "docks" + filedesc = "Docking Ports Management Program" + extended_desc = "Used to manage the docks, hangars, and any docked ships." + program_icon_state = "docks" + program_key_icon_state = "lightblue_key" + color = LIGHT_COLOR_BLUE + size = 8 + requires_ntnet = TRUE + available_on_ntnet = TRUE + required_access_run = access_heads + required_access_download = access_heads + usage_flags = PROGRAM_CONSOLE + tgui_id = "Docks" + +/datum/computer_file/program/docks/ui_data(mob/user) + var/list/data = list() + + // Gather data for computer header + var/headerdata = get_header_data(data["_PC"]) + if(headerdata) + data["_PC"] = headerdata + . = data + + var/obj/effect/overmap/visitable/connected = computer.linked + + var/list/docks = list() + if(connected) + data["connected_name"] = connected.name + for(var/landmark_tag in connected.tracked_dock_tags) + var/obj/effect/shuttle_landmark/landmark = SSshuttle.registered_shuttle_landmarks[landmark_tag] + if(landmark && istype(landmark)) + docks[++docks.len] = list( + "name" = landmark.name + ) + for(var/shuttle_key in SSshuttle.shuttles) + var/datum/shuttle/shuttle = SSshuttle.shuttles[shuttle_key] + if(shuttle && shuttle.current_location && shuttle.current_location.landmark_tag == landmark.landmark_tag) + docks[docks.len]["shuttle"] = shuttle.name + break + else + docks[++docks.len] = list( + "name" = landmark_tag, + "shuttle" = "???" + ) + data["docks"] = docks + + return data + +/datum/computer_file/program/docks/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index 8da2e60f448..c6d942efad1 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -16,6 +16,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap var/list/initial_generic_waypoints //store landmark_tag of landmarks that should be added to the actual lists below on init. var/list/initial_restricted_waypoints //For use with non-automatic landmarks (automatic ones add themselves). + var/list/tracked_dock_tags //landmark_tag of landmarks of docks that will be tracked in the docks computer program var/list/generic_waypoints = list() //waypoints that any shuttle can use var/list/restricted_waypoints = list() //waypoints for specific shuttles diff --git a/code/modules/shuttles/antagonist.dm b/code/modules/shuttles/antagonist.dm index 506f02200cf..d36e418ef52 100644 --- a/code/modules/shuttles/antagonist.dm +++ b/code/modules/shuttles/antagonist.dm @@ -5,22 +5,25 @@ req_access = list(access_syndicate) shuttle_tag = "Skipjack" light_color = LIGHT_COLOR_RED + can_rename_ship = TRUE /obj/machinery/computer/shuttle_control/multi/burglar name = "pod control console" icon = 'icons/obj/primitive_computer.dmi' icon_screen = "syndicate" req_access = list(access_syndicate) - shuttle_tag = "Burglar Pod" + shuttle_tag = "Water Bear" light_color = LIGHT_COLOR_RED + can_rename_ship = TRUE /obj/machinery/computer/shuttle_control/multi/antag/syndicate name = "mercenary shuttle control console" icon = 'icons/obj/primitive_computer.dmi' icon_screen = "syndicate" req_access = list(access_syndicate) - shuttle_tag = "Mercenary Shuttle" + shuttle_tag = "ICV Raskolnikov" light_color = LIGHT_COLOR_RED + can_rename_ship = TRUE /obj/machinery/computer/shuttle_control/multi/merc_elite name = "shuttle control console" diff --git a/code/modules/shuttles/departmental.dm b/code/modules/shuttles/departmental.dm index 54008daf5ee..ca18868189f 100644 --- a/code/modules/shuttles/departmental.dm +++ b/code/modules/shuttles/departmental.dm @@ -34,4 +34,5 @@ /obj/machinery/computer/shuttle_control/merchant name = "merchant shuttle control console" req_access = list(access_merchant) - shuttle_tag = "Merchant Shuttle" + shuttle_tag = "ICV Enterprise" + can_rename_ship = TRUE diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 866db3ade89..6a9cc3aabf0 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -9,6 +9,7 @@ var/ui_template = "shuttle_control_console.tmpl" var/list/linked_helmets = list() + var/can_rename_ship = FALSE /obj/machinery/computer/shuttle_control/Initialize() . = ..() @@ -67,6 +68,8 @@ "can_launch" = shuttle.can_launch(), "can_cancel" = shuttle.can_cancel(), "can_force" = shuttle.can_force(), + "can_rename_ship" = can_rename_ship, + "ship_name" = shuttle.name, ) /obj/machinery/computer/shuttle_control/proc/get_shuttle_status(var/datum/shuttle/autodock/shuttle) @@ -118,6 +121,12 @@ shuttle.cancel_launch(src) return TOPIC_REFRESH + if(href_list["rename"]) + var/new_name = input(usr, "Select new name for this ship.", "Rename this ship", shuttle.name) + if(new_name) + shuttle.name = new_name + return TOPIC_REFRESH + /obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/datum/shuttle/autodock/shuttle = SSshuttle.shuttles[shuttle_tag] if (!istype(shuttle)) diff --git a/icons/obj/modular_console.dmi b/icons/obj/modular_console.dmi index 3cf32c7cf48..40279e3ded6 100644 Binary files a/icons/obj/modular_console.dmi and b/icons/obj/modular_console.dmi differ diff --git a/maps/aurora/aurora-1_centcomm.dmm b/maps/aurora/aurora-1_centcomm.dmm index f8fbad3862f..d2f6aaf090d 100644 --- a/maps/aurora/aurora-1_centcomm.dmm +++ b/maps/aurora/aurora-1_centcomm.dmm @@ -33993,7 +33993,7 @@ /obj/machinery/computer/shuttle_control{ req_access = null; req_one_access = list(38,72); - shuttle_tag = "Agent Shuttle" + shuttle_tag = "SCC Shuttle"; }, /turf/simulated/floor/shuttle/dark_blue, /area/shuttle/transport1) diff --git a/maps/aurora/code/aurora_shuttles.dm b/maps/aurora/code/aurora_shuttles.dm index ce92c182357..f730fd126ff 100644 --- a/maps/aurora/code/aurora_shuttles.dm +++ b/maps/aurora/code/aurora_shuttles.dm @@ -132,7 +132,7 @@ AURORA_ESCAPE_POD(4) //-// Merchant Shuttle //-// /datum/shuttle/autodock/ferry/merchant_aurora - name = "Merchant Shuttle" + name = "ICV Enterprise" location = 1 warmup_time = 10 shuttle_area = /area/shuttle/merchant @@ -155,7 +155,7 @@ AURORA_ESCAPE_POD(4) base_turf = /turf/space/transit/bluespace/west /obj/effect/shuttle_landmark/merchant/dock - name = "Merchant Shuttle Dock" + name = "Second Deck Starboard Dock 1" landmark_tag = "nav_merchant_dock" docking_controller = "merchant_shuttle_dock" landmark_flags = SLANDMARK_FLAG_AUTOSET @@ -196,7 +196,7 @@ AURORA_ESCAPE_POD(4) //-// CCIA Shuttle //-// /datum/shuttle/autodock/ferry/autoreturn/ccia - name = "Agent Shuttle" + name = "SCC Shuttle" location = 1 warmup_time = 10 shuttle_area = /area/shuttle/transport1 @@ -213,7 +213,7 @@ AURORA_ESCAPE_POD(4) base_area = /area/centcom/ferry /obj/effect/shuttle_landmark/ccia/dock - name = "Agent Shuttle Dock" + name = "Second Deck Starboard Dock 2" landmark_tag = "nav_ccia_dock" docking_controller = "centcom_shuttle_dock_airlock" landmark_flags = SLANDMARK_FLAG_AUTOSET @@ -237,7 +237,7 @@ AURORA_ESCAPE_POD(4) base_area = /area/centcom/specops /obj/effect/shuttle_landmark/ert/dock - name = "ERT Dock" + name = "Third Deck Port Dock 3" landmark_tag = "nav_ert_dock" docking_controller = "specops_dock_airlock" special_dock_targets = list("Phoenix Shuttle" = "specops_shuttle_fore") @@ -246,7 +246,7 @@ AURORA_ESCAPE_POD(4) //-// Burglar Shuttle //-// /datum/shuttle/autodock/multi/antag/burglar_aurora - name = "Burglar Pod" + name = "Water Bear" current_location = "nav_burglar_start" landmark_transition = "nav_burglar_interim" dock_target = "burglar_shuttle" @@ -364,7 +364,7 @@ AURORA_ESCAPE_POD(4) //-// Mercenary Shuttle //-// /datum/shuttle/autodock/multi/antag/merc_aurora - name = "Mercenary Shuttle" + name = "ICV Raskolnikov" current_location = "nav_merc_start" landmark_transition = "nav_merc_interim" dock_target = "merc_shuttle" @@ -497,7 +497,7 @@ AURORA_ESCAPE_POD(4) base_turf = /turf/space/transit/bluespace/west /obj/effect/shuttle_landmark/legion/green - name = "Emergency Services Dock (Main Entrypoint)" + name = "Third Deck Port Dock 1" landmark_tag = "nav_legion_green" docking_controller = "legion_shuttle_dock" landmark_flags = SLANDMARK_FLAG_AUTOSET @@ -589,7 +589,7 @@ AURORA_ESCAPE_POD(4) landmark_flags = SLANDMARK_FLAG_AUTOSET /obj/effect/shuttle_landmark/distress/blue - name = "Blue Dock" + name = "First Deck Port Hangar Bay 2b" landmark_tag = "nav_distress_blue" docking_controller = "distress_shuttle_dock" special_dock_targets = list("Distress Shuttle" = "distress_shuttle_fore") diff --git a/maps/event/generic_dock/generic_dock-1.dmm b/maps/event/generic_dock/generic_dock-1.dmm index 95d0252f288..7695f9e95c4 100644 --- a/maps/event/generic_dock/generic_dock-1.dmm +++ b/maps/event/generic_dock/generic_dock-1.dmm @@ -14901,7 +14901,7 @@ /obj/machinery/computer/shuttle_control{ req_access = null; req_one_access = list(38,72); - shuttle_tag = "Agent Shuttle" + shuttle_tag = "SCC Shuttle" }, /turf/simulated/floor/shuttle/dark_blue, /area/shuttle/transport1) diff --git a/maps/sccv_horizon/code/sccv_horizon_overmap.dm b/maps/sccv_horizon/code/sccv_horizon_overmap.dm index 6835ff98516..e4c182631e8 100644 --- a/maps/sccv_horizon/code/sccv_horizon_overmap.dm +++ b/maps/sccv_horizon/code/sccv_horizon_overmap.dm @@ -26,29 +26,47 @@ ) initial_generic_waypoints = list( - "nav_hangar_horizon_1", - "nav_hangar_horizon_2", - "nav_dock_horizon_1", - "nav_dock_horizon_2", - "nav_dock_horizon_3", - "nav_dock_horizon_4", - "deck_one_fore_of_horizon", - "deck_one_starboard_side", - "deck_one_port_side", - "deck_one_aft_of_horizon", - "deck_one_near_starboard_propulsion", - "deck_one_near_port_propulsion", - "deck_two_fore_of_horizon", - "deck_two_starboard_fore", - "deck_two_port_fore", - "deck_two_aft_of_horizon", - "deck_two_port_aft", - "deck_two_starboard_aft", - "deck_three_fore_of_horizon", - "deck_three_fore_starboard_of_horizon", - "deck_three_port_fore_of_horizon", - "deck_three_aft_of_horizon", - "deck_three_port_aft_of_horizon" + "nav_hangar_horizon_1", + "nav_hangar_horizon_2", + "nav_dock_horizon_1", + "nav_dock_horizon_2", + "nav_dock_horizon_3", + "nav_dock_horizon_4", + "deck_one_fore_of_horizon", + "deck_one_starboard_side", + "deck_one_port_side", + "deck_one_aft_of_horizon", + "deck_one_near_starboard_propulsion", + "deck_one_near_port_propulsion", + "deck_two_fore_of_horizon", + "deck_two_starboard_fore", + "deck_two_port_fore", + "deck_two_aft_of_horizon", + "deck_two_port_aft", + "deck_two_starboard_aft", + "deck_three_fore_of_horizon", + "deck_three_fore_starboard_of_horizon", + "deck_three_port_fore_of_horizon", + "deck_three_aft_of_horizon", + "deck_three_port_aft_of_horizon" + ) + + tracked_dock_tags = list( + "nav_hangar_mining", + "nav_hangar_intrepid", + "nav_hangar_canary", + "nav_cargo_shuttle_dock", + "nav_hangar_horizon_1", + "nav_burglar_hangar", + "nav_hangar_horizon_2", + "nav_distress_blue", + "nav_merchant_dock", + "nav_ccia_dock", + "nav_merc_dock", + "nav_dock_horizon_1", + "nav_legion_green", + "nav_dock_horizon_4", + "nav_ert_dock" ) /obj/effect/overmap/visitable/ship/sccv_horizon/get_skybox_representation() @@ -170,40 +188,40 @@ circuit = null /obj/effect/shuttle_landmark/horizon/nav1 - name = "Port Hangar Bay 1" + name = "First Deck Port Hangar Bay 1a" landmark_tag = "nav_hangar_horizon_1" base_turf = /turf/simulated/floor/plating base_area = /area/hangar/auxiliary /obj/effect/shuttle_landmark/horizon/nav2 - name = "Port Hangar Bay 2" + name = "First Deck Port Hangar Bay 2a" landmark_tag = "nav_hangar_horizon_2" base_turf = /turf/simulated/floor/plating base_area = /area/hangar/auxiliary //external landmarks for overmap ships /obj/effect/shuttle_landmark/horizon/dock1 - name = "Starboard Primary Docking Arm" + name = "Third Deck Starboard Dock 2" landmark_tag = "nav_dock_horizon_1" docking_controller = "dock_horizon_1_airlock" base_turf = /turf/simulated/floor/reinforced/airless base_area = /area/space /obj/effect/shuttle_landmark/horizon/dock2 //shares a spot with the TCFL ERT shuttle, but having multiple use cases is fine, ERTs are adminspawned only as well - name = "Port Primary Docking Arm" + name = "Third Deck Starboard Dock 2" landmark_tag = "nav_dock_horizon_2" base_turf = /turf/simulated/floor/reinforced/airless base_area = /area/space /obj/effect/shuttle_landmark/horizon/dock3 - name = "Starboard Primary Docking Arm-Fore" + name = "Third Deck Starboard Dock 3" landmark_tag = "nav_dock_horizon_3" docking_controller = "dock_horizon_3_airlock" base_turf = /turf/simulated/floor/reinforced/airless base_area = /area/space /obj/effect/shuttle_landmark/horizon/dock4 - name = "Port Primary Docking Arm-Fore" + name = "Third Deck Port Dock 2" landmark_tag = "nav_dock_horizon_4" docking_controller = "dock_horizon_4_airlock" base_turf = /turf/simulated/floor/reinforced/airless diff --git a/maps/sccv_horizon/code/sccv_horizon_shuttles.dm b/maps/sccv_horizon/code/sccv_horizon_shuttles.dm index 7c9c26ca57f..98125319f74 100644 --- a/maps/sccv_horizon/code/sccv_horizon_shuttles.dm +++ b/maps/sccv_horizon/code/sccv_horizon_shuttles.dm @@ -1,7 +1,7 @@ //-// Burglar Shuttle //-// /datum/shuttle/autodock/multi/antag/burglar_ship - name = "Burglar Pod" + name = "Water Bear" current_location = "nav_burglar_start" landmark_transition = "nav_burglar_interim" dock_target = "burglar_shuttle" @@ -32,7 +32,7 @@ base_turf = /turf/space/transit/north /obj/effect/shuttle_landmark/burglar_ship/hangar - name = "Port Hangar" + name = "First Deck Port Hangar Bay 1b" landmark_tag = "nav_burglar_hangar" landmark_flags = SLANDMARK_FLAG_AUTOSET @@ -99,7 +99,7 @@ //-// Mercenary Shuttle //-// /datum/shuttle/autodock/multi/antag/merc_ship - name = "Mercenary Shuttle" + name = "ICV Raskolnikov" current_location = "nav_merc_start" landmark_transition = "nav_merc_interim" dock_target = "merc_shuttle" @@ -132,7 +132,7 @@ base_turf = /turf/space/transit/north /obj/effect/shuttle_landmark/merc_ship/dock - name = "Third Deck Dock" + name = "Third Deck Starboard Dock 1" landmark_tag = "nav_merc_dock" docking_controller = "nuke_shuttle_dock_airlock" landmark_flags = SLANDMARK_FLAG_AUTOSET @@ -165,7 +165,7 @@ logging_home_tag = "nav_hangar_intrepid" /obj/effect/shuttle_landmark/intrepid/hangar - name = "Intrepid Hangar" + name = "First Deck Intrepid Hangar Bay" landmark_tag = "nav_hangar_intrepid" docking_controller = "intrepid_dock" base_area = /area/hangar/intrepid @@ -189,7 +189,7 @@ logging_home_tag = "nav_hangar_canary" /obj/effect/shuttle_landmark/canary/hangar - name = "Canary Hangar" + name = "First Deck Canary Hangar Bay" landmark_tag = "nav_hangar_canary" docking_controller = "canary_dock" base_area = /area/hangar/canary @@ -213,7 +213,7 @@ logging_home_tag = "nav_hangar_mining" /obj/effect/shuttle_landmark/mining/hangar - name = "Mining Shuttle Hangar" + name = "First Deck Spark Hangar Bay" landmark_tag = "nav_hangar_mining" docking_controller = "mining_shuttle_dock" base_turf = /turf/simulated/floor/airless @@ -226,7 +226,7 @@ // Cargo Shuttle /datum/shuttle/autodock/ferry/supply/horizon - name = "Horizon Cargo Shuttle" + name = "OX Supply Shuttle" location = 1 shuttle_area = /area/supply/dock dock_target = "cargo_shuttle" @@ -240,7 +240,7 @@ base_area = /area/centcom /obj/effect/shuttle_landmark/supply/horizon/dock - name = "Horizon Cargo Shuttle Dock" + name = "First Deck Supply Shuttle Hangar Bay" landmark_tag = "nav_cargo_shuttle_dock" docking_controller = "cargo_shuttle_dock" landmark_flags = SLANDMARK_FLAG_AUTOSET diff --git a/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm b/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm index e707bbe6760..5be44afc87e 100644 --- a/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm +++ b/maps/sccv_horizon/sccv_horizon-1_deck_1.dmm @@ -22365,8 +22365,7 @@ /area/hangar/intrepid) "pMP" = ( /obj/effect/shuttle_landmark/distress/blue{ - base_turf = /turf/simulated/floor/plating; - name = "Port Hangar" + base_turf = /turf/simulated/floor/plating }, /turf/simulated/floor/plating, /area/hangar/auxiliary) diff --git a/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm b/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm index 972bd9eb388..38ccbfa11f4 100644 --- a/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm +++ b/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm @@ -9676,7 +9676,8 @@ dir = 4; req_access = null; req_one_access = list(38,72); - shuttle_tag = "Agent Shuttle" + shuttle_tag = "SCC Shuttle"; + can_rename_ship = 1 }, /turf/simulated/floor/shuttle/dark_blue, /area/shuttle/transport1) diff --git a/nano/templates/shuttle_control_console.tmpl b/nano/templates/shuttle_control_console.tmpl index 43bf73e1f8e..fee9acb453b 100644 --- a/nano/templates/shuttle_control_console.tmpl +++ b/nano/templates/shuttle_control_console.tmpl @@ -3,6 +3,12 @@
{{:data.shuttle_status}}
+
+ Ship designation and name: {{:data.ship_name}} + {{if data.can_rename_ship}} + {{:helper.link('Rename', null, {'rename' : '1'}, null , null)}} + {{/if}} +
@@ -63,4 +69,4 @@ {{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force? null : 'disabled' , data.can_force ? 'redButton' : null)}}
- \ No newline at end of file + diff --git a/nano/templates/shuttle_control_console_antag.tmpl b/nano/templates/shuttle_control_console_antag.tmpl index f2aed6c6c9f..b0580d594a1 100644 --- a/nano/templates/shuttle_control_console_antag.tmpl +++ b/nano/templates/shuttle_control_console_antag.tmpl @@ -3,6 +3,12 @@
{{:data.shuttle_status}}
+
+ Ship designation and name: {{:data.ship_name}} + {{if data.can_rename_ship}} + {{:helper.link('Rename', null, {'rename' : '1'}, null , null)}} + {{/if}} +
Cloaking field is {{:data.cloaked ? "enabled" : "disabled" }}. {{:helper.link('Toggle', 'arrowreturn-1-s', {'toggle_cloaked' : '1'}) }}
@@ -73,4 +79,4 @@ {{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redButton' : null)}} - \ No newline at end of file + diff --git a/nano/templates/shuttle_control_console_multi.tmpl b/nano/templates/shuttle_control_console_multi.tmpl index fe765246d25..8249ba71768 100644 --- a/nano/templates/shuttle_control_console_multi.tmpl +++ b/nano/templates/shuttle_control_console_multi.tmpl @@ -3,6 +3,12 @@
{{:data.shuttle_status}}
+
+ Ship designation and name: {{:data.ship_name}} + {{if data.can_rename_ship}} + {{:helper.link('Rename', null, {'rename' : '1'}, null , null)}} + {{/if}} +
@@ -70,4 +76,4 @@ {{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redButton' : null)}}
- \ No newline at end of file + diff --git a/tgui/packages/tgui/interfaces/Docks.tsx b/tgui/packages/tgui/interfaces/Docks.tsx new file mode 100644 index 00000000000..5da287de44a --- /dev/null +++ b/tgui/packages/tgui/interfaces/Docks.tsx @@ -0,0 +1,60 @@ +import { useBackend } from '../backend'; +import { Section, Table } from '../components'; +import { NtosWindow } from '../layouts'; + +export type DocksData = { + docks: Dock[]; +}; + +type Dock = { + name: string; + shuttle: string; +}; + +let sortByNameFn = function (a: Dock, b: Dock): number { + if (a.name < b.name) { + return -1; + } + if (a.name > b.name) { + return 1; + } + return 0; +}; + +export const Docks = (props, context) => { + const { act, data } = useBackend(context); + const full_docks = data.docks + .filter((d: Dock) => !!d.shuttle) + .sort(sortByNameFn); + const empty_docks = data.docks + .filter((d: Dock) => !d.shuttle) + .sort(sortByNameFn); + + return ( + + +
+ + + Port/Hangar + Docked Craft + + + {full_docks.map((dock) => ( + + {dock.name} + {dock.shuttle} + + ))} + {empty_docks.map((dock) => ( + + {dock.name} + {dock.shuttle} + + ))} +
+
+
+
+ ); +};