From a7256cda39f4d7333f4ed1219ae87143bd8b29ab Mon Sep 17 00:00:00 2001
From: Addust <80979251+Addust@users.noreply.github.com>
Date: Sat, 20 Apr 2024 23:21:30 +0100
Subject: [PATCH] ports lore terminals from /tg/station (#21856)
* tyjktyerjt
* gvuukrtfyukmc
* replaces computer
---
.../jungleland_swamp_syndicatestation.dmm | 12 ++++----
.../lavaland_surface_syndicate_base1.dmm | 20 ++++++-------
code/game/machinery/computer/terminal.dm | 29 ++++++++++++++++++
.../circuitboards/computer_circuitboards.dm | 6 ++++
tgui/packages/tgui/interfaces/Terminal.js | 30 +++++++++++++++++++
yogstation.dme | 1 +
6 files changed, 82 insertions(+), 16 deletions(-)
create mode 100644 code/game/machinery/computer/terminal.dm
create mode 100644 tgui/packages/tgui/interfaces/Terminal.js
diff --git a/_maps/RandomRuins/JungleRuins/jungleland_swamp_syndicatestation.dmm b/_maps/RandomRuins/JungleRuins/jungleland_swamp_syndicatestation.dmm
index db67ea368ade..bc0f035abf4c 100644
--- a/_maps/RandomRuins/JungleRuins/jungleland_swamp_syndicatestation.dmm
+++ b/_maps/RandomRuins/JungleRuins/jungleland_swamp_syndicatestation.dmm
@@ -4952,15 +4952,15 @@
/turf/open/floor/plasteel/dark,
/area/ruin/powered/syndicate_lava_base/engineering)
"SV" = (
-/obj/machinery/computer/shuttle{
+/obj/machinery/computer/terminal{
desc = "Occasionally used to call in a resupply shuttle if one is in range.";
+ name = "syndicate resupply shuttle console";
icon_keyboard = "syndie_key";
icon_screen = "syndishuttle";
- light_color = "#FA8282";
- name = "syndicate cargo shuttle terminal";
- possible_destinations = "syndielavaland_cargo";
- req_access_txt = "150";
- shuttleId = "syndie_cargo"
+ upperinfo = "Syndicate Resupply Terminal - Jungleland Research Outpost";
+ content = list("This terminal is currently locked due to no supply shuttles being in range. For resupply, please contact Syndicate Command via your onboard red phone.");
+ tguitheme = "syndicate";
+ light_color = "#FA8282"
},
/turf/open/floor/plasteel/dark,
/area/ruin/powered/syndicate_lava_base/cargo)
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
index 782895e35ae8..ce1bd0cc41ad 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
@@ -1368,20 +1368,20 @@
/turf/open/floor/plasteel/white,
/area/ruin/powered/syndicate_lava_base/medbay)
"gV" = (
-/obj/machinery/computer/shuttle{
- desc = "Occasionally used to call in a resupply shuttle if one is in range.";
- icon_keyboard = "syndie_key";
- icon_screen = "syndishuttle";
- light_color = "#FA8282";
- name = "syndicate cargo shuttle terminal";
- possible_destinations = "syndielavaland_cargo";
- req_access_txt = "150";
- shuttleId = "syndie_cargo"
- },
/obj/machinery/airalarm/syndicate{
dir = 8;
pixel_x = 24
},
+/obj/machinery/computer/terminal{
+ desc = "Occasionally used to call in a resupply shuttle if one is in range.";
+ name = "syndicate resupply shuttle console";
+ icon_keyboard = "syndie_key";
+ icon_screen = "syndishuttle";
+ upperinfo = "Syndicate Resupply Terminal - Lavaland Research Outpost";
+ content = list("This terminal is currently locked due to no supply shuttles being in range. For resupply, please contact Syndicate Command via your onboard red phone.");
+ tguitheme = "syndicate";
+ light_color = "#FA8282"
+ },
/turf/open/floor/mineral/plastitanium,
/area/ruin/powered/syndicate_lava_base/cargo)
"gW" = (
diff --git a/code/game/machinery/computer/terminal.dm b/code/game/machinery/computer/terminal.dm
new file mode 100644
index 000000000000..50f379be7b62
--- /dev/null
+++ b/code/game/machinery/computer/terminal.dm
@@ -0,0 +1,29 @@
+//Basic computer meant for basic detailing in ruins and away missions, NOT meant for the station
+//stolen from tgstation with love
+/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."
+ //convenience in deconstruction
+ circuit = /obj/item/circuitboard/computer/terminal
+ ///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 scared whoever wrote this, 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 d2a196a1c8b3..3f1f019a59f9 100644
--- a/code/game/objects/items/circuitboards/computer_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm
@@ -563,3 +563,9 @@
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/computer/shuttle/mining
+
+//Miscellaneous/ruin exclusive
+
+/obj/item/circuitboard/computer/terminal
+ name = "Data Terminal (Computer Board)"
+ build_path = /obj/machinery/computer/terminal
diff --git a/tgui/packages/tgui/interfaces/Terminal.js b/tgui/packages/tgui/interfaces/Terminal.js
new file mode 100644
index 000000000000..cd8e1e2a1cfa
--- /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 (
+
+ );
+ });
+};
diff --git a/yogstation.dme b/yogstation.dme
index f4cc489c9efe..85e3eae2ba8d 100644
--- a/yogstation.dme
+++ b/yogstation.dme
@@ -1104,6 +1104,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\warrant.dm"
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"