Suit sensor and crew monitoring (#5521)

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Alex Evgrashin
2021-12-29 08:19:00 +03:00
committed by GitHub
parent 7c88129540
commit 1705eae96c
23 changed files with 845 additions and 11 deletions

View File

@@ -0,0 +1,44 @@
using Content.Shared.Medical.CrewMonitoring;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.Medical.CrewMonitoring
{
public class CrewMonitoringBoundUserInterface : BoundUserInterface
{
private CrewMonitoringWindow? _menu;
public CrewMonitoringBoundUserInterface([NotNull] ClientUserInterfaceComponent owner, [NotNull] object uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
_menu = new CrewMonitoringWindow();
_menu.OpenCentered();
_menu.OnClose += Close;
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
switch (state)
{
case CrewMonitoringState st:
_menu?.ShowSensors(st.Sensors);
break;
}
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;
_menu?.Dispose();
}
}
}