Add roles to Ghost Warp Menu (#7546)
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
<DefaultWindow xmlns="https://spacestation14.io"
|
<DefaultWindow xmlns="https://spacestation14.io"
|
||||||
Title="{Loc 'ghost-target-window-title'}"
|
Title="{Loc 'ghost-target-window-title'}"
|
||||||
MinSize="300 450"
|
MinSize="450 450"
|
||||||
SetSize="300 450">
|
SetSize="450 450">
|
||||||
<ScrollContainer VerticalExpand="True"
|
<ScrollContainer VerticalExpand="True"
|
||||||
HorizontalExpand="True">
|
HorizontalExpand="True"
|
||||||
|
HScrollEnabled="False">
|
||||||
<BoxContainer Name="ButtonContainer"
|
<BoxContainer Name="ButtonContainer"
|
||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
VerticalExpand="True"
|
VerticalExpand="True"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
using Content.Shared.Ghost;
|
using Content.Shared.Ghost;
|
||||||
using Robust.Client.AutoGenerated;
|
using Robust.Client.AutoGenerated;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
@@ -54,7 +55,7 @@ namespace Content.Client.Ghost.UI
|
|||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
MinSize = (230, 20),
|
MinSize = (340, 20),
|
||||||
ClipText = true,
|
ClipText = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ namespace Content.Client.Ghost.UI
|
|||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
MinSize = (230, 20),
|
MinSize = (340, 20),
|
||||||
ClipText = true,
|
ClipText = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -253,7 +253,12 @@ namespace Content.Server.Ghost
|
|||||||
{
|
{
|
||||||
if (player.AttachedEntity is {Valid: true} attached)
|
if (player.AttachedEntity is {Valid: true} attached)
|
||||||
{
|
{
|
||||||
players.Add(attached, EntityManager.GetComponent<MetaDataComponent>(attached).EntityName);
|
TryComp<MindComponent>(attached, out var mind);
|
||||||
|
|
||||||
|
string playerInfo = $"{EntityManager.GetComponent<MetaDataComponent>(attached).EntityName} ({mind?.Mind?.CurrentJob?.Name ?? "Unknown"})";
|
||||||
|
|
||||||
|
if (TryComp<MobStateComponent>(attached, out var state) && !state.IsDead())
|
||||||
|
players.Add(attached, playerInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user