Make ghost role names default to entity name (#9478)
This commit is contained in:
@@ -22,6 +22,7 @@ namespace Content.Client.Ghost.Roles.UI
|
|||||||
{
|
{
|
||||||
_window = new MakeGhostRoleWindow();
|
_window = new MakeGhostRoleWindow();
|
||||||
|
|
||||||
|
|
||||||
_window.OnClose += OnClose;
|
_window.OnClose += OnClose;
|
||||||
_window.OnMake += OnMake;
|
_window.OnMake += OnMake;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<DefaultWindow Title="Make Ghost Role"
|
<DefaultWindow Title="{Loc Make Ghost Role}"
|
||||||
xmlns="https://spacestation14.io">
|
xmlns="https://spacestation14.io">
|
||||||
|
|
||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ namespace Content.Client.Ghost.Roles.UI
|
|||||||
public void SetEntity(EntityUid uid)
|
public void SetEntity(EntityUid uid)
|
||||||
{
|
{
|
||||||
EntityUid = uid;
|
EntityUid = uid;
|
||||||
|
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||||
|
RoleName.Text = entManager.GetComponent<MetaDataComponent>(uid).EntityName;
|
||||||
RoleEntity.Text = $"{uid}";
|
RoleEntity.Text = $"{uid}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user