From b68b005d078b433a4f71a23ddffb00bb414b0393 Mon Sep 17 00:00:00 2001 From: SlamBamActionman Date: Mon, 6 Jan 2025 12:10:49 +0100 Subject: [PATCH] Fix chameleon PDA --- Content.Shared/Access/Systems/SharedIdCardSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Access/Systems/SharedIdCardSystem.cs b/Content.Shared/Access/Systems/SharedIdCardSystem.cs index a5a37eecbd07..db7d9b38c87e 100644 --- a/Content.Shared/Access/Systems/SharedIdCardSystem.cs +++ b/Content.Shared/Access/Systems/SharedIdCardSystem.cs @@ -33,7 +33,8 @@ private void OnRename(ref EntityRenamedEvent ev) // When a player gets renamed their id card is renamed as well to match. // Unfortunately since TryFindIdCard will succeed if the entity is also a card this means that the card will // keep renaming itself unless we return early. - if (HasComp(ev.Uid)) + // We also do not include the PDA itself being renamed, as that triggers the same event (e.g. for chameleon PDAs). + if (HasComp(ev.Uid) || HasComp(ev.Uid)) return; if (TryFindIdCard(ev.Uid, out var idCard))