Station records (#8720)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Flipp Syder
2022-08-08 22:10:01 -07:00
committed by GitHub
parent 75dfbdb57f
commit 3d36a6e1f6
35 changed files with 1888 additions and 9 deletions

View 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);
}
}