From 978aa5afca5fd647fd5c3b8da4ffde6010ae1809 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Sat, 2 Dec 2023 22:53:14 +0100
Subject: [PATCH] RD Console DesignDisk Fix
---
code/modules/research/rdconsole.dm | 2 +-
.../tgui/interfaces/ResearchConsole.js | 32 ++++++++++---------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 9c517e4b086..427a296f182 100755
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -143,7 +143,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!emagged)
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
- to_chat(user, "You you disable the security protocols.")
+ to_chat(user, "You disable the security protocols.")
return 1
/obj/machinery/computer/rdconsole/proc/GetResearchLevelsInfo()
diff --git a/tgui/packages/tgui/interfaces/ResearchConsole.js b/tgui/packages/tgui/interfaces/ResearchConsole.js
index b8af3339be0..44bb143d514 100644
--- a/tgui/packages/tgui/interfaces/ResearchConsole.js
+++ b/tgui/packages/tgui/interfaces/ResearchConsole.js
@@ -196,7 +196,7 @@ const TechDisk = (props, context) => {
const DataDisk = (props, context) => {
const { act, data } = useBackend(context);
- const { designs } = data.info;
+ const { designs } = data;
const { disk } = props;
@@ -233,20 +233,22 @@ const DataDisk = (props, context) => {
onInput={(e, v) => act('search', { search: v })}
mb={1}
/>
-
- {designs.map((item) => (
-
-
-
- ))}
-
+ {(designs && designs.length && (
+
+ {designs.map((item) => (
+
+
+
+ ))}
+
+ )) || No designs found.}
);
}