Fix Chameleon PDAs renaming the user in station records (#35782)
This commit is contained in:
@@ -64,7 +64,8 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem
|
||||
// Unfortunately this means that an event is called for it as well, and since TryFindIdCard will succeed if the
|
||||
// given entity is a card and the card itself is the key the record will be mistakenly renamed to the card's name
|
||||
// if we don't 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 (_idCard.TryFindIdCard(ev.Uid, out var idCard))
|
||||
|
||||
Reference in New Issue
Block a user