Cleaner BoundUserInterfaces (#17736)

This commit is contained in:
TemporalOroboros
2023-07-08 09:02:17 -07:00
committed by GitHub
parent 55b4fb1649
commit 3ac4cf85db
137 changed files with 1069 additions and 972 deletions

View File

@@ -1,13 +1,13 @@
using Robust.Client.GameObjects;
using Robust.Client.Player;
namespace Content.Client.Pinpointer.UI;
public sealed class StationMapBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private StationMapWindow? _window;
public StationMapBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
public StationMapBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
@@ -17,12 +17,12 @@ public sealed class StationMapBoundUserInterface : BoundUserInterface
_window?.Close();
EntityUid? gridUid = null;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<TransformComponent>(Owner.Owner, out var xform))
if (EntMan.TryGetComponent<TransformComponent>(Owner, out var xform))
{
gridUid = xform.GridUid;
}
_window = new StationMapWindow(gridUid, Owner.Owner);
_window = new StationMapWindow(gridUid, Owner);
_window.OpenCentered();
_window.OnClose += Close;
}