* Set pAI up with a trackless map * Added a untracked map user interface class to support gps-less mapping * Added to pAI by default, expect it to be given to borgs as well in time. As the personal AI is literally immobile as a ghost, it is useful to ensure that people carry one. With that idea in mind, it is worth giving the pAI a reason to be carried that doesn't depend on the player having a cracking selection of midi files on hand. * Tried to use new ProtoId and have EntityUid on the client as commented by metalgearsloth * Review --------- Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
36 lines
843 B
C#
36 lines
843 B
C#
using Robust.Client.GameObjects;
|
|
|
|
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();
|
|
_window?.Close();
|
|
EntityUid? gridUid = null;
|
|
|
|
if (EntMan.TryGetComponent<TransformComponent>(Owner, out var xform))
|
|
{
|
|
gridUid = xform.GridUid;
|
|
}
|
|
|
|
_window = new StationMapWindow(gridUid, null);
|
|
_window.OpenCentered();
|
|
_window.OnClose += Close;
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
_window?.Dispose();
|
|
}
|
|
}
|