Skip to content

Commit

Permalink
[HOTFIX] Fix chameleon PDAs renaming IDs (#34249)
Browse files Browse the repository at this point in the history
Fix chameleon PDA
  • Loading branch information
SlamBamActionman authored Jan 7, 2025
1 parent 4a3d3ef commit 3238c2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Content.Shared/Access/Systems/SharedIdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<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))
Expand Down

0 comments on commit 3238c2e

Please sign in to comment.