Station maps (#13027)

This commit is contained in:
metalgearsloth
2023-04-13 16:21:24 +10:00
committed by GitHub
parent fc94d5245e
commit be4e69b0c0
45 changed files with 1210 additions and 153 deletions

View File

@@ -0,0 +1,35 @@
using Robust.Client.GameObjects;
using Robust.Client.Player;
namespace Content.Client.Pinpointer.UI;
public sealed class StationMapBoundUserInterface : BoundUserInterface
{
private StationMapWindow? _window;
public StationMapBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_window?.Close();
EntityUid? gridUid = null;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<TransformComponent>(Owner.Owner, out var xform))
{
gridUid = xform.GridUid;
}
_window = new StationMapWindow(gridUid, Owner.Owner);
_window.OpenCentered();
_window.OnClose += Close;
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_window?.Dispose();
}
}