From dada99ff3f41f4867e4c6a059304a36dbf2fbf23 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 25 Dec 2022 06:58:48 +0100 Subject: [PATCH] [MIRROR] Traitor UI only shows Unlock/Failsafe Code if you have it [MDB IGNORE] (#18253) * Traitor UI only shows Unlock/Failsafe Code if you have it (#72114) ## About The Pull Request There are cases in which you don't have an unlock code (if the uplink is implanted in you from the start) and you obviously don't always start with with a failsafe code (need to buy it). So, let's only fill in this fields in the UI should they exist. There might be something to be said about wanting to ensure that people remember that they can check this UI screen to find the failsafe code should they lose it later, and I wouldn't mind changing the string to be something like "Failsafe: None" in that case. However, I just think that keeping it as: ```txt Code: Failsafe: ``` is silly and should be changed somehow. ## Why It's Good For The Game ![image](https://user-images.githubusercontent.com/34697715/208604758-d7ff3ae9-e552-4dd2-998d-81715cd06ffc.png) Note: That white box isn't part of the UI, that's a part of the edit I did to the screenshot in the area where the stuff... isn't? What was i thinking I think the UI looks a lot cleaner for those cases when you just don't have anything. ## Changelog :cl: qol: The Traitor's Antagonist Panel's Unlock and Failsafe entries will only appear if there is an Unlock/Failsafe Code to display. /:cl: * Traitor UI only shows Unlock/Failsafe Code if you have it Co-authored-by: san7890 --- tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx b/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx index 4e0378befce..cd79be0621d 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx @@ -136,9 +136,11 @@ const UplinkSection = (props, context) => { {uplink_intro}
- Code: {code} + {code && Code: {code}}
- Failsafe: {failsafe_code} + {failsafe_code && ( + Failsafe: {failsafe_code} + )}