Files
tbd-station-14/Content.Client/Pinpointer/UI/NavMapBeaconBoundUserInterface.cs
mr-bo-jangles 412f3f470c Set pAI up with a static map the pAI can use (#23499)
* 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>
2024-01-06 18:31:20 +11:00

35 lines
847 B
C#

using Content.Shared.Pinpointer;
using JetBrains.Annotations;
namespace Content.Client.Pinpointer.UI;
[UsedImplicitly]
public sealed class NavMapBeaconBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private NavMapBeaconWindow? _window;
public NavMapBeaconBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_window = new NavMapBeaconWindow(Owner);
_window.OpenCentered();
_window.OnClose += Close;
_window.OnApplyButtonPressed += (label, enabled, color) =>
{
SendMessage(new NavMapBeaconConfigureBuiMessage(label, enabled, color));
};
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_window?.Dispose();
}
}