diff --git a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs index 6eae796856..73f18aec8d 100644 --- a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs +++ b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs @@ -18,7 +18,8 @@ namespace Content.Client.Access.UI { base.Open(); - _window = new AgentIDCardWindow(); + _window?.Dispose(); + _window = new AgentIDCardWindow(this); if (State != null) UpdateState(State); @@ -39,6 +40,11 @@ namespace Content.Client.Access.UI SendMessage(new AgentIDCardJobChangedMessage(newJob)); } + public void OnJobIconChanged(string newJobIcon) + { + SendMessage(new AgentIDCardJobIconChangedMessage(newJobIcon)); + } + /// /// Update the UI state based on server-sent info /// @@ -51,6 +57,7 @@ namespace Content.Client.Access.UI _window.SetCurrentName(cast.CurrentName); _window.SetCurrentJob(cast.CurrentJob); + _window.SetAllowedIcons(cast.Icons); } protected override void Dispose(bool disposing) diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml b/Content.Client/Access/UI/AgentIDCardWindow.xaml index 22bb3cb275..4947cd7f10 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml @@ -6,5 +6,12 @@