diff --git a/Content.Server/Pinpointer/NavMapSystem.cs b/Content.Server/Pinpointer/NavMapSystem.cs index 9d0862ba47..2a736b5d50 100644 --- a/Content.Server/Pinpointer/NavMapSystem.cs +++ b/Content.Server/Pinpointer/NavMapSystem.cs @@ -62,7 +62,6 @@ public sealed partial class NavMapSystem : SharedNavMapSystem SubscribeLocalEvent(OnNavMapBeaconAnchor); SubscribeLocalEvent(OnConfigureMessage); SubscribeLocalEvent(OnConfigurableMapInit); - SubscribeLocalEvent(OnConfigurableExamined); } private void OnStationInit(StationGridAddedEvent ev) @@ -223,17 +222,6 @@ public sealed partial class NavMapSystem : SharedNavMapSystem UpdateBeaconEnabledVisuals((ent, navMap)); } - private void OnConfigurableExamined(Entity ent, ref ExaminedEvent args) - { - if (!args.IsInDetailsRange || !TryComp(ent, out var navMap)) - return; - - args.PushMarkup(Loc.GetString("nav-beacon-examine-text", - ("enabled", navMap.Enabled), - ("color", navMap.Color.ToHexNoAlpha()), - ("label", navMap.Text ?? string.Empty))); - } - #endregion #region: Grid functions diff --git a/Content.Shared/Pinpointer/ConfigurableNavMapBeaconComponent.cs b/Content.Shared/Pinpointer/ConfigurableNavMapBeaconComponent.cs index cd6744c87d..8b678e0300 100644 --- a/Content.Shared/Pinpointer/ConfigurableNavMapBeaconComponent.cs +++ b/Content.Shared/Pinpointer/ConfigurableNavMapBeaconComponent.cs @@ -8,10 +8,7 @@ namespace Content.Shared.Pinpointer; /// [RegisterComponent, NetworkedComponent] [Access(typeof(SharedNavMapSystem))] -public sealed partial class ConfigurableNavMapBeaconComponent : Component -{ - -} +public sealed partial class ConfigurableNavMapBeaconComponent : Component; [Serializable, NetSerializable] public sealed class NavMapBeaconConfigureBuiMessage : BoundUserInterfaceMessage @@ -31,11 +28,11 @@ public sealed class NavMapBeaconConfigureBuiMessage : BoundUserInterfaceMessage [Serializable, NetSerializable] public enum NavMapBeaconUiKey : byte { - Key + Key, } [Serializable, NetSerializable] public enum NavMapBeaconVisuals : byte { - Enabled + Enabled, } diff --git a/Content.Shared/Pinpointer/NavMapBeaconComponent.cs b/Content.Shared/Pinpointer/NavMapBeaconComponent.cs index 0a86bdd9d2..4bb6384fb9 100644 --- a/Content.Shared/Pinpointer/NavMapBeaconComponent.cs +++ b/Content.Shared/Pinpointer/NavMapBeaconComponent.cs @@ -12,8 +12,7 @@ public sealed partial class NavMapBeaconComponent : Component /// /// Defaults to entity name if nothing found. /// - [ViewVariables(VVAccess.ReadWrite), DataField] - [AutoNetworkedField] + [DataField, AutoNetworkedField] public string? Text; /// @@ -23,14 +22,12 @@ public sealed partial class NavMapBeaconComponent : Component [DataField] public LocId? DefaultText; - [ViewVariables(VVAccess.ReadWrite), DataField] - [AutoNetworkedField] + [DataField, AutoNetworkedField] public Color Color = Color.Orange; /// /// Only enabled beacons can be seen on a station map. /// - [ViewVariables(VVAccess.ReadWrite), DataField] - [AutoNetworkedField] + [DataField, AutoNetworkedField] public bool Enabled = true; } diff --git a/Content.Shared/Pinpointer/SharedNavMapSystem.cs b/Content.Shared/Pinpointer/SharedNavMapSystem.cs index 37d60dec28..5d64803273 100644 --- a/Content.Shared/Pinpointer/SharedNavMapSystem.cs +++ b/Content.Shared/Pinpointer/SharedNavMapSystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; using System.Runtime.CompilerServices; +using Content.Shared.Examine; using Content.Shared.Tag; using Robust.Shared.GameStates; using Robust.Shared.Network; @@ -34,6 +35,8 @@ public abstract class SharedNavMapSystem : EntitySystem // Data handling events SubscribeLocalEvent(OnGetState); + SubscribeLocalEvent(OnConfigurableExamined); + _doorQuery = GetEntityQuery(); } @@ -164,6 +167,17 @@ public abstract class SharedNavMapSystem : EntitySystem args.State = new NavMapDeltaState(chunks, component.Beacons, component.RegionProperties, new(component.Chunks.Keys)); } + private void OnConfigurableExamined(Entity ent, ref ExaminedEvent args) + { + if (!args.IsInDetailsRange || !TryComp(ent, out var navMap)) + return; + + args.PushMarkup(Loc.GetString("nav-beacon-examine-text", + ("enabled", navMap.Enabled), + ("color", navMap.Color.ToHexNoAlpha()), + ("label", navMap.Text ?? string.Empty))); + } + #endregion #region: System messages