Station records (#8720)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
51
Content.Client/CrewManifest/CrewManifestEui.cs
Normal file
51
Content.Client/CrewManifest/CrewManifestEui.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Content.Client.Eui;
|
||||
using Content.Client.GameTicking.Managers;
|
||||
using Content.Shared.CrewManifest;
|
||||
using Content.Shared.Eui;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Content.Client.CrewManifest;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class CrewManifestEui : BaseEui
|
||||
{
|
||||
private readonly ClientGameTicker _gameTicker;
|
||||
private readonly CrewManifestUi _window;
|
||||
|
||||
public CrewManifestEui()
|
||||
{
|
||||
_gameTicker = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ClientGameTicker>();
|
||||
_window = new();
|
||||
|
||||
_window.OnClose += () =>
|
||||
{
|
||||
SendMessage(new CrewManifestEuiClosed());
|
||||
};
|
||||
}
|
||||
|
||||
public override void Opened()
|
||||
{
|
||||
base.Opened();
|
||||
|
||||
_window.OpenCentered();
|
||||
}
|
||||
|
||||
public override void Closed()
|
||||
{
|
||||
base.Closed();
|
||||
|
||||
_window.Close();
|
||||
}
|
||||
|
||||
public override void HandleState(EuiStateBase state)
|
||||
{
|
||||
base.HandleState(state);
|
||||
|
||||
if (state is not CrewManifestEuiState cast)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_window.Populate(cast.StationName, cast.Entries);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user