mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 00:20:42 +01:00
Docking Ports Management Program (#16802)
* stuff copied from the other branch * aurorastation.dme reorder * lint fixes * docks gui prettier --------- Co-authored-by: DreamySkrell <>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user