diff --git a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs index 81b32bb5d9..0e5329fb23 100644 --- a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs +++ b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs @@ -39,7 +39,7 @@ namespace Content.Server.GameObjects.Components.PDA [ViewVariables] private BoundUserInterface _interface = default!; [ViewVariables] private string _startingIdCard = default!; [ViewVariables] public bool IdSlotEmpty => _idSlot.ContainedEntities.Count < 1; - [ViewVariables] public IEntity? OwnerMob { get; private set; } + [ViewVariables] public string? OwnerName { get; private set; } [ViewVariables] public IdCardComponent? ContainedID { get; private set; } @@ -115,7 +115,7 @@ namespace Content.Server.GameObjects.Components.PDA { var ownerInfo = new PDAIdInfoText { - ActualOwnerName = OwnerMob?.Name, + ActualOwnerName = OwnerName, IdOwner = ContainedID?.FullName, JobTitle = ContainedID?.JobTitle }; @@ -182,16 +182,10 @@ namespace Content.Server.GameObjects.Components.PDA return true; } - public void SetPDAOwner(IEntity mob) + public void SetPDAOwner(string name) { - if (mob == OwnerMob) - { - return; - } - - OwnerMob = mob; + OwnerName = name; UpdatePDAUserInterface(); - } private void InsertIdCard(IdCardComponent card) diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index 72238cdd88..b2441863c6 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -800,7 +800,7 @@ namespace Content.Server.GameTicking var access = card.Owner.GetComponent(); var accessTags = access.Tags; accessTags.UnionWith(jobPrototype.Access); - pdaComponent.SetPDAOwner(mob); + pdaComponent.SetPDAOwner(characterName); var mindComponent = mob.GetComponent(); if (mindComponent.HasMind) //Redundancy checks. {