Files
tbd-station-14/Content.Client/Pinpointer/UI/UntrackedMapBoundUserInterface.cs
metalgearsloth cbf329a82d Remove some BUI boilerplate (#28399)
* Remove some BUI boilerplate

- The disposals overrides got removed due to the helper method handling it.
- Replace window creation with CreateWindow helper.
- Fixed some stinky code which would cause exceptions.

* More

* moar

* weh

* done

* More BUIs

* More updates

* weh

* moar

* look who it is

* weh

* merge

* weh

* fixes
2024-07-20 15:40:16 +10:00

29 lines
776 B
C#

using Robust.Client.UserInterface;
namespace Content.Client.Pinpointer.UI;
public sealed class UntrackedStationMapBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private StationMapWindow? _window;
public UntrackedStationMapBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
EntityUid? gridUid = null;
// TODO: What this just looks like it's been copy-pasted wholesale from StationMapBoundUserInterface?
if (EntMan.TryGetComponent<TransformComponent>(Owner, out var xform))
{
gridUid = xform.GridUid;
}
_window = this.CreateWindow<StationMapWindow>();
_window.Set(gridUid, Owner);
}
}