From 2b6621c34e03e7a4426a3bcf9526ede808832a22 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 28 Mar 2024 01:53:18 -0400 Subject: [PATCH 1/6] Use nav beacon locations for announcements (#26437) * use nav beacon locations for announcements * :thumbs_up: --- Content.Server/Dragon/DragonRiftSystem.cs | 7 +-- Content.Server/Nuke/NukeSystem.cs | 15 +++--- Content.Server/Pinpointer/NavMapSystem.cs | 52 +++++++++++++------ .../Systems/EmergencyShuttleSystem.cs | 7 +-- 4 files changed, 48 insertions(+), 33 deletions(-) diff --git a/Content.Server/Dragon/DragonRiftSystem.cs b/Content.Server/Dragon/DragonRiftSystem.cs index 776aa841d85..d7e82374e03 100644 --- a/Content.Server/Dragon/DragonRiftSystem.cs +++ b/Content.Server/Dragon/DragonRiftSystem.cs @@ -72,9 +72,10 @@ public override void Update(float frameTime) comp.State = DragonRiftState.AlmostFinished; Dirty(comp); - var location = xform.LocalPosition; - _announcer.SendAnnouncement(_announcer.GetAnnouncementId("CarpRift"), Filter.Broadcast(), - "carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", location)); + var msg = Loc.GetString("carp-rift-warning", + ("location", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, xform))))); + _chat.DispatchGlobalAnnouncement(msg, playSound: false, colorOverride: Color.Red); + _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); _navMap.SetBeaconEnabled(uid, true); } diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index 2f62f9d6743..f5ac469ca9b 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -460,15 +460,12 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null) // We are collapsing the randomness here, otherwise we would get separate random song picks for checking duration and when actually playing the song afterwards _selectedNukeSong = _audio.GetSound(component.ArmMusic); - _announcer.SendAnnouncementMessage( - _announcer.GetAnnouncementId("NukeArm"), - "nuke-component-announcement-armed", - Loc.GetString("nuke-component-announcement-sender"), - Color.Red, - stationUid ?? uid, - null, - ("time", (int) component.RemainingTime), ("position", posText) - ); + // warn a crew + var announcement = Loc.GetString("nuke-component-announcement-armed", + ("time", (int) component.RemainingTime), + ("location", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, nukeXform))))); + var sender = Loc.GetString("nuke-component-announcement-sender"); + _chatSystem.DispatchStationAnnouncement(stationUid ?? uid, announcement, sender, false, null, Color.Red); _sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound)); _nukeSongLength = (float) _audio.GetAudioLength(_selectedNukeSong).TotalSeconds; diff --git a/Content.Server/Pinpointer/NavMapSystem.cs b/Content.Server/Pinpointer/NavMapSystem.cs index 5881daa0689..e61e39b24d8 100644 --- a/Content.Server/Pinpointer/NavMapSystem.cs +++ b/Content.Server/Pinpointer/NavMapSystem.cs @@ -1,3 +1,4 @@ +using System.Diagnostics.CodeAnalysis; using Content.Server.Administration.Logs; using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; @@ -7,8 +8,12 @@ using Content.Shared.Examine; using Content.Shared.Localizations; using Content.Shared.Maps; +using Content.Shared.Localizations; using Content.Shared.Pinpointer; +using Content.Shared.Tag; using JetBrains.Annotations; +using Robust.Server.GameObjects; +using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Timing; @@ -23,19 +28,17 @@ public sealed partial class NavMapSystem : SharedNavMapSystem { [Dependency] private readonly IAdminLogManager _adminLog = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; - [Dependency] private readonly SharedMapSystem _mapSystem = default!; - [Dependency] private readonly SharedTransformSystem _transformSystem = default!; + [Dependency] private readonly TagSystem _tags = default!; + [Dependency] private readonly MapSystem _map = default!; [Dependency] private readonly IMapManager _mapManager = default!; - [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!; + [Dependency] private readonly TransformSystem _transform = default!; + + private EntityQuery _physicsQuery; + private EntityQuery _tagQuery; public const float CloseDistance = 15f; public const float FarDistance = 30f; - private EntityQuery _airtightQuery; - private EntityQuery _gridQuery; - private EntityQuery _navQuery; - public override void Initialize() { base.Initialize(); @@ -57,8 +60,8 @@ public override void Initialize() SubscribeLocalEvent(OnAirtightChange); - // Beacon events SubscribeLocalEvent(OnNavMapBeaconMapInit); + SubscribeLocalEvent(OnNavMapBeaconStartup); SubscribeLocalEvent(OnNavMapBeaconAnchor); SubscribeLocalEvent(OnConfigureMessage); SubscribeLocalEvent(OnConfigurableMapInit); @@ -87,6 +90,27 @@ private void OnNavMapSplit(ref GridSplitEvent args) RefreshGrid(comp, _gridQuery.GetComponent(args.Grid)); } + private void OnNavMapBeaconMapInit(EntityUid uid, NavMapBeaconComponent component, MapInitEvent args) + { + if (component.DefaultText == null || component.Text != null) + return; + + component.Text = Loc.GetString(component.DefaultText); + Dirty(uid, component); + RefreshNavGrid(uid); + } + + private void OnNavMapBeaconStartup(EntityUid uid, NavMapBeaconComponent component, ComponentStartup args) + { + if (component.DefaultText == null || component.Text != null) + return; + + component.Text = Loc.GetString(component.DefaultText); + Dirty(uid, component); + + UpdateNavMapBeaconData(uid, component); + } + private NavMapChunk EnsureChunk(NavMapComponent component, Vector2i origin) { if (!component.Chunks.TryGetValue(origin, out var chunk)) @@ -377,7 +401,7 @@ public bool TryGetNearestBeacon(Entity ent, if (!Resolve(ent, ref ent.Comp)) return false; - return TryGetNearestBeacon(_transformSystem.GetMapCoordinates(ent, ent.Comp), out beacon, out beaconCoords); + return TryGetNearestBeacon(_transform.GetMapCoordinates(ent, ent.Comp), out beacon, out beaconCoords); } /// @@ -404,7 +428,7 @@ public bool TryGetNearestBeacon(MapCoordinates coordinates, if (coordinates.MapId != xform.MapID) continue; - var coords = _transformSystem.GetWorldPosition(xform); + var coords = _transform.GetWorldPosition(xform); var distanceSquared = (coordinates.Position - coords).LengthSquared(); if (!float.IsInfinity(minDistance) && distanceSquared >= minDistance) continue; @@ -423,7 +447,7 @@ public string GetNearestBeaconString(Entity ent) if (!Resolve(ent, ref ent.Comp)) return Loc.GetString("nav-beacon-pos-no-beacons"); - return GetNearestBeaconString(_transformSystem.GetMapCoordinates(ent, ent.Comp)); + return GetNearestBeaconString(_transform.GetMapCoordinates(ent, ent.Comp)); } public string GetNearestBeaconString(MapCoordinates coordinates) @@ -452,13 +476,11 @@ public string GetNearestBeaconString(MapCoordinates coordinates) ? Loc.GetString("nav-beacon-pos-format-direction-mod-far") : string.Empty; - // we can null suppress the text being null because TryGetNearestVisibleStationBeacon always gives us a beacon with not-null text. + // we can null suppress the text being null because TRyGetNearestVisibleStationBeacon always gives us a beacon with not-null text. return Loc.GetString("nav-beacon-pos-format-direction", ("modifier", modifier), ("direction", ContentLocalizationManager.FormatDirection(adjustedDir).ToLowerInvariant()), ("color", beacon.Value.Comp.Color), ("marker", beacon.Value.Comp.Text!)); } - - #endregion } diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index 90be263ae2e..e7bff4fda7a 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -320,12 +320,7 @@ public void CallEmergencyShuttle(EntityUid stationUid, StationEmergencyShuttleCo else { var location = FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((stationShuttle.EmergencyShuttle.Value, xform))); - _announcer.SendAnnouncementMessage( - _announcer.GetAnnouncementId("ShuttleNearby"), - "emergency-shuttle-nearby", - null, null, null, null, - ("direction", location) - ); + _chatSystem.DispatchStationAnnouncement(stationUid, Loc.GetString("emergency-shuttle-nearby", ("direction", location)), playDefaultSound: false); _logger.Add(LogType.EmergencyShuttle, LogImpact.High, $"Emergency shuttle {ToPrettyString(stationUid)} unable to find a valid docking port for {ToPrettyString(stationUid)}"); _announcer.SendAnnouncementAudio(_announcer.GetAnnouncementId("ShuttleNearby"), Filter.Broadcast()); From b0409d4b7c94d0e742a86dfc3281a52821397050 Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Fri, 8 Nov 2024 15:11:01 -0400 Subject: [PATCH 2/6] Fix beacon name --- .../Entities/Objects/Devices/station_beacon.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml index 28d6ddea691..233a8f2e004 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml @@ -322,7 +322,7 @@ suffix: MG's Room components: - type: NavMapBeacon - defaultText: station-beacon-mystagogue #Delta V - Renamed + defaultText: station-beacon-mystagogue #Delta V - Renamed - type: entity parent: DefaultStationBeaconScience @@ -354,7 +354,7 @@ suffix: Logistics #Delta V - Renamed components: - type: NavMapBeacon - defaultText: station-beacon-logistics #Delta V - Renamed + defaultText: station-beacon-supply color: "#A46106" - type: entity @@ -363,7 +363,7 @@ suffix: Logistics Reception #Delta V - Renamed components: - type: NavMapBeacon - defaultText: station-beacon-logistics-reception #Delta V - Renamed + defaultText: station-beacon-cargo - type: entity parent: DefaultStationBeaconSupply @@ -379,7 +379,7 @@ suffix: LO #Delta V - Renamed components: - type: NavMapBeacon - defaultText: station-beacon-lo #Delta V - Renamed + defaultText: station-beacon-qm - type: entity parent: DefaultStationBeaconSupply @@ -517,7 +517,7 @@ suffix: Janitor's Closet components: - type: NavMapBeacon - defaultText: station-beacon-janitor-closet #Delta V - Add for closet/outpost + defaultText: station-beacon-janitor - type: entity parent: DefaultStationBeacon From 810b57284eead5737894930f11bc61a62d61877d Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Fri, 8 Nov 2024 15:14:02 -0400 Subject: [PATCH 3/6] Revert to EE beacons --- .../Objects/Devices/station_beacon.yml | 612 ++---------------- 1 file changed, 70 insertions(+), 542 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml index 233a8f2e004..d04b3153f47 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml @@ -1,633 +1,161 @@ -- type: entity - parent: BaseItem - id: DefaultStationBeacon - name: station beacon - description: A small device that transmits information to station maps. Can be configured. - placement: - mode: SnapgridCenter - suffix: General - components: - - type: Sprite - sprite: Objects/Devices/station_beacon.rsi - drawdepth: BelowFloor - layers: - - state: blink - map: ["base"] - - type: Appearance - - type: GenericVisualizer - visuals: - enum.NavMapBeaconVisuals.Enabled: - base: - True: {state: blink} - False: {state: icon} - - type: ConfigurableNavMapBeacon - - type: NavMapBeacon - defaultText: station-beacon-general - color: "#D4D4D496" - #- type: WarpPoint # Delta V - Removes in favor of Warp Point Markers - - type: ActivatableUI - key: enum.NavMapBeaconUiKey.Key - singleUser: true - - type: UserInterface - interfaces: - enum.NavMapBeaconUiKey.Key: - type: NavMapBeaconBoundUserInterface - - type: Item - size: Small - - type: SubFloorHide - - type: Anchorable - - type: Construction - graph: StationBeaconPart - node: complete - - type: CollideOnAnchor - - type: Physics - canCollide: false - bodyType: static - - type: Transform - anchored: true - - type: Damageable - damageContainer: Inorganic - damageModifierSet: Metallic - - type: Destructible - thresholds: - - trigger: # for nukes - !type:DamageTrigger - damage: 200 - behaviors: - - !type:DoActsBehavior - acts: ["Destruction"] - - trigger: - !type:DamageTrigger - damage: 100 - behaviors: - - !type:PlaySoundBehavior - sound: - collection: MetalBreak - params: - volume: -8 - - !type:SpawnEntitiesBehavior - spawn: - SheetSteel1: - min: 1 - max: 1 - offset: 0 - - !type:DoActsBehavior - acts: ["Breakage"] - - type: StaticPrice - price: 25 - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconUnanchored - suffix: General, Unanchored - placement: - mode: PlaceFree - components: - - type: Sprite - sprite: Objects/Devices/station_beacon.rsi - layers: - - state: icon - map: ["base"] - - type: Physics - canCollide: true - bodyType: dynamic - - type: Transform - anchored: false - -- type: entity - parent: BaseItem - id: StationBeaconPart - name: station beacon flatpack - description: A flatpack used for constructing a station beacon. - components: - - type: Item - size: Small - sprite: Objects/Devices/station_beacon.rsi - - type: Sprite - sprite: Objects/Devices/station_beacon.rsi - state: assembly - - type: Construction - graph: StationBeaconPart - node: start - defaultTarget: complete - -# Prototypes for various default beacon configurations. -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconCommand - suffix: Command - components: - - type: NavMapBeacon - defaultText: station-beacon-command - color: "#FFFF00" - -- type: entity - parent: DefaultStationBeaconCommand - id: DefaultStationBeaconBridge - suffix: Bridge - components: - - type: NavMapBeacon - defaultText: station-beacon-bridge - -- type: entity - parent: DefaultStationBeaconCommand - id: DefaultStationBeaconVault - suffix: Vault - components: - - type: NavMapBeacon - defaultText: station-beacon-vault - -- type: entity - parent: DefaultStationBeaconCommand - id: DefaultStationBeaconCaptainsQuarters - suffix: Captain's Quarters - components: - - type: NavMapBeacon - defaultText: station-beacon-captain - +#Command - type: entity parent: DefaultStationBeaconCommand - id: DefaultStationBeaconHOPOffice - suffix: HOP's Office - components: - - type: NavMapBeacon - defaultText: station-beacon-hop - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconSecurity - suffix: Security - components: - - type: NavMapBeacon - defaultText: station-beacon-security - color: "#DE3A3A" - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconBrig - suffix: Brig - components: - - type: NavMapBeacon - defaultText: station-beacon-brig - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconWardensOffice - suffix: Warden's Office - components: - - type: NavMapBeacon - defaultText: station-beacon-warden - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconHOSRoom - suffix: HOS’s Room + id: DefaultStationBeaconConferenceRoom + suffix: Conference Room components: - type: NavMapBeacon - defaultText: station-beacon-hos - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconArmory - suffix: Armory - components: - - type: NavMapBeacon - defaultText: station-beacon-armory - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconPermaBrig - suffix: Perma Brig - components: - - type: NavMapBeacon - defaultText: station-beacon-perma-brig - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconDetectiveRoom - suffix: Detective's Room - components: - - type: NavMapBeacon - defaultText: station-beacon-detective - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconCourtroom - suffix: Courtroom - components: - - type: NavMapBeacon - defaultText: station-beacon-courtroom - -- type: entity - parent: DefaultStationBeaconService #Delta V - Lawer is Service until Justice Dept is a thing - id: DefaultStationBeaconLawOffice - suffix: Law Office - components: - - type: NavMapBeacon - defaultText: station-beacon-law - -- type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconSecurityCheckpoint - suffix: Sec Checkpoint - components: - - type: NavMapBeacon - defaultText: station-beacon-security-checkpoint - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconMedical - suffix: Medical - components: - - type: NavMapBeacon - defaultText: station-beacon-medical - color: "#52B4E9" - -- type: entity - parent: DefaultStationBeaconMedical - id: DefaultStationBeaconMedbay - suffix: Medbay - components: - - type: NavMapBeacon - defaultText: station-beacon-medbay + text: station-beacon-conference-room +#Medical - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconChemistry - suffix: Chemistry + id: DefaultStationBeaconVirology + suffix: Virology components: - type: NavMapBeacon - defaultText: station-beacon-chemistry + text: station-beacon-virology - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconCryonics - suffix: Cryonics + id: DefaultStationBeaconMetempsychosis + suffix: Cloning #Metempsychosis components: - type: NavMapBeacon - defaultText: station-beacon-cryonics + text: station-beacon-metempsychosis - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconCMORoom - suffix: CMO's room + id: DefaultStationBeaconExam + suffix: Exam components: - type: NavMapBeacon - defaultText: station-beacon-cmo + text: station-beacon-exam - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconMorgue - suffix: Morgue + id: DefaultStationBeaconMedicalOutpost + suffix: Medical Outpost components: - type: NavMapBeacon - defaultText: station-beacon-morgue + text: station-beacon-med-outpost - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconSurgery - suffix: Surgery + id: DefaultStationBeaconPsychologist + suffix: Psych components: - type: NavMapBeacon - defaultText: station-beacon-surgery - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconScience - suffix: Epistemics #Delta V - Renamed - components: - - type: NavMapBeacon - defaultText: station-beacon-epistemics #Delta V - Renamed - color: "#D381C9" - -- type: entity - parent: DefaultStationBeaconScience - id: DefaultStationBeaconRND - suffix: Research and Development - components: - - type: NavMapBeacon - defaultText: station-beacon-research-and-development - -- type: entity - parent: DefaultStationBeaconScience - id: DefaultStationBeaconServerRoom - suffix: Research Server Room - components: - - type: NavMapBeacon - defaultText: station-beacon-research-server + text: station-beacon-psych +#Epistemics - type: entity parent: DefaultStationBeaconScience - id: DefaultStationBeaconRDRoom - suffix: MG's Room + id: DefaultStationBeaconProber + suffix: Prober components: - type: NavMapBeacon - defaultText: station-beacon-mystagogue #Delta V - Renamed + text: station-beacon-glimmer-prober - type: entity parent: DefaultStationBeaconScience - id: DefaultStationBeaconRobotics - suffix: Robotics - components: - - type: NavMapBeacon - defaultText: station-beacon-robotics - -- type: entity - parent: DefaultStationBeaconScience - id: DefaultStationBeaconArtifactLab - suffix: Artifact Lab - components: - - type: NavMapBeacon - defaultText: station-beacon-artifact-lab - -- type: entity - parent: DefaultStationBeaconScience - id: DefaultStationBeaconAnomalyGenerator - suffix: Anomaly Generator - components: - - type: NavMapBeacon - defaultText: station-beacon-anomaly-gen - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconSupply - suffix: Logistics #Delta V - Renamed - components: - - type: NavMapBeacon - defaultText: station-beacon-supply - color: "#A46106" - -- type: entity - parent: DefaultStationBeaconSupply - id: DefaultStationBeaconCargoReception - suffix: Logistics Reception #Delta V - Renamed - components: - - type: NavMapBeacon - defaultText: station-beacon-cargo - -- type: entity - parent: DefaultStationBeaconSupply - id: DefaultStationBeaconCargoBay - suffix: Cargo Bay - components: - - type: NavMapBeacon - defaultText: station-beacon-cargo-bay - -- type: entity - parent: DefaultStationBeaconSupply - id: DefaultStationBeaconQMRoom - suffix: LO #Delta V - Renamed + id: DefaultStationBeaconMantis + suffix: Mantis components: - type: NavMapBeacon - defaultText: station-beacon-qm + text: station-beacon-forensic-mantis +#Logistics - type: entity parent: DefaultStationBeaconSupply - id: DefaultStationBeaconSalvage - suffix: Salvage - components: - - type: NavMapBeacon - defaultText: station-beacon-salvage - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconEngineering - suffix: Engineering - components: - - type: NavMapBeacon - defaultText: station-beacon-engineering - color: "#EFB341" - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconCERoom - suffix: CE's Room - components: - - type: NavMapBeacon - defaultText: station-beacon-ce - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconAME - suffix: AME - components: - - type: NavMapBeacon - defaultText: station-beacon-ame - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconSolars - suffix: Solars - components: - - type: NavMapBeacon - defaultText: station-beacon-solars - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconGravGen - suffix: Grav Gen - components: - - type: NavMapBeacon - defaultText: station-beacon-gravgen - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconSingularity - suffix: PA Control - components: - - type: NavMapBeacon - defaultText: station-beacon-pa - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconPowerBank - suffix: SMES Power Bank + id: DefaultStationBeaconMailroom + suffix: Mailroom components: - type: NavMapBeacon - defaultText: station-beacon-smes + text: station-beacon-mailroom +#Engineering - type: entity parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconTelecoms - suffix: Telecoms + id: DefaultStationBeaconEngiOutpost + suffix: Engi Outpost components: - type: NavMapBeacon - defaultText: station-beacon-telecoms - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconAtmospherics - suffix: Atmospherics - components: - - type: NavMapBeacon - defaultText: station-beacon-atmos - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconTEG - suffix: TEG - components: - - type: NavMapBeacon - defaultText: station-beacon-teg - -- type: entity - parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconTechVault - suffix: Tech Vault - components: - - type: NavMapBeacon - defaultText: station-beacon-tech-vault - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconService - suffix: Service - components: - - type: NavMapBeacon - defaultText: station-beacon-service - color: "#9FED58" - -- type: entity - parent: DefaultStationBeaconService - id: DefaultStationBeaconKitchen - suffix: Kitchen - components: - - type: NavMapBeacon - defaultText: station-beacon-kitchen - -- type: entity - parent: DefaultStationBeaconService - id: DefaultStationBeaconBar - suffix: Bar - components: - - type: NavMapBeacon - defaultText: station-beacon-bar + text: station-beacon-engi-outpost +#Service - type: entity parent: DefaultStationBeaconService - id: DefaultStationBeaconBotany - suffix: Botany + id: DefaultStationBeaconJanitorsOffice + suffix: Janitor's Office components: - type: NavMapBeacon - defaultText: station-beacon-botany + text: station-beacon-janitor-office - type: entity parent: DefaultStationBeaconService - id: DefaultStationBeaconJanitorsCloset - suffix: Janitor's Closet + id: DefaultStationBeaconReporter + suffix: Reporter components: - type: NavMapBeacon - defaultText: station-beacon-janitor - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconAI - suffix: AI - components: - - type: NavMapBeacon - defaultText: station-beacon-ai - color: "#2ed2fd" + text: station-beacon-reporter +#Surveilance - type: entity parent: DefaultStationBeaconAI - id: DefaultStationBeaconAISatellite - suffix: AI Satellite + id: DefaultStationBeaconCameraServerRoom + suffix: Camera Servers components: - type: NavMapBeacon - defaultText: station-beacon-ai-sat - -- type: entity - parent: DefaultStationBeaconAI - id: DefaultStationBeaconAICore - suffix: AI Core - components: - - type: NavMapBeacon - defaultText: station-beacon-ai-core - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconArrivals - suffix: Arrivals - components: - - type: NavMapBeacon - defaultText: station-beacon-arrivals + text: station-beacon-camera-servers +#General - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconEvac - suffix: Evac - components: - - type: NavMapBeacon - defaultText: station-beacon-evac - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconEVAStorage - suffix: EVA Storage - components: - - type: NavMapBeacon - defaultText: station-beacon-eva-storage - -- type: entity - parent: DefaultStationBeaconScience #Delta V - Chapel in Epi - id: DefaultStationBeaconChapel - suffix: Chapel + id: DefaultStationBeaconBoxing + suffix: Boxing Ring components: - type: NavMapBeacon - defaultText: station-beacon-chapel + text: station-beacon-boxing-ring - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconLibrary - suffix: Library + id: DefaultStationBeaconPark + suffix: Park components: - type: NavMapBeacon - defaultText: station-beacon-library + text: station-beacon-park +#Security - type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconTheater - suffix: Theater - components: - - type: NavMapBeacon - defaultText: station-beacon-theater - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconDorms - suffix: Dorms - components: - - type: NavMapBeacon - defaultText: station-beacon-dorms - -- type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconToolRoom - suffix: Tool Room + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconCorpsman + suffix: Corpsman components: - type: NavMapBeacon - defaultText: station-beacon-tools + text: station-beacon-corpsman +#Justice - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconDisposals - suffix: Disposals + id: DefaultStationBeaconJustice + suffix: Justice components: - type: NavMapBeacon - defaultText: station-beacon-disposals + text: station-beacon-justice - type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconCryosleep - suffix: Cryosleep + parent: DefaultStationBeaconJustice + id: DefaultStationBeaconChiefJustice + suffix: Chief Justice components: - type: NavMapBeacon - defaultText: station-beacon-cryosleep + text: station-beacon-chiefjustice - type: entity - parent: DefaultStationBeacon - id: DefaultStationBeaconEscapePod - suffix: Escape Pod + parent: DefaultStationBeaconJustice + id: DefaultStationBeaconProsecutor + suffix: Prosecutor components: - type: NavMapBeacon - defaultText: station-beacon-escape-pod + text: station-beacon-prosecutor \ No newline at end of file From 8d3ec95e7f522c8c87d5d383fdac7806521618ca Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Fri, 8 Nov 2024 15:21:39 -0400 Subject: [PATCH 4/6] wrong file lmao --- .../Objects/Devices/station_beacon.yml | 612 ++++++++++++++++-- 1 file changed, 542 insertions(+), 70 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml index d04b3153f47..f302d23a754 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml @@ -1,161 +1,633 @@ -#Command +- type: entity + parent: BaseItem + id: DefaultStationBeacon + name: station beacon + description: A small device that transmits information to station maps. Can be configured. + placement: + mode: SnapgridCenter + suffix: General + components: + - type: Sprite + sprite: Objects/Devices/station_beacon.rsi + drawdepth: BelowFloor + layers: + - state: blink + map: ["base"] + - type: Appearance + - type: GenericVisualizer + visuals: + enum.NavMapBeaconVisuals.Enabled: + base: + True: {state: blink} + False: {state: icon} + - type: ConfigurableNavMapBeacon + - type: NavMapBeacon + defaultText: station-beacon-general + color: "#D4D4D496" + #- type: WarpPoint # Delta V - Removes in favor of Warp Point Markers + - type: ActivatableUI + key: enum.NavMapBeaconUiKey.Key + singleUser: true + - type: UserInterface + interfaces: + enum.NavMapBeaconUiKey.Key: + type: NavMapBeaconBoundUserInterface + - type: Item + size: Small + - type: SubFloorHide + - type: Anchorable + - type: Construction + graph: StationBeaconPart + node: complete + - type: CollideOnAnchor + - type: Physics + canCollide: false + bodyType: static + - type: Transform + anchored: true + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: # for nukes + !type:DamageTrigger + damage: 200 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: MetalBreak + params: + volume: -8 + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 1 + offset: 0 + - !type:DoActsBehavior + acts: ["Breakage"] + - type: StaticPrice + price: 25 + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconUnanchored + suffix: General, Unanchored + placement: + mode: PlaceFree + components: + - type: Sprite + sprite: Objects/Devices/station_beacon.rsi + layers: + - state: icon + map: ["base"] + - type: Physics + canCollide: true + bodyType: dynamic + - type: Transform + anchored: false + +- type: entity + parent: BaseItem + id: StationBeaconPart + name: station beacon flatpack + description: A flatpack used for constructing a station beacon. + components: + - type: Item + size: Small + sprite: Objects/Devices/station_beacon.rsi + - type: Sprite + sprite: Objects/Devices/station_beacon.rsi + state: assembly + - type: Construction + graph: StationBeaconPart + node: start + defaultTarget: complete + +# Prototypes for various default beacon configurations. +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconCommand + suffix: Command + components: + - type: NavMapBeacon + defaultText: station-beacon-command + color: "#FFFF00" + +- type: entity + parent: DefaultStationBeaconCommand + id: DefaultStationBeaconBridge + suffix: Bridge + components: + - type: NavMapBeacon + defaultText: station-beacon-bridge + +- type: entity + parent: DefaultStationBeaconCommand + id: DefaultStationBeaconVault + suffix: Vault + components: + - type: NavMapBeacon + defaultText: station-beacon-vault + +- type: entity + parent: DefaultStationBeaconCommand + id: DefaultStationBeaconCaptainsQuarters + suffix: Captain's Quarters + components: + - type: NavMapBeacon + defaultText: station-beacon-captain + - type: entity parent: DefaultStationBeaconCommand - id: DefaultStationBeaconConferenceRoom - suffix: Conference Room + id: DefaultStationBeaconHOPOffice + suffix: HOP's Office + components: + - type: NavMapBeacon + defaultText: station-beacon-hop + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconSecurity + suffix: Security + components: + - type: NavMapBeacon + defaultText: station-beacon-security + color: "#DE3A3A" + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconBrig + suffix: Brig + components: + - type: NavMapBeacon + defaultText: station-beacon-brig + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconWardensOffice + suffix: Warden's Office + components: + - type: NavMapBeacon + defaultText: station-beacon-warden + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconHOSRoom + suffix: HOS’s Room components: - type: NavMapBeacon - text: station-beacon-conference-room + defaultText: station-beacon-hos + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconArmory + suffix: Armory + components: + - type: NavMapBeacon + defaultText: station-beacon-armory + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconPermaBrig + suffix: Perma Brig + components: + - type: NavMapBeacon + defaultText: station-beacon-perma-brig + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconDetectiveRoom + suffix: Detective's Room + components: + - type: NavMapBeacon + defaultText: station-beacon-detective + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconCourtroom + suffix: Courtroom + components: + - type: NavMapBeacon + defaultText: station-beacon-courtroom + +- type: entity + parent: DefaultStationBeaconService #Delta V - Lawer is Service until Justice Dept is a thing + id: DefaultStationBeaconLawOffice + suffix: Law Office + components: + - type: NavMapBeacon + defaultText: station-beacon-law + +- type: entity + parent: DefaultStationBeaconSecurity + id: DefaultStationBeaconSecurityCheckpoint + suffix: Sec Checkpoint + components: + - type: NavMapBeacon + defaultText: station-beacon-security-checkpoint + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconMedical + suffix: Medical + components: + - type: NavMapBeacon + defaultText: station-beacon-medical + color: "#52B4E9" + +- type: entity + parent: DefaultStationBeaconMedical + id: DefaultStationBeaconMedbay + suffix: Medbay + components: + - type: NavMapBeacon + defaultText: station-beacon-medbay -#Medical - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconVirology - suffix: Virology + id: DefaultStationBeaconChemistry + suffix: Chemistry components: - type: NavMapBeacon - text: station-beacon-virology + defaultText: station-beacon-chemistry - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconMetempsychosis - suffix: Cloning #Metempsychosis + id: DefaultStationBeaconCryonics + suffix: Cryonics components: - type: NavMapBeacon - text: station-beacon-metempsychosis + defaultText: station-beacon-cryonics - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconExam - suffix: Exam + id: DefaultStationBeaconCMORoom + suffix: CMO's room components: - type: NavMapBeacon - text: station-beacon-exam + defaultText: station-beacon-cmo - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconMedicalOutpost - suffix: Medical Outpost + id: DefaultStationBeaconMorgue + suffix: Morgue components: - type: NavMapBeacon - text: station-beacon-med-outpost + defaultText: station-beacon-morgue - type: entity parent: DefaultStationBeaconMedical - id: DefaultStationBeaconPsychologist - suffix: Psych + id: DefaultStationBeaconSurgery + suffix: Surgery components: - type: NavMapBeacon - text: station-beacon-psych + defaultText: station-beacon-surgery + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconScience + suffix: Epistemics #Delta V - Renamed + components: + - type: NavMapBeacon + defaultText: station-beacon-epistemics #Delta V - Renamed + color: "#D381C9" + +- type: entity + parent: DefaultStationBeaconScience + id: DefaultStationBeaconRND + suffix: Research and Development + components: + - type: NavMapBeacon + defaultText: station-beacon-research-and-development + +- type: entity + parent: DefaultStationBeaconScience + id: DefaultStationBeaconServerRoom + suffix: Research Server Room + components: + - type: NavMapBeacon + defaultText: station-beacon-research-server -#Epistemics - type: entity parent: DefaultStationBeaconScience - id: DefaultStationBeaconProber - suffix: Prober + id: DefaultStationBeaconRDRoom + suffix: MG's Room components: - type: NavMapBeacon - text: station-beacon-glimmer-prober + defaultText: station-beacon-mystagogue #Delta V - Renamed - type: entity parent: DefaultStationBeaconScience - id: DefaultStationBeaconMantis - suffix: Mantis + id: DefaultStationBeaconRobotics + suffix: Robotics + components: + - type: NavMapBeacon + defaultText: station-beacon-robotics + +- type: entity + parent: DefaultStationBeaconScience + id: DefaultStationBeaconArtifactLab + suffix: Artifact Lab + components: + - type: NavMapBeacon + defaultText: station-beacon-artifact-lab + +- type: entity + parent: DefaultStationBeaconScience + id: DefaultStationBeaconAnomalyGenerator + suffix: Anomaly Generator + components: + - type: NavMapBeacon + defaultText: station-beacon-anomaly-gen + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconSupply + suffix: Logistics #Delta V - Renamed + components: + - type: NavMapBeacon + defaultText: station-beacon-logistics #Delta V - Renamed + color: "#A46106" + +- type: entity + parent: DefaultStationBeaconSupply + id: DefaultStationBeaconCargoReception + suffix: Logistics Reception #Delta V - Renamed + components: + - type: NavMapBeacon + defaultText: station-beacon-logistics-reception #Delta V - Renamed + +- type: entity + parent: DefaultStationBeaconSupply + id: DefaultStationBeaconCargoBay + suffix: Cargo Bay + components: + - type: NavMapBeacon + defaultText: station-beacon-cargo-bay + +- type: entity + parent: DefaultStationBeaconSupply + id: DefaultStationBeaconQMRoom + suffix: LO #Delta V - Renamed components: - type: NavMapBeacon - text: station-beacon-forensic-mantis + defaultText: station-beacon-lo #Delta V - Renamed -#Logistics - type: entity parent: DefaultStationBeaconSupply - id: DefaultStationBeaconMailroom - suffix: Mailroom + id: DefaultStationBeaconSalvage + suffix: Salvage + components: + - type: NavMapBeacon + defaultText: station-beacon-salvage + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconEngineering + suffix: Engineering + components: + - type: NavMapBeacon + defaultText: station-beacon-engineering + color: "#EFB341" + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconCERoom + suffix: CE's Room + components: + - type: NavMapBeacon + defaultText: station-beacon-ce + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconAME + suffix: AME + components: + - type: NavMapBeacon + defaultText: station-beacon-ame + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconSolars + suffix: Solars + components: + - type: NavMapBeacon + defaultText: station-beacon-solars + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconGravGen + suffix: Grav Gen + components: + - type: NavMapBeacon + defaultText: station-beacon-gravgen + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconSingularity + suffix: PA Control + components: + - type: NavMapBeacon + defaultText: station-beacon-pa + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconPowerBank + suffix: SMES Power Bank components: - type: NavMapBeacon - text: station-beacon-mailroom + defaultText: station-beacon-smes -#Engineering - type: entity parent: DefaultStationBeaconEngineering - id: DefaultStationBeaconEngiOutpost - suffix: Engi Outpost + id: DefaultStationBeaconTelecoms + suffix: Telecoms components: - type: NavMapBeacon - text: station-beacon-engi-outpost + defaultText: station-beacon-telecoms + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconAtmospherics + suffix: Atmospherics + components: + - type: NavMapBeacon + defaultText: station-beacon-atmos + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconTEG + suffix: TEG + components: + - type: NavMapBeacon + defaultText: station-beacon-teg + +- type: entity + parent: DefaultStationBeaconEngineering + id: DefaultStationBeaconTechVault + suffix: Tech Vault + components: + - type: NavMapBeacon + defaultText: station-beacon-tech-vault + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconService + suffix: Service + components: + - type: NavMapBeacon + defaultText: station-beacon-service + color: "#9FED58" + +- type: entity + parent: DefaultStationBeaconService + id: DefaultStationBeaconKitchen + suffix: Kitchen + components: + - type: NavMapBeacon + defaultText: station-beacon-kitchen + +- type: entity + parent: DefaultStationBeaconService + id: DefaultStationBeaconBar + suffix: Bar + components: + - type: NavMapBeacon + defaultText: station-beacon-bar -#Service - type: entity parent: DefaultStationBeaconService - id: DefaultStationBeaconJanitorsOffice - suffix: Janitor's Office + id: DefaultStationBeaconBotany + suffix: Botany components: - type: NavMapBeacon - text: station-beacon-janitor-office + defaultText: station-beacon-botany - type: entity parent: DefaultStationBeaconService - id: DefaultStationBeaconReporter - suffix: Reporter + id: DefaultStationBeaconJanitorsCloset + suffix: Janitor's Closet components: - type: NavMapBeacon - text: station-beacon-reporter + defaultText: station-beacon-janitor-closet #Delta V - Add for closet/outpost + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconAI + suffix: AI + components: + - type: NavMapBeacon + defaultText: station-beacon-ai + color: "#2ed2fd" -#Surveilance - type: entity parent: DefaultStationBeaconAI - id: DefaultStationBeaconCameraServerRoom - suffix: Camera Servers + id: DefaultStationBeaconAISatellite + suffix: AI Satellite components: - type: NavMapBeacon - text: station-beacon-camera-servers + defaultText: station-beacon-ai-sat + +- type: entity + parent: DefaultStationBeaconAI + id: DefaultStationBeaconAICore + suffix: AI Core + components: + - type: NavMapBeacon + defaultText: station-beacon-ai-core -#General - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconBoxing - suffix: Boxing Ring + id: DefaultStationBeaconArrivals + suffix: Arrivals components: - type: NavMapBeacon - text: station-beacon-boxing-ring + defaultText: station-beacon-arrivals - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconPark - suffix: Park + id: DefaultStationBeaconEvac + suffix: Evac components: - type: NavMapBeacon - text: station-beacon-park + defaultText: station-beacon-evac -#Security - type: entity - parent: DefaultStationBeaconSecurity - id: DefaultStationBeaconCorpsman - suffix: Corpsman + parent: DefaultStationBeacon + id: DefaultStationBeaconEVAStorage + suffix: EVA Storage + components: + - type: NavMapBeacon + defaultText: station-beacon-eva-storage + +- type: entity + parent: DefaultStationBeaconScience #Delta V - Chapel in Epi + id: DefaultStationBeaconChapel + suffix: Chapel components: - type: NavMapBeacon - text: station-beacon-corpsman + defaultText: station-beacon-chapel -#Justice - type: entity parent: DefaultStationBeacon - id: DefaultStationBeaconJustice - suffix: Justice + id: DefaultStationBeaconLibrary + suffix: Library components: - type: NavMapBeacon - text: station-beacon-justice + defaultText: station-beacon-library - type: entity - parent: DefaultStationBeaconJustice - id: DefaultStationBeaconChiefJustice - suffix: Chief Justice + parent: DefaultStationBeacon + id: DefaultStationBeaconTheater + suffix: Theater components: - type: NavMapBeacon - text: station-beacon-chiefjustice + defaultText: station-beacon-theater - type: entity - parent: DefaultStationBeaconJustice - id: DefaultStationBeaconProsecutor - suffix: Prosecutor + parent: DefaultStationBeacon + id: DefaultStationBeaconDorms + suffix: Dorms + components: + - type: NavMapBeacon + defaultText: station-beacon-dorms + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconToolRoom + suffix: Tool Room + components: + - type: NavMapBeacon + defaultText: station-beacon-tools + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconDisposals + suffix: Disposals + components: + - type: NavMapBeacon + defaultText: station-beacon-disposals + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconCryosleep + suffix: Cryosleep + components: + - type: NavMapBeacon + defaultText: station-beacon-cryosleep + +- type: entity + parent: DefaultStationBeacon + id: DefaultStationBeaconEscapePod + suffix: Escape Pod components: - type: NavMapBeacon - text: station-beacon-prosecutor \ No newline at end of file + defaultText: station-beacon-escape-pod \ No newline at end of file From de74db48839f69f8ecab9855cbaf0c26e90cc647 Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Fri, 8 Nov 2024 15:51:26 -0400 Subject: [PATCH 5/6] Fix endregion issue. --- Content.Server/Pinpointer/NavMapSystem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Content.Server/Pinpointer/NavMapSystem.cs b/Content.Server/Pinpointer/NavMapSystem.cs index e61e39b24d8..fec76ac0469 100644 --- a/Content.Server/Pinpointer/NavMapSystem.cs +++ b/Content.Server/Pinpointer/NavMapSystem.cs @@ -484,3 +484,5 @@ public string GetNearestBeaconString(MapCoordinates coordinates) ("marker", beacon.Value.Comp.Text!)); } } + +#endregion \ No newline at end of file From 758ec9430e981d95ab2b9bd125d897e7758dd855 Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Fri, 8 Nov 2024 16:04:39 -0400 Subject: [PATCH 6/6] Magically fix the errors (we only need the message changes) --- Content.Server/Dragon/DragonRiftSystem.cs | 3 +-- Content.Server/Nuke/NukeSystem.cs | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Content.Server/Dragon/DragonRiftSystem.cs b/Content.Server/Dragon/DragonRiftSystem.cs index 776aa841d85..ae358f33e5b 100644 --- a/Content.Server/Dragon/DragonRiftSystem.cs +++ b/Content.Server/Dragon/DragonRiftSystem.cs @@ -72,9 +72,8 @@ public override void Update(float frameTime) comp.State = DragonRiftState.AlmostFinished; Dirty(comp); - var location = xform.LocalPosition; _announcer.SendAnnouncement(_announcer.GetAnnouncementId("CarpRift"), Filter.Broadcast(), - "carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", location)); + "carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, xform))))); _navMap.SetBeaconEnabled(uid, true); } diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index 2f62f9d6743..5b62a84a076 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -452,11 +452,6 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null) if (stationUid != null) _alertLevel.SetLevel(stationUid.Value, component.AlertLevelOnActivate, true, true, true, true); - var pos = nukeXform.MapPosition; - var x = (int) pos.X; - var y = (int) pos.Y; - var posText = $"({x}, {y})"; - // We are collapsing the randomness here, otherwise we would get separate random song picks for checking duration and when actually playing the song afterwards _selectedNukeSong = _audio.GetSound(component.ArmMusic); @@ -467,7 +462,7 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null) Color.Red, stationUid ?? uid, null, - ("time", (int) component.RemainingTime), ("position", posText) + ("time", (int) component.RemainingTime), ("position", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, nukeXform)))) ); _sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));