remove UntrackedMapBoundUserInterface (#30752)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using Content.Server.GameTicking;
|
||||
using Content.Server.GameTicking.Presets;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Pinpointer;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.RoundEnd;
|
||||
using Content.Server.Shuttles.Components;
|
||||
@@ -18,6 +17,7 @@ using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.NukeOps;
|
||||
using Content.Shared.Pinpointer;
|
||||
using Content.Shared.Station.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
namespace Content.Server.Pinpointer;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class StationMapComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Added to an entity using station map so when its parent changes we reset it.
|
||||
/// </summary>
|
||||
11
Content.Shared/Pinpointer/StationMapComponent.cs
Normal file
11
Content.Shared/Pinpointer/StationMapComponent.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Content.Shared.Pinpointer;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class StationMapComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to show the user's location on the map.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool ShowLocation = true;
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
type: InstrumentBoundUserInterface
|
||||
requireInputValidation: false
|
||||
enum.StationMapUiKey.Key:
|
||||
type: UntrackedStationMapBoundUserInterface
|
||||
type: StationMapBoundUserInterface
|
||||
requireInputValidation: false
|
||||
- type: Sprite
|
||||
sprite: Objects/Fun/pai.rsi
|
||||
|
||||
Reference in New Issue
Block a user