]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[HOTFIX] Fix chameleon PDAs renaming IDs (#34249)
authorSlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Tue, 7 Jan 2025 19:31:54 +0000 (20:31 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Jan 2025 19:31:54 +0000 (20:31 +0100)
Fix chameleon PDA

Content.Shared/Access/Systems/SharedIdCardSystem.cs

index a5a37eecbd07eaa3a567a8f86ef5558a62b56728..db7d9b38c87ea5ac7899323cebbc563fbb5846b2 100644 (file)
@@ -33,7 +33,8 @@ public abstract class SharedIdCardSystem : EntitySystem
         // 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<IdCardComponent>(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<IdCardComponent>(ev.Uid) || HasComp<PdaComponent>(ev.Uid))
             return;
 
         if (TryFindIdCard(ev.Uid, out var idCard))