From e8cb6187dac5544c0ee67749cf2f2490c6a9ccd5 Mon Sep 17 00:00:00 2001 From: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:46:59 +0100 Subject: [PATCH] Replace holomap with PDA map program (#17751) * map program, holomap init order * huh * programz * program defines * hmm....... * a * map :weary: * sane code, zoom * holo_minimaps -> minimaps * o * remove station holomap stuff * changelog, shitcode, mapping * c * o * minus * generate_all_minimaps() * holomap init order * tests rerun please * tests rerun please * aurora station_map removal * legend via labeledlist * table * key * aaaaaaaaaaaaaaaaaaaaaaa --------- Co-authored-by: DreamySkrell <> --- aurorastation.dme | 8 +- code/__defines/minimap.dm | 42 +- code/__defines/subsystem-priority.dm | 8 +- code/_helpers/unsorted.dm | 1 - code/_onclick/hud/hud.dm | 13 - .../subsystems/initialization/holomap.dm | 94 +-- .../subsystems/initialization/misc_early.dm | 1 - code/game/machinery/station_holomap.dm | 245 ------- .../modules/mob/living/silicon/robot/robot.dm | 16 - .../file_system/programs/app_presets.dm | 685 ------------------ .../file_system/programs/app_presets_.dm | 68 ++ .../file_system/programs/app_presets_antag.dm | 50 ++ .../file_system/programs/app_presets_crew.dm | 328 +++++++++ .../programs/app_presets_equipment.dm | 100 +++ .../programs/app_presets_third_party.dm | 47 ++ .../file_system/programs/generic/map.dm | 55 ++ .../DreamySkrell-minimap-program.yml | 42 ++ icons/255x255.dmi | Bin 0 -> 234 bytes maps/aurora/aurora-1_centcomm.dmm | 416 +++-------- maps/aurora/aurora-3_sublevel.dmm | 68 +- maps/aurora/aurora-4_mainlevel.dmm | 100 +-- maps/aurora/aurora-6_surface.dmm | 41 +- maps/sccv_horizon/sccv_horizon-1_deck_1.dmm | 25 +- maps/sccv_horizon/sccv_horizon-2_deck_2.dmm | 51 +- maps/sccv_horizon/sccv_horizon-3_deck_3.dmm | 7 - tgui/packages/tgui/interfaces/Map.tsx | 146 ++++ 26 files changed, 1042 insertions(+), 1615 deletions(-) delete mode 100644 code/game/machinery/station_holomap.dm delete mode 100644 code/modules/modular_computers/file_system/programs/app_presets.dm create mode 100644 code/modules/modular_computers/file_system/programs/app_presets_.dm create mode 100644 code/modules/modular_computers/file_system/programs/app_presets_antag.dm create mode 100644 code/modules/modular_computers/file_system/programs/app_presets_crew.dm create mode 100644 code/modules/modular_computers/file_system/programs/app_presets_equipment.dm create mode 100644 code/modules/modular_computers/file_system/programs/app_presets_third_party.dm create mode 100644 code/modules/modular_computers/file_system/programs/generic/map.dm create mode 100644 html/changelogs/DreamySkrell-minimap-program.yml create mode 100644 icons/255x255.dmi create mode 100644 tgui/packages/tgui/interfaces/Map.tsx diff --git a/aurorastation.dme b/aurorastation.dme index 488a3715f35..489a393a944 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -816,7 +816,6 @@ #include "code\game\machinery\spaceheater.dm" #include "code\game\machinery\stargazer.dm" #include "code\game\machinery\stasis_bed.dm" -#include "code\game\machinery\station_holomap.dm" #include "code\game\machinery\status_display.dm" #include "code\game\machinery\status_display_ai.dm" #include "code\game\machinery\status_display_snowflakes.dm" @@ -2645,7 +2644,11 @@ #include "code\modules\modular_computers\file_system\program_events.dm" #include "code\modules\modular_computers\file_system\script.dm" #include "code\modules\modular_computers\file_system\programs\_program.dm" -#include "code\modules\modular_computers\file_system\programs\app_presets.dm" +#include "code\modules\modular_computers\file_system\programs\app_presets_.dm" +#include "code\modules\modular_computers\file_system\programs\app_presets_antag.dm" +#include "code\modules\modular_computers\file_system\programs\app_presets_crew.dm" +#include "code\modules\modular_computers\file_system\programs\app_presets_equipment.dm" +#include "code\modules\modular_computers\file_system\programs\app_presets_third_party.dm" #include "code\modules\modular_computers\file_system\programs\antagonist\hacked_camera.dm" #include "code\modules\modular_computers\file_system\programs\civilian\cargo_control.dm" #include "code\modules\modular_computers\file_system\programs\civilian\cargo_delivery.dm" @@ -2666,6 +2669,7 @@ #include "code\modules\modular_computers\file_system\programs\games\arcade.dm" #include "code\modules\modular_computers\file_system\programs\generic\lawmanager.dm" #include "code\modules\modular_computers\file_system\programs\generic\manifest.dm" +#include "code\modules\modular_computers\file_system\programs\generic\map.dm" #include "code\modules\modular_computers\file_system\programs\generic\news_browser.dm" #include "code\modules\modular_computers\file_system\programs\generic\ntnrc_client.dm" #include "code\modules\modular_computers\file_system\programs\generic\records.dm" diff --git a/code/__defines/minimap.dm b/code/__defines/minimap.dm index 99076da7397..74781d9b0bd 100644 --- a/code/__defines/minimap.dm +++ b/code/__defines/minimap.dm @@ -1,41 +1,23 @@ // -// Constants and standard colors for the holomap +// Constants and standard colors for the holomap/minimap // -#define HOLOMAP_ICON 'icons/480x480.dmi' // Icon file to start with when drawing holomaps (to get a 480x480 canvas). -#define HOLOMAP_ICON_SIZE 480 // Pixel width & height of the holomap icon. Used for auto-centering etc. -#define ui_holomap "CENTER-7, CENTER-7" // Screen location of the holomap "hud" - // Holomap colors -#define HOLOMAP_OBSTACLE "#FFFFFFDD" // Color of walls and barriers -#define HOLOMAP_PATH "#66666699" // Color of floors +#define HOLOMAP_OBSTACLE "#FFFFFF" // Color of walls and barriers +#define HOLOMAP_PATH "#666666" // Color of floors #define HOLOMAP_HOLOFIER "#79FF79" // Whole map is multiplied by this to give it a green holoish look -#define HOLOMAP_AREACOLOR_COMMAND "#386d8099" -#define HOLOMAP_AREACOLOR_SECURITY "#ae121299" -#define HOLOMAP_AREACOLOR_MEDICAL "#6f9e00c2" -#define HOLOMAP_AREACOLOR_SCIENCE "#A154A699" -#define HOLOMAP_AREACOLOR_ENGINEERING "#F1C23199" -#define HOLOMAP_AREACOLOR_OPERATIONS "#E06F0099" -#define HOLOMAP_AREACOLOR_HALLWAYS "#ffffffa5" -#define HOLOMAP_AREACOLOR_DOCK "#0000FFCC" +#define HOLOMAP_AREACOLOR_COMMAND "#386d80" +#define HOLOMAP_AREACOLOR_SECURITY "#ae1212" +#define HOLOMAP_AREACOLOR_MEDICAL "#6f9e00" +#define HOLOMAP_AREACOLOR_SCIENCE "#A154A6" +#define HOLOMAP_AREACOLOR_ENGINEERING "#F1C231" +#define HOLOMAP_AREACOLOR_OPERATIONS "#E06F00" +#define HOLOMAP_AREACOLOR_HALLWAYS "#ffffff" +#define HOLOMAP_AREACOLOR_DOCK "#0000FF" #define HOLOMAP_AREACOLOR_HANGAR "#777777" -#define HOLOMAP_AREACOLOR_CIVILIAN "#5bc1c199" +#define HOLOMAP_AREACOLOR_CIVILIAN "#5bc1c1" // If someone can come up with a non-conflicting color for the lifts, please update this. #define HOLOMAP_AREACOLOR_LIFTS null -// Handy defines to lookup the pixel offsets for this Z-level. Cache these if you use them in a loop tho. -// Commenting these out for now. Replace if we ever datumize our maps. -/*#define HOLOMAP_PIXEL_OFFSET_X(zLevel) ((using_map.holomap_offset_x.len >= zLevel) ? using_map.holomap_offset_x[zLevel] : 0) -#define HOLOMAP_PIXEL_OFFSET_Y(zLevel) ((using_map.holomap_offset_y.len >= zLevel) ? using_map.holomap_offset_y[zLevel] : 0) -#define HOLOMAP_LEGEND_X(zLevel) ((using_map.holomap_legend_x.len >= zLevel) ? using_map.holomap_legend_x[zLevel] : 96) -#define HOLOMAP_LEGEND_Y(zLevel) ((using_map.holomap_legend_y.len >= zLevel) ? using_map.holomap_legend_y[zLevel] : 96)*/ - -#define HOLOMAP_PIXEL_OFFSET_X(zlevel) ((HOLOMAP_ICON_SIZE - world.maxx) / 2) -#define HOLOMAP_PIXEL_OFFSET_Y(zlevel) ((HOLOMAP_ICON_SIZE - world.maxx) / 2) -#define HOLOMAP_LEGEND_X(zlevel) 96 -#define HOLOMAP_LEGEND_Y(zlevel) 96 -#define HOLOMAP_EXTRA_STATIONMAP "stationmapformatted" -#define HOLOMAP_EXTRA_STATIONMAPAREAS "stationareas" -#define HOLOMAP_EXTRA_STATIONMAPSMALL "stationmapsmall" diff --git a/code/__defines/subsystem-priority.dm b/code/__defines/subsystem-priority.dm index 76f7f784a19..a0a79ea0813 100644 --- a/code/__defines/subsystem-priority.dm +++ b/code/__defines/subsystem-priority.dm @@ -5,7 +5,6 @@ #define SS_INIT_JOBS 21 #define SS_INIT_MAPFINALIZE 20 // Asteroid generation. #define SS_INIT_PARALLAX 19 // Parallax image cache generation. Must run before ghosts are able to join. -#define SS_INIT_HOLOMAP 18 #define SS_INIT_ATOMS 17 // World initialization. Will trigger lighting updates. Observers can join after this loads. #define SS_INIT_ASSETS 16 // Assets subsystem setup. #define SS_INIT_POWER 15 // Initial powernet build. @@ -26,9 +25,10 @@ #define SS_INIT_LIGHTING 0 // Generation of lighting overlays and pre-bake. May cause openturf updates, should initialize before SSzcopy. #define SS_INIT_ZCOPY -1 // Z-mimic flush. Should run after SSoverlay & SSicon_smooth so it copies the smoothed sprites. #define SS_INIT_XENOARCH -2 // Xenoarch is this far below because it can infinite loop if placed in SS_INIT_MISC as it was before, due to some subsystems spawning stuff there. -#define SS_INIT_LOBBY -3 // Lobby timer starts here. The lobby timer won't actually start going down until the MC starts ticking, so you probably want this last -#define SS_INIT_PING -4 // Pinger for the clients -#define SS_INIT_CHAT -5 // To ensure chat remains smooth during init. +#define SS_INIT_HOLOMAP -3 // Minimap subsystem. Should be initialized after all maps, away sites, ships, planets, etc. +#define SS_INIT_LOBBY -4 // Lobby timer starts here. The lobby timer won't actually start going down until the MC starts ticking, so you probably want this last +#define SS_INIT_PING -5 // Pinger for the clients +#define SS_INIT_CHAT -6 // To ensure chat remains smooth during init. // Something to remember when setting priorities: SS_TICKER runs before Normal, which runs before SS_BACKGROUND. // Each group has its own priority bracket. diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 891d141adae..5ec29e359f2 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1017,7 +1017,6 @@ var/list/wall_items = typecacheof(list( /obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment, - /obj/machinery/station_map, /obj/structure/sign )) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index da23341b8dd..e6b00d9b296 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -20,7 +20,6 @@ var/list/global_huds var/obj/screen/thermal var/obj/screen/meson var/obj/screen/science - var/obj/screen/holomap /datum/global_hud/proc/setup_overlay(var/icon_state, var/color) var/obj/screen/screen = new /obj/screen() @@ -64,18 +63,6 @@ var/list/global_huds meson = setup_overlay("scanline", "#9fd800") science = setup_overlay("scanline", "#d600d6") - // The holomap screen object is actually totally invisible. - // Station maps work by setting it as an images location before sending to client, not - // actually changing the icon or icon state of the screen object itself! - // Why do they work this way? I don't know really, that is how /vg/ designed them, but since they DO - // work this way, we can take advantage of their immutability by making them part of - // the global_hud (something we have and /vg/ doesn't) instead of an instance per mob. - holomap = new /obj/screen() - holomap.name = "holomap" - holomap.icon = null - holomap.screen_loc = ui_holomap - holomap.mouse_opacity = MOUSE_OPACITY_TRANSPARENT - var/obj/screen/O var/i //that nasty looking dither you get when you're short-sighted diff --git a/code/controllers/subsystems/initialization/holomap.dm b/code/controllers/subsystems/initialization/holomap.dm index e85617e718e..7e1849e3f5b 100644 --- a/code/controllers/subsystems/initialization/holomap.dm +++ b/code/controllers/subsystems/initialization/holomap.dm @@ -6,35 +6,39 @@ SUBSYSTEM_DEF(holomap) flags = SS_NO_FIRE init_order = SS_INIT_HOLOMAP - var/list/holo_minimaps = list() - var/list/extra_minimaps = list() - var/list/station_holomaps = list() + /// List of images of minimaps, for every z-level, initialized at round start. + /// This is the "base" minimap, shows only the physical structure of walls and paths, and respects `HIDE_FROM_HOLOMAP`. + /// Key of list is the `z` of the z-level, value is the `/icon/`. + /// Every image is 255x255px. + var/list/minimaps = list() -/datum/controller/subsystem/holomap/Initialize() - holo_minimaps.len = world.maxz - for (var/z in 1 to world.maxz) - holo_minimaps[z] = generateHoloMinimap(z) + /// Same as `minimaps`, but images are base64 encoded. + var/list/minimaps_base64 = list() - LOG_DEBUG("SSholomap: [holo_minimaps.len] maps.") - - for (var/z in current_map.station_levels) - generateStationMinimap(z) + /// Same as `minimaps_base64`, but the map is colored with `holomap_color` of the `/area/` + var/list/minimaps_area_colored_base64 = list() +/datum/controller/subsystem/holomap/Initialize() + generate_all_minimaps() + LOG_DEBUG("SSholomap: [minimaps.len] maps.") ..() +/datum/controller/subsystem/holomap/proc/generate_all_minimaps() + minimaps.len = world.maxz + minimaps_base64.len = world.maxz + minimaps_area_colored_base64.len = world.maxz -// Generates the "base" holomap for one z-level, showing only the physical structure of walls and paths. -/datum/controller/subsystem/holomap/proc/generateHoloMinimap(zlevel = 1) - // Save these values now to avoid a bazillion array lookups - var/offset_x = HOLOMAP_PIXEL_OFFSET_X(zlevel) - var/offset_y = HOLOMAP_PIXEL_OFFSET_Y(zlevel) + for (var/z in 1 to world.maxz) + generate_minimap(z) + generate_minimap_area_colored(z) +/datum/controller/subsystem/holomap/proc/generate_minimap(zlevel = 1) // Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime - var/icon/canvas = icon(HOLOMAP_ICON, "blank") - if(world.maxx + offset_x > canvas.Width()) - CRASH("Minimap for z=[zlevel] : world.maxx ([world.maxx]) + holomap_offset_x ([offset_x]) must be <= [canvas.Width()]") - if(world.maxy + offset_y > canvas.Height()) - CRASH("Minimap for z=[zlevel] : world.maxy ([world.maxy]) + holomap_offset_y ([offset_y]) must be <= [canvas.Height()]") + var/icon/canvas = icon('icons/255x255.dmi', "blank") + if(world.maxx > canvas.Width()) + CRASH("Minimap for z=[zlevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]") + if(world.maxy > canvas.Height()) + CRASH("Minimap for z=[zlevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]") var/list/rock_tcache = typecacheof(list( /turf/simulated/mineral, @@ -64,25 +68,22 @@ SUBSYSTEM_DEF(holomap) if (rock_tcache[Ttype]) continue if (obstacle_tcache[Ttype] || (T.contents.len && locate(/obj/structure/grille, T))) - canvas.DrawBox(HOLOMAP_OBSTACLE, T.x + offset_x, T.y + offset_y) + canvas.DrawBox(HOLOMAP_OBSTACLE + "DD", T.x, T.y) else if(path_tcache[Ttype] || (T.contents.len && locate(/obj/structure/lattice/catwalk, T))) - canvas.DrawBox(HOLOMAP_PATH, T.x + offset_x, T.y + offset_y) + canvas.DrawBox(HOLOMAP_PATH + "DD", T.x, T.y) CHECK_TICK - return canvas - -/datum/controller/subsystem/holomap/proc/generateStationMinimap(zlevel) - // Save these values now to avoid a bazillion array lookups - var/offset_x = HOLOMAP_PIXEL_OFFSET_X(zlevel) - var/offset_y = HOLOMAP_PIXEL_OFFSET_Y(zlevel) + minimaps[zlevel] = canvas + minimaps_base64[zlevel] = icon2base64(canvas) +/datum/controller/subsystem/holomap/proc/generate_minimap_area_colored(zlevel) // Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime - var/icon/canvas = icon(HOLOMAP_ICON, "blank") - if(world.maxx + offset_x > canvas.Width()) - crash_with("Minimap for z=[zlevel] : world.maxx ([world.maxx]) + holomap_offset_x ([offset_x]) must be <= [canvas.Width()]") - if(world.maxy + offset_y > canvas.Height()) - crash_with("Minimap for z=[zlevel] : world.maxy ([world.maxy]) + holomap_offset_y ([offset_y]) must be <= [canvas.Height()]") + var/icon/canvas = icon('icons/255x255.dmi', "blank") + if(world.maxx > canvas.Width()) + crash_with("Minimap for z=[zlevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]") + if(world.maxy > canvas.Height()) + crash_with("Minimap for z=[zlevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]") var/turf/T var/area/A @@ -90,30 +91,13 @@ SUBSYSTEM_DEF(holomap) T = thing A = T.loc if (A.holomap_color) - canvas.DrawBox(A.holomap_color, T.x + offset_x, T.y + offset_y) - - // Save this nice area-colored canvas in case we want to layer it or something I guess - extra_minimaps["[HOLOMAP_EXTRA_STATIONMAPAREAS]_[zlevel]"] = canvas + canvas.DrawBox(A.holomap_color + "99", T.x, T.y) - var/icon/map_base = icon(holo_minimaps[zlevel]) + var/icon/map_base = icon(minimaps[zlevel]) map_base.Blend(HOLOMAP_HOLOFIER, ICON_MULTIPLY) // Generate the full sized map by blending the base and areas onto the backdrop - var/icon/big_map = icon(HOLOMAP_ICON, "stationmap") + var/icon/big_map = icon('icons/255x255.dmi', "blank") big_map.Blend(map_base, ICON_OVERLAY) big_map.Blend(canvas, ICON_OVERLAY) - extra_minimaps["[HOLOMAP_EXTRA_STATIONMAP]_[zlevel]"] = big_map - - // Generate the "small" map (I presume for putting on wall map things?) - var/icon/small_map = icon(HOLOMAP_ICON, "blank") - small_map.Blend(map_base, ICON_OVERLAY) - small_map.Blend(canvas, ICON_OVERLAY) - small_map.Scale(WORLD_ICON_SIZE, WORLD_ICON_SIZE) - - // And rotate it in every direction of course! - var/icon/actual_small_map = icon(small_map) - actual_small_map.Insert(new_icon = small_map, dir = SOUTH) - actual_small_map.Insert(new_icon = turn(small_map, 90), dir = WEST) - actual_small_map.Insert(new_icon = turn(small_map, 180), dir = NORTH) - actual_small_map.Insert(new_icon = turn(small_map, 270), dir = EAST) - extra_minimaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[zlevel]"] = actual_small_map + minimaps_area_colored_base64[zlevel] = icon2base64(big_map) diff --git a/code/controllers/subsystems/initialization/misc_early.dm b/code/controllers/subsystems/initialization/misc_early.dm index bc08873202e..e656af280cc 100644 --- a/code/controllers/subsystems/initialization/misc_early.dm +++ b/code/controllers/subsystems/initialization/misc_early.dm @@ -18,7 +18,6 @@ SUBSYSTEM_DEF(misc_early) global_hud.thermal, global_hud.meson, global_hud.science, - global_hud.holomap ) // Populate global list of tips by category diff --git a/code/game/machinery/station_holomap.dm b/code/game/machinery/station_holomap.dm deleted file mode 100644 index e61d99c0e3f..00000000000 --- a/code/game/machinery/station_holomap.dm +++ /dev/null @@ -1,245 +0,0 @@ -/obj/machinery/station_map - name = "holomap" - desc = "A virtual map of the surrounding area." - icon = 'icons/obj/machinery/stationmap.dmi' - icon_state = "station_map" - anchored = 1 - density = 0 - idle_power_usage = 10 - active_power_usage = 500 - - light_color = "#64C864" - light_power = 1 - light_range = 2 - gfi_layer_rotation = GFI_ROTATION_DEFDIR - - var/light_power_on = 1 - var/light_range_on = 2 - - layer = WINDOW_PANE_LAYER + 0.1 - - var/mob/watching_mob = null - var/image/small_station_map = null - var/image/floor_markings = null - var/image/panel = null - - var/original_zLevel = 1 // zLevel on which the station map was initialized. - var/bogus = TRUE // set to 0 when you initialize the station map on a zLevel that has its own icon formatted for use by station holomaps. - var/datum/station_holomap/holomap_datum - -/obj/machinery/station_map/Destroy() - SSholomap.station_holomaps -= src - stopWatching() - QDEL_NULL(holomap_datum) - return ..() - -/obj/machinery/station_map/Initialize() - . = ..() - init_map() - create_small_map() - add_floor_decal() - -/obj/machinery/station_map/proc/init_map() - holomap_datum = new() - original_zLevel = loc.z - SSholomap.station_holomaps += src - flags |= ON_BORDER // Why? It doesn't help if its not density - bogus = FALSE - var/turf/T = get_turf(src) - original_zLevel = T.z - if(!("[HOLOMAP_EXTRA_STATIONMAP]_[original_zLevel]" in SSholomap.extra_minimaps)) - bogus = TRUE - holomap_datum.initialize_holomap_bogus() - update_icon() - return - - holomap_datum.initialize_holomap(T, reinit = TRUE) - -/obj/machinery/station_map/proc/create_small_map() - small_station_map = image(SSholomap.extra_minimaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"], dir = dir) - small_station_map.layer = EFFECTS_ABOVE_LIGHTING_LAYER - small_station_map.filters = filter(type = "drop_shadow", color = light_color + "F0", size = 1, offset = 1, x = 0, y = 0) - -/obj/machinery/station_map/proc/add_floor_decal() - floor_markings = image('icons/obj/machinery/stationmap.dmi', "decal_station_map") - floor_markings.dir = src.dir - floor_markings.layer = ON_TURF_LAYER - update_icon() - -/obj/machinery/station_map/attack_hand(var/mob/user) - if(watching_mob && (watching_mob != user)) - to_chat(user, "Someone else is currently watching the holomap.") - return - if(user.loc != loc) - to_chat(user, "You need to stand in front of \the [src].") - return - startWatching(user) - -// Let people bump up against it to watch -/obj/machinery/station_map/CollidedWith(var/atom/movable/AM) - if(!watching_mob && isliving(AM) && AM.loc == loc) - startWatching(AM) - -// In order to actually get CollidedWith() we need to block movement. We're (visually) on a wall, so people -// couldn't really walk into us anyway. But in reality we are on the turf in front of the wall, so bumping -// against where we seem is actually trying to *exit* our real loc -/obj/machinery/station_map/CheckExit(atom/movable/mover as mob|obj, turf/target as turf) - // LOG_DEBUG("[src] (dir=[dir]) CheckExit([mover], [target]) get_dir() = [get_dir(target, loc)]") - if(get_dir(target, loc) == dir) // Opposite of "normal" since we are visually in the next turf over - return FALSE - else - return TRUE - -/obj/machinery/station_map/proc/startWatching(var/mob/user) - if(isliving(user) && anchored && !(stat & (NOPOWER|BROKEN))) - if(user.client) - holomap_datum.station_map.loc = global_hud.holomap // Put the image on the holomap hud - holomap_datum.station_map.alpha = 0 // Set to transparent so we can fade in - animate(holomap_datum.station_map, alpha = 255, time = 5, easing = LINEAR_EASING) - flick("station_map_activate", src) - user.client.screen |= global_hud.holomap - user.client.images |= holomap_datum.station_map - - watching_mob = user - moved_event.register(watching_mob, src, PROC_REF(checkPosition)) - destroyed_event.register(watching_mob, src, PROC_REF(stopWatching)) - update_use_power(POWER_USE_ACTIVE) - - if(bogus) - to_chat(user, "The holomap failed to initialize. This area of space cannot be mapped.") - else - to_chat(user, "A hologram of the station appears before your eyes.") - -/obj/machinery/station_map/attack_ai(var/mob/living/silicon/robot/user) - return // TODO - Implement for AI ~Leshana - // user.station_holomap.toggleHolomap(user, isAI(user)) - -/obj/machinery/station_map/process() - if((stat & (NOPOWER|BROKEN)) || !anchored) - stopWatching() - -/obj/machinery/station_map/proc/checkPosition() - if(!watching_mob || (watching_mob.loc != loc) || (dir != watching_mob.dir)) - stopWatching() - -/obj/machinery/station_map/proc/stopWatching() - if(watching_mob) - if(watching_mob.client) - animate(holomap_datum.station_map, alpha = 0, time = 5, easing = LINEAR_EASING) - var/mob/M = watching_mob - addtimer(CALLBACK(src, PROC_REF(clear_image), M, holomap_datum.station_map), 5, TIMER_CLIENT_TIME)//we give it time to fade out - moved_event.unregister(watching_mob, src) - destroyed_event.unregister(watching_mob, src) - watching_mob = null - update_use_power(POWER_USE_IDLE) - -/obj/machinery/station_map/proc/clear_image(mob/M, image/I) - if (M.client) - M.client.images -= I - -/obj/machinery/station_map/power_change() - . = ..() - update_icon() - if(stat & NOPOWER) // Maybe port /vg/'s autolights? Done manually for now. - set_light(0) - else - set_light(light_range_on, light_power_on) - -/obj/machinery/station_map/proc/set_broken() - stat |= BROKEN - update_icon() - -/obj/machinery/station_map/update_icon() - cut_overlays() - if(stat & BROKEN) - icon_state = "station_mapb" - else if((stat & NOPOWER) || !anchored) - icon_state = "station_map0" - else - icon_state = "station_map" - - if(bogus) - holomap_datum.initialize_holomap_bogus() - else - small_station_map.icon = SSholomap.extra_minimaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"] - add_overlay(small_station_map) - holomap_datum.initialize_holomap(get_turf(src)) - - // Put the little "map" overlay down where it looks nice - if(floor_markings) - floor_markings.dir = src.dir - floor_markings.pixel_x = -src.pixel_x - floor_markings.pixel_y = -src.pixel_y - add_overlay(floor_markings) - - if(panel_open) - add_overlay("station_map-panel") - else - cut_overlay("station_map-panel") - -/obj/machinery/station_map/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if (prob(50)) - qdel(src) - else - set_broken() - if(3) - if (prob(25)) - set_broken() - -// TODO: Make these constructable. - -/obj/machinery/station_map/mobile - use_power = POWER_USE_OFF - idle_power_usage = 0 - active_power_usage = 0 - -/obj/machinery/station_map/mobile/Initialize() - SHOULD_CALL_PARENT(FALSE) - init_map() - - initialized = TRUE - return INITIALIZE_HINT_NORMAL - -/obj/machinery/station_map/mobile/startWatching(var/mob/user) - if(!user) - return - - create_small_map() - if(!watching_mob && isliving(user)) - ..() - -// Simple datum to keep track of a running holomap. Each machine capable of displaying the holomap will have one. -/datum/station_holomap - var/image/station_map - var/image/cursor - var/image/legend - -/datum/station_holomap/proc/initialize_holomap(turf/T, isAI = null, mob/user = null, reinit = FALSE) - if(!station_map || reinit) - station_map = image(SSholomap.extra_minimaps["[HOLOMAP_EXTRA_STATIONMAP]_[T.z]"]) - if(!cursor || reinit) - cursor = image('icons/misc/holomap_markers.dmi', "you") - if(!legend || reinit) - legend = image('icons/effects/64x64.dmi', "legend") - - if(isAI) - T = get_turf(user.client.eye) - cursor.pixel_x = (T.x - 6 + HOLOMAP_PIXEL_OFFSET_X(T.z)) * PIXEL_MULTIPLIER - cursor.pixel_y = (T.y - 6 + HOLOMAP_PIXEL_OFFSET_Y(T.z)) * PIXEL_MULTIPLIER - - legend.pixel_x = HOLOMAP_LEGEND_X(T.z) - legend.pixel_y = HOLOMAP_LEGEND_Y(T.z) - - station_map.add_overlay(cursor) - station_map.add_overlay(legend) - -/datum/station_holomap/proc/initialize_holomap_bogus() - station_map = image('icons/480x480.dmi', "stationmap") - legend = image('icons/effects/64x64.dmi', "notfound") - legend.pixel_x = 7 * WORLD_ICON_SIZE - legend.pixel_y = 7 * WORLD_ICON_SIZE - station_map.add_overlay(legend) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 634546d1e7e..2151bc8aabe 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -507,22 +507,6 @@ to_chat(src, SPAN_NOTICE("You [C.toggled ? "disable" : "enable"] [C.name].")) C.toggled = !C.toggled -/mob/living/silicon/robot/verb/view_holomap() - set category = "Robot Commands" - set name = "View Holomap" - set desc = "View a virtual map of the surrounding area." - - var/obj/machinery/station_map/mobile/holo_map_object - if(src.holo_map) - holo_map_object = src.holo_map.resolve() - - // Not an else because weakref.resolve() can return false. Edge case - if(!holo_map_object) - holo_map_object = new(src) - src.holo_map = WEAKREF(holo_map) - - holo_map_object.startWatching(src) - /mob/living/silicon/robot/verb/rebuild_overlays() set category = "Robot Commands" set name = "Rebuild Overlays" diff --git a/code/modules/modular_computers/file_system/programs/app_presets.dm b/code/modules/modular_computers/file_system/programs/app_presets.dm deleted file mode 100644 index 129a07efe87..00000000000 --- a/code/modules/modular_computers/file_system/programs/app_presets.dm +++ /dev/null @@ -1,685 +0,0 @@ -/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() - -/datum/modular_computer_app_presets/all - name = "all" - display_name = "All Programs" - description = "Contains all programs." - 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 _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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) - ) - return _prg_list - -/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/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), - 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/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), - new /datum/computer_file/program/scanner/gas(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/engineering/ce - name = "engineering_head" - display_name = "Engineering - CE" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/comm(comp, FALSE), - 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), - new /datum/computer_file/program/records/employment(comp), - new /datum/computer_file/program/scanner/gas(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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) - ) - return _prg_list - -/datum/modular_computer_app_presets/medical/cmo - name = "medical_head" - display_name = "Medical - CMO" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/comm(comp, FALSE), - new /datum/computer_file/program/suit_sensors(comp), - new /datum/computer_file/program/records/employment(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), - new /datum/computer_file/program/scanner/science(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - 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) - ) - return _prg_list - -/datum/modular_computer_app_presets/research/rd - name = "research_head" - display_name = "Research - RD" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/comm(comp, FALSE), - new /datum/computer_file/program/ntnetmonitor(comp), - new /datum/computer_file/program/records/employment(comp), - new /datum/computer_file/program/chemistry_codex(comp), - new /datum/computer_file/program/scanner/science(comp), - new /datum/computer_file/program/away_manifest(comp), - new /datum/computer_file/program/scanner/gas(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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 _prg_list - -/datum/modular_computer_app_presets/command/teleporter - name = "command_teleporter" - display_name = "Command - Teleporter" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/comm(comp, FALSE), - new /datum/computer_file/program/records/employment(comp), - new /datum/computer_file/program/teleporter(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/command/teleporter/ninja - name = "ninja_teleporter" - display_name = "Offsite - Teleporter" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/comm(comp, FALSE), - new /datum/computer_file/program/records/employment(comp), - new /datum/computer_file/program/teleporter/ninja(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/command/hop - name = "command_hop" - display_name = "Command - HoP" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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 _prg_list - -/datum/modular_computer_app_presets/command/captain - name = "captain" - display_name = "Captain" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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/penal_mechs(comp), - new /datum/computer_file/program/civilian/cargocontrol(comp), - new /datum/computer_file/program/civilian/cargoorder(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 _prg_list - -/datum/modular_computer_app_presets/command/account - name = "command_accounting" - display_name = "Command - Accounting" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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 _prg_list - -/datum/modular_computer_app_presets/command/account/centcomm/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), - 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 _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - new /datum/computer_file/program/alarm_monitor/security(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - new /datum/computer_file/program/camera_monitor(comp), - new /datum/computer_file/program/digitalwarrant(comp), - new /datum/computer_file/program/penal_mechs(comp), - new /datum/computer_file/program/records/security(comp), - new /datum/computer_file/program/guntracker(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/security/armory - name = "security_arm" - display_name = "Security - Armory" - 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( - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - new /datum/computer_file/program/alarm_monitor/security(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - new /datum/computer_file/program/camera_monitor(comp), - new /datum/computer_file/program/comm(comp), - new /datum/computer_file/program/digitalwarrant(comp), - new /datum/computer_file/program/penal_mechs(comp), - new /datum/computer_file/program/records/security(comp), - new /datum/computer_file/program/guntracker(comp), - new /datum/computer_file/program/implant_tracker(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - 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 _prg_list - -/datum/modular_computer_app_presets/security/hos - name = "security_head" - display_name = "Security - HoS" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - new /datum/computer_file/program/alarm_monitor/security(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - new /datum/computer_file/program/comm(comp, FALSE), - new /datum/computer_file/program/camera_monitor(comp), - new /datum/computer_file/program/digitalwarrant(comp), - new /datum/computer_file/program/penal_mechs(comp), - new /datum/computer_file/program/records/security(comp), - new /datum/computer_file/program/records/employment(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/game/arcade(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/civilian/janitor(comp), - new /datum/computer_file/program/game/arcade(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/cargocontrol(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - new /datum/computer_file/program/civilian/cargodelivery(comp), - new /datum/computer_file/program/away_manifest(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/supply/om - name = "operations manager" - display_name = "Operations Manager" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/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/docks(comp), - new /datum/computer_file/program/away_manifest(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/cargo_delivery - name = "cargo_delivery" - display_name = "Cargo Delivery" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/cargodelivery(comp) - ) - return _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/chat_client(comp), - new /datum/computer_file/program/civilian/cargoorder(comp), - 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 _prg_list - -/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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - 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/records/employment(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/wall_generic - name = "wallgeneric" - display_name = "Wall - Generic" - 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( - new /datum/computer_file/program/filemanager(comp), - 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/camera_monitor(comp), - new /datum/computer_file/program/alarm_monitor/engineering(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/merc - name = "merc" - display_name = "Mercenary" - 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( - new /datum/computer_file/program/ntnetdownload(comp), - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/newsbrowser(comp), - new /datum/computer_file/program/manifest(comp), - new /datum/computer_file/program/camera_monitor/hacked(comp) - ) - return _prg_list - -/datum/modular_computer_app_presets/ert - name = "ert" - display_name = "EmergencyResposeTeam" - 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( - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/ntnetdownload(comp), - 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 _prg_list - -/datum/modular_computer_app_presets/trashcompactor - name = "trashcompactor" - display_name = "Trash Compactor" - 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 _prg_list - -/datum/modular_computer_app_presets/merchant - name = "merchant" - display_name = "Merchant" - 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 _prg_list - -/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 _prg_list - -/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 _prg_list - - -/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 _prg_list - -/datum/modular_computer_app_presets/ai - name = "ai" - display_name = "AI" - description = "A preset for the AI consoles." - available = FALSE - -/datum/modular_computer_app_presets/ai/return_install_programs(obj/item/modular_computer/comp) - return list( - new /datum/computer_file/program/filemanager(comp), - new /datum/computer_file/program/ntnetdownload(comp) - ) diff --git a/code/modules/modular_computers/file_system/programs/app_presets_.dm b/code/modules/modular_computers/file_system/programs/app_presets_.dm new file mode 100644 index 00000000000..a05754061d9 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/app_presets_.dm @@ -0,0 +1,68 @@ +/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() + +/datum/modular_computer_app_presets/all + name = "all" + display_name = "All Programs" + description = "Contains all programs." + 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) + +#define COMPUTER_APP_PRESET_SYSTEM list(\ + new /datum/computer_file/program/ntnetdownload(comp),\ + new /datum/computer_file/program/filemanager(comp),\ +) + +#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),\ +) + +#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)\ +) + +#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),\ +) + +#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),\ +) + +#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/penal_mechs(comp),\ + new /datum/computer_file/program/records/security(comp),\ + new /datum/computer_file/program/guntracker(comp),\ +) diff --git a/code/modules/modular_computers/file_system/programs/app_presets_antag.dm b/code/modules/modular_computers/file_system/programs/app_presets_antag.dm new file mode 100644 index 00000000000..7e5c2feb5f7 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/app_presets_antag.dm @@ -0,0 +1,50 @@ + +/datum/modular_computer_app_presets/command/teleporter/ninja + name = "ninja_teleporter" + display_name = "Offsite - Teleporter" + 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/merc + name = "merc" + display_name = "Mercenary" + 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/ert + name = "ert" + display_name = "EmergencyResposeTeam" + 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) diff --git a/code/modules/modular_computers/file_system/programs/app_presets_crew.dm b/code/modules/modular_computers/file_system/programs/app_presets_crew.dm new file mode 100644 index 00000000000..d797f06f838 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/app_presets_crew.dm @@ -0,0 +1,328 @@ + +/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/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/ce + name = "engineering_head" + display_name = "Engineering - CE" + 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/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/cmo + name = "medical_head" + display_name = "Medical - CMO" + 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/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/rd + name = "research_head" + display_name = "Research - RD" + 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/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/hop + name = "command_hop" + display_name = "Command - HoP" + 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/captain + name = "captain" + display_name = "Captain" + 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/penal_mechs(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/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/armory + name = "security_arm" + display_name = "Security - Armory" + 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/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/hos + name = "security_head" + display_name = "Security - HoS" + 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/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), + ) + return flatten_list(_prg_list) + +/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/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/om + name = "operations manager" + display_name = "Operations Manager" + 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/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/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) diff --git a/code/modules/modular_computers/file_system/programs/app_presets_equipment.dm b/code/modules/modular_computers/file_system/programs/app_presets_equipment.dm new file mode 100644 index 00000000000..18219cd32a1 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/app_presets_equipment.dm @@ -0,0 +1,100 @@ + +/datum/modular_computer_app_presets/wall_generic + name = "wallgeneric" + display_name = "Wall - Generic" + 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/ai + name = "ai" + display_name = "AI" + description = "A preset for the AI consoles." + available = FALSE + +/datum/modular_computer_app_presets/ai/return_install_programs(obj/item/modular_computer/comp) + return list( + COMPUTER_APP_PRESET_SYSTEM, + ) + +/datum/modular_computer_app_presets/command/teleporter + name = "command_teleporter" + display_name = "Command - Teleporter" + 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/account + name = "command_accounting" + display_name = "Command - Accounting" + 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/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/trashcompactor + name = "trashcompactor" + display_name = "Trash Compactor" + 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/cargo_delivery + name = "cargo_delivery" + display_name = "Cargo Delivery" + 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) diff --git a/code/modules/modular_computers/file_system/programs/app_presets_third_party.dm b/code/modules/modular_computers/file_system/programs/app_presets_third_party.dm new file mode 100644 index 00000000000..305183e3f07 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/app_presets_third_party.dm @@ -0,0 +1,47 @@ + +/datum/modular_computer_app_presets/merchant + name = "merchant" + display_name = "Merchant" + 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/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/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/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) diff --git a/code/modules/modular_computers/file_system/programs/generic/map.dm b/code/modules/modular_computers/file_system/programs/generic/map.dm new file mode 100644 index 00000000000..1f301858fec --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/generic/map.dm @@ -0,0 +1,55 @@ +/datum/computer_file/program/map + filename = "map" + filedesc = "Map Program" + extended_desc = "This program may be used to see the decks or levels of the vessel, station, or ship." + program_icon_state = "map" + program_key_icon_state = "lightblue_key" + color = LIGHT_COLOR_BLUE + size = 4 + requires_ntnet = TRUE + available_on_ntnet = TRUE + tgui_id = "Map" + + /// If zero/null, show the z-level of the user, otherwise show `z_override` z-level. + var/z_override = 0 + +/datum/computer_file/program/map/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/z_level = z_override ? z_override : user.z + if(z_level in current_map.station_levels) + data["map_image"] = SSholomap.minimaps_area_colored_base64[z_level] + + data["user_x"] = user.x + data["user_y"] = user.y + data["user_z"] = user.z + data["station_levels"] = current_map.station_levels + data["z_override"] = z_override + + data["dept_colors_map"] = list( + list("d"="Command", "c"=HOLOMAP_AREACOLOR_COMMAND), + list("d"="Security", "c"=HOLOMAP_AREACOLOR_SECURITY), + list("d"="Medical", "c"=HOLOMAP_AREACOLOR_MEDICAL), + list("d"="Science", "c"=HOLOMAP_AREACOLOR_SCIENCE), + list("d"="Engineering", "c"=HOLOMAP_AREACOLOR_ENGINEERING), + list("d"="Operations", "c"=HOLOMAP_AREACOLOR_OPERATIONS), + list("d"="Civilian", "c"=HOLOMAP_AREACOLOR_CIVILIAN), + list("d"="Hallways", "c"=HOLOMAP_AREACOLOR_HALLWAYS), + list("d"="Dock", "c"=HOLOMAP_AREACOLOR_DOCK), + list("d"="Hangar", "c"=HOLOMAP_AREACOLOR_HANGAR), + ) + + return data + +/datum/computer_file/program/map/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + if(action == "z_override") + z_override = text2num(params["z_override"]) diff --git a/html/changelogs/DreamySkrell-minimap-program.yml b/html/changelogs/DreamySkrell-minimap-program.yml new file mode 100644 index 00000000000..bdcd6daefea --- /dev/null +++ b/html/changelogs/DreamySkrell-minimap-program.yml @@ -0,0 +1,42 @@ +################################ +# 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: DreamySkrell + +# 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: "Adds PDA map program." + - rscdel: "Removes holomaps." diff --git a/icons/255x255.dmi b/icons/255x255.dmi new file mode 100644 index 0000000000000000000000000000000000000000..2e0e7e7a3cf12ae68ba01eb2b3e771b03dcb9b9d GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^|3R3M8A!4mo74%Um;-!5Tn`*LkmkKF1;}MA3GxeO zaCmkj4amu=3W+FjNi9w;$}A|!%+F(BsF)KRR!~&>{Y!Ac$FEPcymhtCojD)8A=Kca z@q