From 94a9569d8f91849b92e007de4e94de237e6dfe08 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 7 Jul 2022 13:36:57 +1000 Subject: [PATCH] Make ghost role names default to entity name (#9478) --- Content.Client/Ghost/Roles/UI/MakeGhostRoleEui.cs | 1 + Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml | 2 +- Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml.cs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Client/Ghost/Roles/UI/MakeGhostRoleEui.cs b/Content.Client/Ghost/Roles/UI/MakeGhostRoleEui.cs index 66a0550a75..4e368d7420 100644 --- a/Content.Client/Ghost/Roles/UI/MakeGhostRoleEui.cs +++ b/Content.Client/Ghost/Roles/UI/MakeGhostRoleEui.cs @@ -22,6 +22,7 @@ namespace Content.Client.Ghost.Roles.UI { _window = new MakeGhostRoleWindow(); + _window.OnClose += OnClose; _window.OnMake += OnMake; } diff --git a/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml b/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml index eaff9c0946..1d4033eed3 100644 --- a/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml +++ b/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml @@ -1,4 +1,4 @@ - diff --git a/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml.cs b/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml.cs index 642c2252f7..8767793aee 100644 --- a/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml.cs +++ b/Content.Client/Ghost/Roles/UI/MakeGhostRoleWindow.xaml.cs @@ -34,6 +34,8 @@ namespace Content.Client.Ghost.Roles.UI public void SetEntity(EntityUid uid) { EntityUid = uid; + var entManager = IoCManager.Resolve(); + RoleName.Text = entManager.GetComponent(uid).EntityName; RoleEntity.Text = $"{uid}"; }