[HOTFIX] Fix chameleon PDAs renaming IDs (#34249)

Fix chameleon PDA
This commit is contained in:
SlamBamActionman 2025-01-07 20:31:54 +01:00 committed by deltanedas
parent 620417206c
commit 37e9113cbf
1 changed files with 2 additions and 1 deletions

View 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))