Make ghost role names default to entity name (#9478)

This commit is contained in:
metalgearsloth
2022-07-07 13:36:57 +10:00
committed by GitHub
parent d9c247b310
commit 94a9569d8f
3 changed files with 4 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ namespace Content.Client.Ghost.Roles.UI
{
_window = new MakeGhostRoleWindow();
_window.OnClose += OnClose;
_window.OnMake += OnMake;
}

View File

@@ -1,4 +1,4 @@
<DefaultWindow Title="Make Ghost Role"
<DefaultWindow Title="{Loc Make Ghost Role}"
xmlns="https://spacestation14.io">
<BoxContainer Orientation="Vertical">

View File

@@ -34,6 +34,8 @@ namespace Content.Client.Ghost.Roles.UI
public void SetEntity(EntityUid uid)
{
EntityUid = uid;
var entManager = IoCManager.Resolve<IEntityManager>();
RoleName.Text = entManager.GetComponent<MetaDataComponent>(uid).EntityName;
RoleEntity.Text = $"{uid}";
}