[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 GitHub
parent 4a3d3efd62
commit 3238c2e144

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