]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add map names to stuff (#21760)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 22 Nov 2023 04:35:37 +0000 (15:35 +1100)
committerGitHub <noreply@github.com>
Wed, 22 Nov 2023 04:35:37 +0000 (21:35 -0700)
- Station map
- FTL map

Content.Server/GameTicking/GameTicker.RoundFlow.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs
Content.Server/Shuttles/Systems/ShuttleSystem.cs

index 85f833bd1c3264111f6f49c60b3e188eeb934806..1d354136623a3f4d32712c6393ee736b0b4a94dd 100644 (file)
@@ -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));
 
index 87813e88b2ef5c670fa68c25e6d98565374bc40c..7ccadd949511bd964b6787f9976c76e9b3eb30b5 100644 (file)
@@ -213,7 +213,7 @@ public sealed partial class ShuttleSystem
 
         if (HasComp<FTLComponent>(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<FTLComponent>(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<ParallaxComponent>(_mapManager.GetMapEntityId(_hyperSpaceMap.Value));
         parallax.Parallax = "FastSpace";
index 4d53647c9e299dcc35418b2bb52e52c95782b8a7..854ce538dc7a057376750e8a846f1ac76a155054 100644 (file)
@@ -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);
index 41e4cbc2be92431bebd0f3d9c26e1ae0aaea17a8..2252d71d676ac4588c4903101e22b16705e372fe 100644 (file)
@@ -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();