From 648d9498dd42082936004ffc52257f24a55c3103 Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Sat, 8 Jun 2024 11:50:31 +0200
Subject: [PATCH] [MIRROR] Plexagon Access Management now tells you that you
need a Trim to use Templates for ID cards (#28057)
* Plexagon Access Management now tells you that you need a Trim to use Templates for ID cards (#83683)
## About The Pull Request
Plexagon Access Management now removes the Templates dropdown, and puts
in a note about trim in its place, if the inserted card does not have a
trim attached.
## Why It's Good For The Game
You can't apply a template without a trim on the card. The proc that
handles it does a bitwise AND between what the template and the trim
have for access, and applies it to the ID card. This is not mentioned
anywhere in the program.
I spent hours tracing ID procs trying to find the supposed bug
preventing templates from applying before I stumbled upon this. So now
it tells the user.
I do not know why you're allowed to choose templates that aren't related
to the currently applied trim, but that's out of scope for my
frustration.
## Changelog
:cl:
qol: Plexagon Access Management now tells you that you need an ID Trim
before applying a Template, rather than silently failing.
/:cl:
* Plexagon Access Management now tells you that you need a Trim to use Templates for ID cards
---------
Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
---
tgui/packages/tgui/interfaces/NtosCard.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tgui/packages/tgui/interfaces/NtosCard.tsx b/tgui/packages/tgui/interfaces/NtosCard.tsx
index 5997aa0e91c..ffba4a64754 100644
--- a/tgui/packages/tgui/interfaces/NtosCard.tsx
+++ b/tgui/packages/tgui/interfaces/NtosCard.tsx
@@ -69,6 +69,7 @@ export const NtosCardContent = (props) => {
trimAccess,
wildcardFlags,
wildcardSlots,
+ hasTrim,
} = data;
return (
@@ -93,7 +94,11 @@ export const NtosCardContent = (props) => {
/>
}
>
-
+ {hasTrim ? (
+
+ ) : (
+ 'Templates require a trim already applied to the card. Please use an ID Painter to apply a trim.'
+ )}
)}