Modular computer programs preset support unit test (#20069)

Added some modular computer program preset tests.
Fixed some modular computer program preset that had duplicate programs.
Refactored how the computer program presets generate the list of
programs to install.
Turned some comments into DMDocs, some cleanup around.
Tests disabled reasons are now enclosed in the group correctly.
This commit is contained in:
Fluffy
2024-11-14 14:15:19 +00:00
committed by GitHub
parent 477e7fa570
commit 2ac1681fd8
12 changed files with 519 additions and 412 deletions
@@ -1,11 +1,27 @@
/datum/modular_computer_app_presets
ABSTRACT_TYPE(/datum/modular_computer_app_presets)
var/name = "default_preset"
var/display_name = "default preset"
var/description = "Description of the preset."
var/available = FALSE
/datum/modular_computer_app_presets/proc/return_install_programs(var/obj/item/modular_computer/comp)
return list()
/**
* A `/list` of `/datum/computer_file/program` _typepaths_ that constitute this preset
*
* Is instantiated and returned by `return_install_programs()` on the computers that request it
*
* **Do not set this directly**, add or remove tye typepaths to it in New() **only**
*/
var/list/program_list = list()
/datum/modular_computer_app_presets/proc/return_install_programs(obj/item/modular_computer/comp)
SHOULD_NOT_SLEEP(TRUE)
SHOULD_CALL_PARENT(TRUE)
. = list()
for(var/program_typepath in program_list)
. += new program_typepath(comp)
/datum/modular_computer_app_presets/all
name = "all"
@@ -14,54 +30,52 @@
available = FALSE
/datum/modular_computer_app_presets/all/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list()
for(var/F in typesof(/datum/computer_file/program))
var/datum/computer_file/program/prog = new F(comp)
_prg_list += prog
return flatten_list(_prg_list)
SHOULD_CALL_PARENT(FALSE) //Special snowflake case
#define COMPUTER_APP_PRESET_SYSTEM list(\
new /datum/computer_file/program/ntnetdownload(comp),\
new /datum/computer_file/program/filemanager(comp),\
)
. = list()
for(var/F in subtypesof(/datum/computer_file/program))
var/datum/computer_file/program/prog = new F(comp)
. += prog
#define COMPUTER_APP_PRESET_SYSTEM list(/datum/computer_file/program/ntnetdownload, /datum/computer_file/program/filemanager)
#define COMPUTER_APP_PRESET_HORIZON_CIVILIAN list(\
new /datum/computer_file/program/newsbrowser(comp),\
new /datum/computer_file/program/manifest(comp),\
new /datum/computer_file/program/chat_client(comp),\
new /datum/computer_file/program/civilian/cargoorder(comp),\
new /datum/computer_file/program/map(comp),\
/datum/computer_file/program/newsbrowser,\
/datum/computer_file/program/manifest,\
/datum/computer_file/program/chat_client,\
/datum/computer_file/program/civilian/cargoorder,\
/datum/computer_file/program/map,\
)
#define COMPUTER_APP_PRESET_HORIZON_ENGINEERING list(\
new /datum/computer_file/program/power_monitor(comp),\
new /datum/computer_file/program/alarm_monitor/engineering(comp),\
new /datum/computer_file/program/atmos_control(comp),\
new /datum/computer_file/program/rcon_console(comp),\
new /datum/computer_file/program/camera_monitor(comp),\
new /datum/computer_file/program/lighting_control(comp)\
/datum/computer_file/program/power_monitor,\
/datum/computer_file/program/alarm_monitor/engineering,\
/datum/computer_file/program/atmos_control,\
/datum/computer_file/program/rcon_console,\
/datum/computer_file/program/camera_monitor,\
/datum/computer_file/program/lighting_control,\
)
#define COMPUTER_APP_PRESET_HORIZON_MEDICAL list(\
new /datum/computer_file/program/suit_sensors(comp),\
new /datum/computer_file/program/records/medical(comp),\
new /datum/computer_file/program/chemistry_codex(comp),\
new /datum/computer_file/program/scanner/medical(comp),\
)
/datum/computer_file/program/suit_sensors,\
/datum/computer_file/program/records/medical,\
/datum/computer_file/program/chemistry_codex,\
/datum/computer_file/program/scanner/medical,\
)
#define COMPUTER_APP_PRESET_HORIZON_RESEARCH list(\
new /datum/computer_file/program/ntnetmonitor(comp),\
new /datum/computer_file/program/aidiag(comp),\
new /datum/computer_file/program/chemistry_codex(comp),\
new /datum/computer_file/program/scanner/science(comp),\
new /datum/computer_file/program/scanner/gas(comp),\
new /datum/computer_file/program/away_manifest(comp),\
/datum/computer_file/program/ntnetmonitor,\
/datum/computer_file/program/aidiag,\
/datum/computer_file/program/chemistry_codex,\
/datum/computer_file/program/scanner/science,\
/datum/computer_file/program/scanner/gas,\
/datum/computer_file/program/away_manifest,\
)
#define COMPUTER_APP_PRESET_HORIZON_SECURITY list(\
new /datum/computer_file/program/alarm_monitor/security(comp),\
new /datum/computer_file/program/camera_monitor(comp),\
new /datum/computer_file/program/digitalwarrant(comp),\
new /datum/computer_file/program/records/security(comp),\
new /datum/computer_file/program/guntracker(comp),\
/datum/computer_file/program/alarm_monitor/security,\
/datum/computer_file/program/camera_monitor,\
/datum/computer_file/program/digitalwarrant,\
/datum/computer_file/program/records/security,\
/datum/computer_file/program/guntracker,\
)
@@ -5,15 +5,10 @@
description = "Contains the most common command programs and has a special teleporter control program loaded."
available = FALSE
/datum/modular_computer_app_presets/command/teleporter/ninja/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/teleporter/ninja(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/teleporter/ninja/New()
. = ..()
program_list += /datum/computer_file/program/teleporter/ninja
/datum/modular_computer_app_presets/merc
name = "merc"
@@ -21,14 +16,15 @@
description = "Preset for the Merc Console."
available = FALSE
/datum/modular_computer_app_presets/merc/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/camera_monitor/hacked(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/merc/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM
program_list += list(/datum/computer_file/program/newsbrowser,
/datum/computer_file/program/manifest,
/datum/computer_file/program/camera_monitor/hacked
)
/datum/modular_computer_app_presets/ert
name = "ert"
@@ -36,15 +32,14 @@
description = "Preset for the ERT Console."
available = FALSE
/datum/modular_computer_app_presets/ert/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
new /datum/computer_file/program/camera_monitor/hacked(comp),
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/suit_sensors(comp),
new /datum/computer_file/program/alarm_monitor/all(comp),
new /datum/computer_file/program/lighting_control(comp),
new /datum/computer_file/program/aidiag(comp),
new /datum/computer_file/program/records(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/ert/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM
program_list += list(/datum/computer_file/program/camera_monitor/hacked,
/datum/computer_file/program/comm,
/datum/computer_file/program/suit_sensors,
/datum/computer_file/program/alarm_monitor/all,
/datum/computer_file/program/lighting_control,
/datum/computer_file/program/aidiag,
/datum/computer_file/program/records
)
@@ -1,32 +1,27 @@
/*##########################
ENGINEERING PRESETS
##########################*/
/datum/modular_computer_app_presets/engineering
name = "engineering"
display_name = "Engineering"
description = "Contains the most common engineering programs."
available = TRUE
/datum/modular_computer_app_presets/engineering/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_ENGINEERING,
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/engineering/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + COMPUTER_APP_PRESET_HORIZON_ENGINEERING
/datum/modular_computer_app_presets/engineering/atmos
name = "atmos"
display_name = "Engineering - Atmospherics"
description = "Contains the most common engineering programs and atmospheric monitoring software."
available = TRUE
/datum/modular_computer_app_presets/engineering/atmos/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_ENGINEERING,
new /datum/computer_file/program/scanner/gas(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/engineering/atmos/New()
. = ..()
program_list += /datum/computer_file/program/scanner/gas
/datum/modular_computer_app_presets/engineering/ce
name = "engineering_head"
@@ -34,30 +29,24 @@
description = "Contains the most common engineering programs and command software."
available = FALSE
/datum/modular_computer_app_presets/engineering/ce/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_ENGINEERING,
new /datum/computer_file/program/scanner/gas(comp),
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/engineering/ce/New()
. = ..()
program_list += list(/datum/computer_file/program/comm, /datum/computer_file/program/records/employment)
/*##########################
MEDICAL PRESETS
##########################*/
/datum/modular_computer_app_presets/medical
name = "medical"
display_name = "Medical"
description = "Contains the most common medical programs."
available = TRUE
/datum/modular_computer_app_presets/medical/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_MEDICAL,
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/medical/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + COMPUTER_APP_PRESET_HORIZON_MEDICAL
/datum/modular_computer_app_presets/medical/cmo
name = "medical_head"
@@ -65,30 +54,24 @@
description = "Contains the most common medical programs and command software."
available = FALSE
/datum/modular_computer_app_presets/medical/cmo/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_MEDICAL,
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/scanner/science(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/medical/cmo/New()
. = ..()
program_list += list(/datum/computer_file/program/records/employment, /datum/computer_file/program/scanner/science, /datum/computer_file/program/comm)
/*##########################
RESEARCH PRESETS
##########################*/
/datum/modular_computer_app_presets/research
name = "research"
display_name = "Research"
description = "Contains the most common research programs."
available = TRUE
/datum/modular_computer_app_presets/research/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_RESEARCH,
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/research/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + COMPUTER_APP_PRESET_HORIZON_RESEARCH
/datum/modular_computer_app_presets/research/rd
name = "research_head"
@@ -96,47 +79,44 @@
description = "Contains the most common research programs and command software."
available = FALSE
/datum/modular_computer_app_presets/research/rd/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_RESEARCH,
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/research/rd/New()
. = ..()
program_list += list(/datum/computer_file/program/comm, /datum/computer_file/program/records/employment)
/*##########################
BRIDGE CREW PRESETS
##########################*/
/datum/modular_computer_app_presets/bridge
name = "bridge"
display_name = "Bridge"
description = "Contains the most common bridge programs"
available = TRUE
/datum/modular_computer_app_presets/bridge/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/away_manifest(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/bridge/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + /datum/computer_file/program/away_manifest
/*##########################
COMMAND PRESETS
##########################*/
/datum/modular_computer_app_presets/command
name = "command"
display_name = "Command"
description = "Contains the most common command programs."
available = TRUE
/datum/modular_computer_app_presets/command/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
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/away_manifest(comp),
new /datum/computer_file/program/records/employment(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN
program_list += list(/datum/computer_file/program/card_mod,
/datum/computer_file/program/comm,
/datum/computer_file/program/docks,
/datum/computer_file/program/away_manifest,
/datum/computer_file/program/records/employment,
)
/datum/modular_computer_app_presets/command/hop
name = "command_hop"
@@ -144,19 +124,10 @@
description = "Contains the most common command programs."
available = FALSE
/datum/modular_computer_app_presets/command/hop/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
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/away_manifest(comp),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/records/security(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/hop/New()
. = ..()
program_list += list(/datum/computer_file/program/civilian/cargocontrol, /datum/computer_file/program/records/security)
/datum/modular_computer_app_presets/command/captain
name = "captain"
@@ -164,37 +135,30 @@
description = "Contains the most important programs for the Captain."
available = FALSE
/datum/modular_computer_app_presets/command/captain/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
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/away_manifest(comp),
new /datum/computer_file/program/camera_monitor(comp),
new /datum/computer_file/program/digitalwarrant(comp),
new /datum/computer_file/program/civilian/cargocontrol(comp),
new /datum/computer_file/program/alarm_monitor/all(comp),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/records/medical(comp),
new /datum/computer_file/program/records/security(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/captain/New()
. = ..()
program_list += list(/datum/computer_file/program/camera_monitor,
/datum/computer_file/program/digitalwarrant,
/datum/computer_file/program/civilian/cargocontrol,
/datum/computer_file/program/alarm_monitor/all,
/datum/computer_file/program/records/medical,
/datum/computer_file/program/records/security,
)
/*##########################
SECURITY PRESETS
##########################*/
/datum/modular_computer_app_presets/security
name = "security"
display_name = "Security"
description = "Contains the most common security programs."
available = TRUE
/datum/modular_computer_app_presets/security/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_SECURITY,
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/security/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + COMPUTER_APP_PRESET_HORIZON_SECURITY
/datum/modular_computer_app_presets/security/armory
name = "security_arm"
@@ -202,33 +166,21 @@
description = "Contains the most common security and armory programs."
available = FALSE
/datum/modular_computer_app_presets/security/armory/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_SECURITY,
new /datum/computer_file/program/implant_tracker(comp),
new /datum/computer_file/program/comm(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/security/armory/New()
. = ..()
program_list += list(/datum/computer_file/program/implant_tracker, /datum/computer_file/program/comm)
/datum/modular_computer_app_presets/security/investigations
name = "security_inv"
display_name = "Security - Investigations"
description = "Contains the most common security and forensics programs."
available = TRUE
/datum/modular_computer_app_presets/security/investigations/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/alarm_monitor/security(comp),
new /datum/computer_file/program/camera_monitor(comp),
new /datum/computer_file/program/digitalwarrant(comp),
new /datum/computer_file/program/records/security(comp),
new /datum/computer_file/program/records/medical(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/security/investigations/New()
. = ..()
program_list += /datum/computer_file/program/records/medical
program_list -= /datum/computer_file/program/guntracker //Remove the guntracker, investigators don't have access to it
/datum/modular_computer_app_presets/security/hos
name = "security_head"
@@ -236,77 +188,62 @@
description = "Contains the most common security programs and command software."
available = FALSE
/datum/modular_computer_app_presets/security/hos/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
COMPUTER_APP_PRESET_HORIZON_SECURITY,
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/security/hos/New()
. = ..()
program_list += list(/datum/computer_file/program/comm, /datum/computer_file/program/records/employment)
/*##########################
CIVILIAN PRESETS
##########################*/
/datum/modular_computer_app_presets/civilian
name = "service"
display_name = "Service"
description = "Contains the most common service programs."
available = TRUE
/datum/modular_computer_app_presets/civilian/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/game/arcade(comp),
new /datum/computer_file/program/cooking_codex(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/civilian/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN
program_list += list(/datum/computer_file/program/game/arcade, /datum/computer_file/program/cooking_codex)
/datum/modular_computer_app_presets/civilian/janitor
name = "janitor"
display_name = "Janitor"
description = "Contains programs for janitorial service."
available = TRUE
/datum/modular_computer_app_presets/civilian/janitor/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/civilian/janitor(comp),
new /datum/computer_file/program/game/arcade(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/civilian/janitor/New()
. = ..()
program_list += /datum/computer_file/program/civilian/janitor
/datum/modular_computer_app_presets/civilian/miner
name = "miner"
display_name = "Miner"
description = "Contains programs for miners."
available = TRUE
/datum/modular_computer_app_presets/civilian/miner/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/game/arcade(comp),
new /datum/computer_file/program/cooking_codex(comp),
new /datum/computer_file/program/away_manifest(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/civilian/miner/New()
. = ..()
program_list += /datum/computer_file/program/away_manifest
/*##########################
SUPPLY PRESETS
##########################*/
/datum/modular_computer_app_presets/supply
name = "supply"
display_name = "Supply"
description = "Contains the most common cargo programs."
available = TRUE
/datum/modular_computer_app_presets/supply/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/civilian/cargocontrol(comp),
new /datum/computer_file/program/civilian/cargodelivery(comp),
new /datum/computer_file/program/away_manifest(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/supply/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN
program_list += list(/datum/computer_file/program/civilian/cargocontrol,
/datum/computer_file/program/civilian/cargodelivery,
/datum/computer_file/program/away_manifest,
)
/datum/modular_computer_app_presets/supply/om
name = "operations manager"
@@ -314,59 +251,42 @@
description = "Contains the most common cargo programs as well as the OM's ones."
available = FALSE
/datum/modular_computer_app_presets/supply/om/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/civilian/cargocontrol(comp),
new /datum/computer_file/program/civilian/cargodelivery(comp),
new /datum/computer_file/program/away_manifest(comp),
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/docks(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/supply/om/New()
. = ..()
program_list += list(/datum/computer_file/program/comm, /datum/computer_file/program/docks)
/datum/modular_computer_app_presets/supply/mining
name = "operations_mining"
display_name = "Mining"
description = "Contains the most common EVA programs."
available = TRUE
/datum/modular_computer_app_presets/supply/mining/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/away_manifest(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/supply/mining/New()
. = ..()
program_list -= list(/datum/computer_file/program/civilian/cargocontrol, /datum/computer_file/program/civilian/cargodelivery) //Snowflake
/datum/modular_computer_app_presets/supply/machinist
name = "operations_machinist"
display_name = "Operations - Machinist"
description = "Contains the most common supply programs and medical record software."
available = TRUE
/datum/modular_computer_app_presets/supply/machinist/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/aidiag(comp),
new /datum/computer_file/program/records/medical(comp),
new /datum/computer_file/program/scanner/science(comp),
new /datum/computer_file/program/scanner/gas(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/supply/machinist/New()
. = ..()
program_list += list(/datum/computer_file/program/records/medical, /datum/computer_file/program/scanner/science)
//Machinist is the bastard child of supply/operation, it doesn't have access to shit essentially
program_list -= list(/datum/computer_file/program/civilian/cargocontrol, /datum/computer_file/program/civilian/cargodelivery, /datum/computer_file/program/away_manifest)
/*#############################
REPRESENTATIVE PRESETS
#############################*/
/datum/modular_computer_app_presets/representative
name = "representative"
display_name = "Representative"
description = "Contains software intended for representatives."
available = FALSE
/datum/modular_computer_app_presets/representative/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/records/employment(comp),
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/representative/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN + /datum/computer_file/program/records/employment
@@ -5,16 +5,16 @@
description = "A generic preset for the wall console."
available = FALSE
/datum/modular_computer_app_presets/wall_generic/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/chat_client(comp),
new /datum/computer_file/program/civilian/cargoorder(comp),
new /datum/computer_file/program/camera_monitor(comp),
new /datum/computer_file/program/alarm_monitor/engineering(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/wall_generic/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM
program_list += list(/datum/computer_file/program/manifest,
/datum/computer_file/program/chat_client,
/datum/computer_file/program/civilian/cargoorder,
/datum/computer_file/program/camera_monitor,
/datum/computer_file/program/alarm_monitor/engineering
)
/datum/modular_computer_app_presets/ai
name = "ai"
@@ -22,11 +22,10 @@
description = "A preset for the AI consoles."
available = FALSE
/datum/modular_computer_app_presets/ai/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/ai/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM
/datum/modular_computer_app_presets/command/teleporter
name = "command_teleporter"
@@ -34,15 +33,9 @@
description = "Contains the most common command programs and has a special teleporter control program loaded."
available = FALSE
/datum/modular_computer_app_presets/command/teleporter/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/comm(comp, FALSE),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/teleporter(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/teleporter/New()
. = ..()
program_list += /datum/computer_file/program/teleporter
/datum/modular_computer_app_presets/command/account
name = "command_accounting"
@@ -50,29 +43,24 @@
description = "Contains all the programs you would need to become a god-tier accountant."
available = FALSE
/datum/modular_computer_app_presets/command/account/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/civilian/cargoorder(comp),
new /datum/computer_file/program/civilian/cargocontrol(comp),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/account_db(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/account/New()
. = ..()
program_list += list(/datum/computer_file/program/civilian/cargocontrol,
/datum/computer_file/program/account_db
)
/datum/modular_computer_app_presets/command/account/centcomm/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/civilian/cargoorder(comp),
new /datum/computer_file/program/civilian/cargocontrol(comp),
new /datum/computer_file/program/records/employment(comp),
new /datum/computer_file/program/account_db(comp, TRUE)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/command/account/centcomm
name = "command_accounting_centcomm"
display_name = "Command - Accounting - CentComm"
description = "Contains all the programs you would need to become a god-tier accountant."
available = FALSE
/datum/modular_computer_app_presets/command/account/centcomm/New()
. = ..()
//Remove the default accounting program and add the centcomm version
program_list -= /datum/computer_file/program/account_db
program_list += /datum/computer_file/program/account_db/centcomm
/datum/modular_computer_app_presets/trashcompactor
name = "trashcompactor"
@@ -80,11 +68,9 @@
description = "A preset for the Trash Compactor Wall Console."
available = FALSE
/datum/modular_computer_app_presets/trashcompactor/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
new /datum/computer_file/program/crushercontrol(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/trashcompactor/New()
. = ..()
program_list += /datum/computer_file/program/crushercontrol
/datum/modular_computer_app_presets/cargo_delivery
name = "cargo_delivery"
@@ -92,10 +78,7 @@
description = "Contains the Delivery App."
available = FALSE
/datum/modular_computer_app_presets/cargo_delivery/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
COMPUTER_APP_PRESET_SYSTEM,
COMPUTER_APP_PRESET_HORIZON_CIVILIAN,
new /datum/computer_file/program/civilian/cargodelivery(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/cargo_delivery/New()
. = ..()
program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN
program_list += /datum/computer_file/program/civilian/cargodelivery
@@ -5,43 +5,40 @@
description = "A preset for the merchant console."
available = FALSE
/datum/modular_computer_app_presets/merchant/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
new /datum/computer_file/program/filemanager(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/chat_client(comp),
new /datum/computer_file/program/merchant(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/merchant/New()
. = ..()
program_list += list(/datum/computer_file/program/filemanager,
/datum/computer_file/program/manifest,
/datum/computer_file/program/newsbrowser,
/datum/computer_file/program/chat_client,
/datum/computer_file/program/merchant
)
/datum/modular_computer_app_presets/merchant/nka/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
new /datum/computer_file/program/filemanager(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/chat_client(comp),
new /datum/computer_file/program/merchant/nka(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/merchant/nka
name = "merchant_nka"
display_name = "Merchant - NKA"
description = "A preset for the merchant console for the new kingdom of adhomai."
/datum/modular_computer_app_presets/merchant/guild/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
new /datum/computer_file/program/filemanager(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/chat_client(comp),
new /datum/computer_file/program/merchant/guild(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/merchant/nka/New()
. = ..()
program_list += /datum/computer_file/program/merchant/nka
/datum/modular_computer_app_presets/merchant/golden_deep/return_install_programs(obj/item/modular_computer/comp)
var/list/_prg_list = list(
new /datum/computer_file/program/filemanager(comp),
new /datum/computer_file/program/manifest(comp),
new /datum/computer_file/program/newsbrowser(comp),
new /datum/computer_file/program/chat_client(comp),
new /datum/computer_file/program/merchant/golden_deep(comp)
)
return flatten_list(_prg_list)
/datum/modular_computer_app_presets/merchant/guild
name = "merchant_guild"
display_name = "Merchant - Guild"
description = "A preset for the merchant console for the guild."
/datum/modular_computer_app_presets/merchant/guild/New()
. = ..()
program_list += /datum/computer_file/program/merchant/guild
/datum/modular_computer_app_presets/merchant/golden_deep
name = "merchant_golden_deep"
display_name = "Merchant - Golden Deep"
description = "A preset for the merchant console for the golden deep."
/datum/modular_computer_app_presets/merchant/golden_deep/New()
. = ..()
program_list += /datum/computer_file/program/merchant/golden_deep
@@ -16,15 +16,13 @@
var/machine_id = ""
var/centcomm_db = FALSE
/datum/computer_file/program/account_db/New(obj/item/modular_computer/comp, var/is_centcomm_db = FALSE)
/datum/computer_file/program/account_db/New(obj/item/modular_computer/comp)
..()
if(SSatlas.current_map)
machine_id = "[station_name()] Acc. DB #[SSeconomy.num_financial_terminals++]"
else
machine_id = "NT-Net Relay Back-up Software DB" // created during map generation inside the ntnet relay, not used by players
centcomm_db = is_centcomm_db
/datum/computer_file/program/account_db/proc/get_held_card()
var/obj/item/card/id/held_card
if(computer.card_slot?.stored_card)
@@ -261,4 +259,14 @@
var/obj/item/paper/P = computer.nano_printer.print_text("", pname, "#deebff")
P.set_content_unsafe(pname, text)
/*#############
SUBTYPES
#############*/
/datum/computer_file/program/account_db/centcomm
filename = "accdb_centcomm"
filedesc = "Account Database - CentComm"
centcomm_db = TRUE
#undef FUND_CAP
@@ -92,10 +92,6 @@
program_key_icon_state = "lightblue_key"
color = LIGHT_COLOR_BLUE
/datum/computer_file/program/records/employment/Destroy()
. = ..()
/datum/computer_file/program/records/pai
available_on_ntnet = 1
extended_desc = "This program is used to view crew records."