remove UntrackedMapBoundUserInterface (#30752)

This commit is contained in:
slarticodefast
2024-08-09 07:24:49 +02:00
committed by GitHub
parent 2ea17a492d
commit da0b8d4731
6 changed files with 18 additions and 37 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Pinpointer;
using Robust.Client.UserInterface;
namespace Content.Client.Pinpointer.UI;
@@ -23,6 +24,9 @@ public sealed class StationMapBoundUserInterface : BoundUserInterface
_window = this.CreateWindow<StationMapWindow>();
_window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
_window.Set(gridUid, Owner);
if (EntMan.TryGetComponent<StationMapComponent>(Owner, out var comp) && comp.ShowLocation)
_window.Set(gridUid, Owner);
else
_window.Set(gridUid, null);
}
}

View File

@@ -1,28 +0,0 @@
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);
}
}