From 99d78c4b97aff1a5a0dad6804bac00d4bc425e1f Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 28 Dec 2023 19:02:21 -0500 Subject: [PATCH] Station beacons (#23136) * Station beacons * crate * remove navmap from warp points * ack * oh damn * okay emisser --- .../UI/NavMapBeaconBoundUserInterface.cs | 35 ++ .../Pinpointer/UI/NavMapBeaconWindow.xaml | 17 + .../Pinpointer/UI/NavMapBeaconWindow.xaml.cs | 78 +++ Content.Server/Pinpointer/NavMapSystem.cs | 73 ++- .../ConfigurableNavMapBeaconComponent.cs | 41 ++ .../Pinpointer/NavMapBeaconComponent.cs | 8 +- .../Locale/en-US/pinpointer/station_map.ftl | 12 +- .../fills/crates/engineering-crates.ftl | 3 + .../Catalog/Cargo/cargo_engineering.yml | 10 + .../Catalog/Fills/Crates/engineering.yml | 9 + .../Entities/Markers/warp_point.yml | 100 ---- .../Objects/Devices/station_beacon.yml | 553 ++++++++++++++++++ .../Graphs/structures/station_beacon.yml | 26 + .../Devices/station_beacon.rsi/assembly.png | Bin 0 -> 474 bytes .../Devices/station_beacon.rsi/blink.png | Bin 0 -> 373 bytes .../Devices/station_beacon.rsi/icon.png | Bin 0 -> 302 bytes .../Devices/station_beacon.rsi/meta.json | 26 + Resources/migration.yml | 11 + 18 files changed, 899 insertions(+), 103 deletions(-) create mode 100644 Content.Client/Pinpointer/UI/NavMapBeaconBoundUserInterface.cs create mode 100644 Content.Client/Pinpointer/UI/NavMapBeaconWindow.xaml create mode 100644 Content.Client/Pinpointer/UI/NavMapBeaconWindow.xaml.cs create mode 100644 Content.Shared/Pinpointer/ConfigurableNavMapBeaconComponent.cs create mode 100644 Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/structures/station_beacon.yml create mode 100644 Resources/Textures/Objects/Devices/station_beacon.rsi/assembly.png create mode 100644 Resources/Textures/Objects/Devices/station_beacon.rsi/blink.png create mode 100644 Resources/Textures/Objects/Devices/station_beacon.rsi/icon.png create mode 100644 Resources/Textures/Objects/Devices/station_beacon.rsi/meta.json diff --git a/Content.Client/Pinpointer/UI/NavMapBeaconBoundUserInterface.cs b/Content.Client/Pinpointer/UI/NavMapBeaconBoundUserInterface.cs new file mode 100644 index 0000000000..0573d1a2db --- /dev/null +++ b/Content.Client/Pinpointer/UI/NavMapBeaconBoundUserInterface.cs @@ -0,0 +1,35 @@ +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(); + } +} diff --git a/Content.Client/Pinpointer/UI/NavMapBeaconWindow.xaml b/Content.Client/Pinpointer/UI/NavMapBeaconWindow.xaml new file mode 100644 index 0000000000..88c3506263 --- /dev/null +++ b/Content.Client/Pinpointer/UI/NavMapBeaconWindow.xaml @@ -0,0 +1,17 @@ + + + +