From 303a07e52accefa993567df4d08fae44829b768b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 10 May 2022 21:17:36 +0200 Subject: [PATCH] [MIRROR] Revival of mapping lore terminals [MDB IGNORE] (#13510) * Adds lore terminals for mappers (#66589) This adds the ability to use Fallout-style terminals for maps * Revival of mapping lore terminals Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com> --- _maps/RandomRuins/SpaceRuins/TheDerelict.dmm | 110 +++++++++++------- code/game/machinery/computer/terminal.dm | 27 +++++ .../circuitboards/computer_circuitboards.dm | 9 +- .../ruins/spaceruin_code/TheDerelict.dm | 19 +++ tgstation.dme | 1 + tgui/packages/tgui/interfaces/Terminal.js | 30 +++++ 6 files changed, 150 insertions(+), 46 deletions(-) create mode 100644 code/game/machinery/computer/terminal.dm create mode 100644 tgui/packages/tgui/interfaces/Terminal.js diff --git a/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm b/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm index 0541f406f0e..0a7004f9581 100644 --- a/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm +++ b/_maps/RandomRuins/SpaceRuins/TheDerelict.dmm @@ -147,10 +147,6 @@ /obj/machinery/door/airlock/highsecurity, /turf/open/floor/iron, /area/ruin/space/derelict/bridge/ai_upload) -"aX" = ( -/obj/structure/frame/computer, -/turf/open/floor/iron, -/area/ruin/space/derelict/bridge/ai_upload) "aZ" = ( /obj/machinery/computer/monitor/secret{ dir = 4 @@ -624,14 +620,6 @@ "dz" = ( /turf/closed/wall, /area/ruin/space/derelict/bridge) -"dA" = ( -/obj/structure/sign/warning/electricshock, -/turf/closed/wall/r_wall, -/area/ruin/space/derelict/singularity_engine) -"dB" = ( -/obj/structure/sign/warning/securearea, -/turf/closed/wall/r_wall, -/area/ruin/space/derelict/singularity_engine) "dC" = ( /obj/machinery/door/airlock/engineering{ name = "Engineering Access"; @@ -642,12 +630,6 @@ }, /turf/open/floor/plating/airless, /area/ruin/space/derelict/gravity_generator) -"dD" = ( -/obj/structure/sign/warning/securearea{ - name = "ENGINEERING ACCESS" - }, -/turf/closed/wall/r_wall, -/area/ruin/space/derelict/gravity_generator) "dF" = ( /obj/structure/window/reinforced{ dir = 4 @@ -969,11 +951,6 @@ /obj/structure/window/fulltile, /turf/open/floor/iron, /area/ruin/space/derelict/bridge) -"fh" = ( -/obj/structure/table, -/obj/machinery/light/small/directional/south, -/turf/open/floor/iron, -/area/ruin/space/derelict/bridge) "fj" = ( /obj/structure/window/reinforced{ dir = 8 @@ -2202,12 +2179,6 @@ /obj/item/stock_parts/manipulator, /turf/open/floor/plating/airless, /area/ruin/space/derelict/hallway/primary) -"lp" = ( -/obj/structure/chair/stool/directional/west, -/obj/effect/decal/remains/human, -/obj/effect/decal/cleanable/blood/old, -/turf/open/floor/iron/airless, -/area/ruin/space/derelict/hallway/primary) "lq" = ( /obj/structure/table, /obj/item/reagent_containers/glass/beaker{ @@ -2990,6 +2961,10 @@ }, /turf/open/floor/iron/airless, /area/ruin/space/derelict/bridge/ai_upload) +"vy" = ( +/obj/structure/chair/stool/directional/north, +/turf/open/floor/iron/airless, +/area/ruin/space/derelict/hallway/primary) "vG" = ( /obj/structure/table, /obj/structure/window/reinforced{ @@ -3010,6 +2985,13 @@ icon_state = "floorscorched2" }, /area/space/nearstation) +"wF" = ( +/obj/machinery/light/small/directional/south, +/obj/machinery/computer/terminal/derelict/bridge{ + dir = 1 + }, +/turf/open/floor/iron, +/area/ruin/space/derelict/bridge) "wK" = ( /turf/open/floor/iron/airless{ icon_state = "damaged3" @@ -3061,6 +3043,12 @@ /obj/effect/spawner/random/maintenance/three, /turf/open/floor/plating/airless, /area/ruin/space/derelict/hallway/primary) +"yS" = ( +/obj/structure/table, +/obj/item/paper/crumpled, +/obj/item/pen, +/turf/open/floor/iron, +/area/ruin/space/derelict/arrival) "yW" = ( /obj/effect/spawner/structure/window/hollow/reinforced/directional{ dir = 5 @@ -3285,11 +3273,23 @@ /obj/effect/spawner/random/maintenance, /turf/open/floor/iron, /area/ruin/space/derelict/bridge) +"Hy" = ( +/obj/machinery/computer/terminal/derelict/cargo{ + dir = 1 + }, +/turf/open/floor/iron, +/area/ruin/space/derelict/arrival) "HF" = ( /obj/machinery/door/firedoor, /obj/effect/spawner/random/maintenance, /turf/open/floor/plating/airless, /area/ruin/space/derelict/hallway/secondary) +"Ie" = ( +/obj/structure/frame/computer{ + dir = 1 + }, +/turf/open/floor/iron, +/area/ruin/space/derelict/arrival) "Ik" = ( /obj/structure/closet/crate, /obj/item/clothing/head/beanie/rasta, @@ -3332,6 +3332,10 @@ /obj/effect/spawner/random/structure/girder, /turf/open/floor/plating/airless, /area/ruin/space/derelict/hallway/secondary) +"IE" = ( +/obj/structure/sign/warning/securearea, +/turf/closed/wall/r_wall, +/area/ruin/space/derelict/singularity_engine) "IF" = ( /turf/open/floor/plating/airless, /area/space/nearstation) @@ -3397,6 +3401,12 @@ }, /turf/open/floor/plating, /area/ruin/space/derelict/arrival) +"Lf" = ( +/obj/structure/sign/warning/securearea{ + name = "ENGINEERING ACCESS" + }, +/turf/closed/wall/r_wall, +/area/ruin/space/derelict/gravity_generator) "Lr" = ( /obj/machinery/computer/vaultcontroller{ dir = 8 @@ -3562,6 +3572,12 @@ icon_state = "damaged4" }, /area/ruin/space/derelict/singularity_engine) +"Rj" = ( +/obj/structure/chair/stool/directional/east, +/obj/effect/decal/remains/human, +/obj/effect/decal/cleanable/blood/old, +/turf/open/floor/iron/airless, +/area/ruin/space/derelict/hallway/primary) "Rr" = ( /obj/structure/table, /obj/effect/spawner/random/maintenance, @@ -3569,6 +3585,10 @@ dir = 8 }, /area/ruin/space/derelict/medical/chapel) +"Rt" = ( +/obj/machinery/computer/terminal/derelict/security, +/turf/open/floor/iron, +/area/ruin/space/derelict/bridge/ai_upload) "Rw" = ( /obj/structure/plaque/static_plaque/golden/commission/ks13, /turf/open/floor/iron/airless, @@ -3642,6 +3662,10 @@ /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/visible, /turf/open/floor/iron/airless, /area/ruin/space/derelict/atmospherics) +"WM" = ( +/obj/structure/sign/warning/electricshock, +/turf/closed/wall/r_wall, +/area/ruin/space/derelict/singularity_engine) "Xq" = ( /obj/item/stack/cable_coil/cut, /turf/open/floor/iron/airless{ @@ -3676,6 +3700,10 @@ }, /turf/open/floor/iron/white/airless, /area/ruin/space/derelict/medical) +"Yt" = ( +/obj/structure/chair/office, +/turf/open/floor/iron, +/area/ruin/space/derelict/arrival) "YQ" = ( /obj/structure/cable, /turf/open/floor/plating/airless, @@ -6830,7 +6858,7 @@ go kO kZ le -lp +Rj lH go go @@ -6882,7 +6910,7 @@ rk rk rk ax -aX +Rt be ax Bw @@ -6946,7 +6974,7 @@ lf lq lI lr -sd +vy go fZ hD @@ -7059,7 +7087,7 @@ sd lr lr lr -sd +vy go fZ gn @@ -7358,7 +7386,7 @@ aa aa rk dr -dA +WM zp eh ew @@ -7584,7 +7612,7 @@ cO cY df ds -dB +IE dW ei ex @@ -8036,7 +8064,7 @@ cu dc di du -dD +Lf cl el dr @@ -11658,7 +11686,7 @@ ea eC eb eS -fh +wF fo aa aa @@ -12368,7 +12396,7 @@ hf hP hf hf -hf +yS jJ IF Gf @@ -12477,11 +12505,11 @@ hP hf hf gW -jt -hf hf hf hf +Yt +Hy jJ IF aa @@ -12594,7 +12622,7 @@ kV hf hP hf -hf +Ie jJ IF aa diff --git a/code/game/machinery/computer/terminal.dm b/code/game/machinery/computer/terminal.dm new file mode 100644 index 00000000000..fc618703f98 --- /dev/null +++ b/code/game/machinery/computer/terminal.dm @@ -0,0 +1,27 @@ +//Basic computer meant for basic detailing in ruins and away missions, NOT meant for the station +/obj/machinery/computer/terminal + name = "terminal" + desc = "A relatively low-tech solution for internal computing, internal network mail, and logging. This model appears to be quite old." + circuit = /obj/item/circuitboard/computer/terminal //Deconstruction still wipes contents but this is easier than smashing the console + ///Text that displays on top of the actual 'lore' funnies. + var/upperinfo = "COPYRIGHT 2487 NANOSOFT-TM - DO NOT REDISTRIBUTE" + ///Text this terminal contains, not dissimilar to paper. Unlike paper, players cannot add or edit existing info. + var/content = list("Congratulations on your purchase of a NanoSoft-TM terminal! Further instructions on setup available in \ + user manual. For license and registration, please contact your licensed NanoSoft vendor and repair service representative.") + ///The TGUI theme this console uses. Defaults to hackerman, a retro greeny pallete which should fit most terminals. + var/tguitheme = "hackerman" + +/obj/machinery/computer/terminal/ui_interact(mob/user, datum/tgui/ui) + ..() + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Terminal", name) //The paper tgui file scares me, so new type of UI + ui.open() + +/obj/machinery/computer/terminal/ui_static_data(mob/user) + return list( + "messages" = content, + "uppertext" = upperinfo, + "tguitheme" = tguitheme, + ) + diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index cc3b1fb8e27..b5c42240abc 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -19,11 +19,6 @@ greyscale_colors = CIRCUIT_COLOR_COMMAND build_path = /obj/machinery/computer/accounting -//obj/item/circuitboard/computer/shield -// name = "Shield Control (Computer Board)" -// greyscale_colors = CIRCUIT_COLOR_COMMAND -// build_path = /obj/machinery/computer/stationshield - //Engineering /obj/item/circuitboard/computer/apc_control @@ -341,6 +336,10 @@ name = "Tram Controls (Computer Board)" build_path = /obj/machinery/computer/tram_controls +/obj/item/circuitboard/computer/terminal + name = "Terminal (Computer Board)" + build_path = /obj/machinery/computer/terminal + //Medical /obj/item/circuitboard/computer/crew diff --git a/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm b/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm index 332fb3bacb3..9cd67ded7f6 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm @@ -16,10 +16,29 @@ name = "unfinished paper scrap" desc = "Looks like someone started shakily writing a will in space common, but were interrupted by something bloody..." info = "I, Victor Belyakov, do hereby leave my _- " + /obj/item/paper/fluff/ruins/thederelict/vaultraider name = "Vault Raider Objectives" info = "Objectives #1: Find out what is hidden in Kosmicheskaya Stantsiya 13s Vault" +///The Derelict Terminals +/obj/machinery/computer/terminal/derelict/bridge + icon_screen = "comm" + icon_keyboard = "tech_key" + content = list("Central Command Status Summary -- Impending Doom -- Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, \ + and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station. \ + Good luck. -- Special Orders for KC13: Our military presence is inadequate in your sector. We need you to construct BSA-87 Artillery position aboard your station. Base parts are available for shipping via cargo. \ + -Nanotrasen Naval Command -- Identified Shift Divergences: Overflow bureaucracy mistake - It seems for some reason we put out the wrong job-listing for the overflow role this shift...I hope you like captains.") + +/obj/machinery/computer/terminal/derelict/cargo + content = list("INTER-MAIL - #789 - Cargo Technician I. Miller -> J. Holmes -- Jake, with all due respect, I don't know how you guys can keep this shit up. Robotics has made not one, but THREE AIs, \ + and at least one of them either has combat upgrades or isn't telling us the whole story. Not that we can even get close enough to tell, mind, they're doing everything in their power to keep us away. It's \ + unnerving. Meanwhile, a little birdie tells me one of your officers has been spending all shift trying to get their baton back from the clown with.. lethal force. This place is a fucking powder keg, Jake, \ + you know as well as I do. Either stop fucking around or we'll take matters into our own hands.") + +/obj/machinery/computer/terminal/derelict/security + content = list("INTER-MAIL - #790 - Cargo Technician J. Holmes -> I. Miller -- HOT SINGLE SILICONS IN YOUR AREA, CLICK ->HERE<- FOR MORE INFORMATION!") + /// Vault controller for use on the derelict/KS13. /obj/machinery/computer/vaultcontroller name = "vault controller" diff --git a/tgstation.dme b/tgstation.dme index cf058b555e3..bf7e20cdf85 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1359,6 +1359,7 @@ #include "code\game\machinery\computer\security.dm" #include "code\game\machinery\computer\station_alert.dm" #include "code\game\machinery\computer\teleporter.dm" +#include "code\game\machinery\computer\terminal.dm" #include "code\game\machinery\computer\tram_controls.dm" #include "code\game\machinery\computer\warrant.dm" #include "code\game\machinery\computer\arcade\arcade.dm" diff --git a/tgui/packages/tgui/interfaces/Terminal.js b/tgui/packages/tgui/interfaces/Terminal.js new file mode 100644 index 00000000000..cd8e1e2a1cf --- /dev/null +++ b/tgui/packages/tgui/interfaces/Terminal.js @@ -0,0 +1,30 @@ +import { useBackend } from '../backend'; +import { NoticeBox, Section } from '../components'; +import { Window } from '../layouts'; + +export const Terminal = (_, context) => { + const { act, data } = useBackend(context); + const { uppertext, messages } = data; + return ( + + + + {uppertext} + + + + + ); +}; + +const Messages = (props, context) => { + const { messages } = props; + const { act } = useBackend(context); + return messages.map(message => { + return ( +
+ {message} +
+ ); + }); +};