From ee3e3583bd6adcf9b255515cbf149c9cceca74b5 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:35:37 +1100 Subject: [PATCH] Add map names to stuff (#21760) - Station map - FTL map --- Content.Server/GameTicking/GameTicker.RoundFlow.cs | 2 ++ .../Shuttles/Systems/ShuttleSystem.FasterThanLight.cs | 7 ++++--- Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs | 4 ++-- Content.Server/Shuttles/Systems/ShuttleSystem.cs | 4 +--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 85f833bd1c..1d35413662 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -163,6 +163,8 @@ namespace Content.Server.GameTicking var gridIds = _map.LoadMap(targetMapId, ev.GameMap.MapPath.ToString(), ev.Options); + _metaData.SetEntityName(_mapManager.GetMapEntityId(targetMapId), "Station map"); + var gridUids = gridIds.ToList(); RaiseLocalEvent(new PostGameMapLoad(map, targetMapId, gridUids, stationName)); diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 87813e88b2..7ccadd9495 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -213,7 +213,7 @@ public sealed partial class ShuttleSystem if (HasComp(uid)) { - _sawmill.Warning($"Tried queuing {ToPrettyString(uid)} which already has HyperspaceComponent?"); + Log.Warning($"Tried queuing {ToPrettyString(uid)} which already has HyperspaceComponent?"); return false; } @@ -404,7 +404,7 @@ public sealed partial class ShuttleSystem _console.RefreshShuttleConsoles(uid); break; default: - _sawmill.Error($"Found invalid FTL state {comp.State} for {uid}"); + Log.Error($"Found invalid FTL state {comp.State} for {uid}"); RemComp(uid); break; } @@ -453,7 +453,8 @@ public sealed partial class ShuttleSystem return; _hyperSpaceMap = _mapManager.CreateMap(); - _sawmill.Info($"Setup hyperspace map at {_hyperSpaceMap.Value}"); + _metadata.SetEntityName(_mapManager.GetMapEntityId(_hyperSpaceMap.Value), "FTL"); + Log.Debug($"Setup hyperspace map at {_hyperSpaceMap.Value}"); DebugTools.Assert(!_mapManager.IsMapPaused(_hyperSpaceMap.Value)); var parallax = EnsureComp(_mapManager.GetMapEntityId(_hyperSpaceMap.Value)); parallax.Parallax = "FastSpace"; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs index 4d53647c9e..854ce538dc 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs @@ -80,7 +80,7 @@ public sealed partial class ShuttleSystem if (!valid) { - _sawmill.Error($"Error loading gridspawn for {ToPrettyString(uid)} / {path}"); + Log.Error($"Error loading gridspawn for {ToPrettyString(uid)} / {path}"); } } @@ -129,7 +129,7 @@ public sealed partial class ShuttleSystem if (!valid) { - _sawmill.Error($"Error loading gridfill dock for {ToPrettyString(uid)} / {component.Path}"); + Log.Error($"Error loading gridfill dock for {ToPrettyString(uid)} / {component.Path}"); } _mapManager.DeleteMap(mapId); diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.cs index 41e4cbc2be..2252d71d67 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.cs @@ -33,6 +33,7 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem [Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly FixtureSystem _fixtures = default!; [Dependency] private readonly MapLoaderSystem _loader = default!; + [Dependency] private readonly MetaDataSystem _metadata = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; @@ -43,14 +44,11 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem [Dependency] private readonly ThrusterSystem _thruster = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; - private ISawmill _sawmill = default!; - public const float TileMassMultiplier = 0.5f; public override void Initialize() { base.Initialize(); - _sawmill = Logger.GetSawmill("shuttles"); InitializeFTL(); InitializeGridFills();