Skip to content

Commit

Permalink
[MIRROR] Plexagon Access Management now tells you that you need a Tri…
Browse files Browse the repository at this point in the history
…m to use Templates for ID cards [MDB IGNORE] (#2910)

* 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 <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Jun 8, 2024
1 parent 7acf9e9 commit 1d7f97c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tgui/packages/tgui/interfaces/NtosCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const NtosCardContent = (props) => {
trimAccess,
wildcardFlags,
wildcardSlots,
hasTrim,
} = data;

return (
Expand All @@ -93,7 +94,11 @@ export const NtosCardContent = (props) => {
/>
}
>
<TemplateDropdown templates={templates} />
{hasTrim ? (
<TemplateDropdown templates={templates} />
) : (
'Templates require a trim already applied to the card. Please use an ID Painter to apply a trim.'
)}
</Section>
)}
<Stack mt={1}>
Expand Down

0 comments on commit 1d7f97c

Please sign in to comment.