]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix ruins being added to station grid (#23865)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 10 Jan 2024 12:44:09 +0000 (23:44 +1100)
committerGitHub <noreply@github.com>
Wed, 10 Jan 2024 12:44:09 +0000 (23:44 +1100)
Content.Server/Shuttles/Components/GridSpawnComponent.cs
Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs
Resources/Prototypes/Entities/Stations/base.yml

index 86874541df22743548cc0f323e30bf9d77e6f54c..95338927ca97c90ca8d8532c4ee08ea07744fb8e 100644 (file)
@@ -33,6 +33,11 @@ public record struct GridSpawnGroup
     /// </summary>
     public bool NameGrid = false;
 
+    /// <summary>
+    /// Should we add this to the station's grids (if possible / relevant).
+    /// </summary>
+    public bool StationGrid = true;
+
     public GridSpawnGroup()
     {
     }
index 5452a0bb9dc770380c4bf552201860ef3e577e57..5276046a275f537ccda725a641bd9d0b404e9fe6 100644 (file)
@@ -88,6 +88,15 @@ public sealed partial class ShuttleSystem
 
                 if (_loader.TryLoad(mapId, path.ToString(), out var ent) && ent.Count == 1)
                 {
+                    if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
+                    {
+                        TryFTLProximity(ent[0], shuttle, targetGrid.Value);
+                    }
+                    else
+                    {
+                        valid = false;
+                    }
+
                     if (group.Hide)
                     {
                         var iffComp = EnsureComp<IFFComponent>(ent[0]);
@@ -95,15 +104,10 @@ public sealed partial class ShuttleSystem
                         Dirty(ent[0], iffComp);
                     }
 
-                    if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
+                    if (group.StationGrid)
                     {
-                        TryFTLProximity(ent[0], shuttle, targetGrid.Value);
                         _station.AddGridToStation(uid, ent[0]);
                     }
-                    else
-                    {
-                        valid = false;
-                    }
 
                     if (group.NameGrid)
                     {
index 4871ae50f18f36d775856571335a2b363795c449..8c78775ba58925be6cf411db6b3f7f72ed04a81d 100644 (file)
@@ -56,6 +56,7 @@
           nameGrid: true
           minCount: 2
           maxCount: 2
+          stationGrid: false
           paths:
           - /Maps/Ruins/derelict.yml
           - /Maps/Ruins/djstation.yml
@@ -83,6 +84,7 @@
           nameGrid: true
           minCount: 2
           maxCount: 2
+          stationGrid: false
           paths:
           - /Maps/Ruins/derelict.yml
           - /Maps/Ruins/djstation.yml