]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix replayghost spawning location (#30252)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Mon, 22 Jul 2024 19:32:30 +0000 (21:32 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 19:32:30 +0000 (20:32 +0100)
Fix replayghost spawn

18 files changed:
Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs
Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs
Content.IntegrationTests/Tests/PostMapInitTest.cs
Content.Server/Administration/Logs/Converters/EntityCoordinatesConverter.cs
Content.Server/Light/EntitySystems/EmergencyLightSystem.cs
Content.Server/Power/EntitySystems/PowerMonitoringConsoleSystem.cs
Content.Server/Respawn/SpecialRespawnSystem.cs
Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs
Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs
Content.Server/Station/Systems/StationSystem.cs
Content.Server/StationEvents/Events/BluespaceLockerRule.cs
Content.Server/StationEvents/Events/BreakerFlipRule.cs
Content.Server/StationEvents/Events/IonStormRule.cs
Content.Server/StationEvents/Events/PowerGridCheckRule.cs
Content.Server/StationEvents/Events/VentClogRule.cs
Content.Server/StationEvents/Events/VentCrittersRule.cs
Content.Server/Storage/EntitySystems/BluespaceLockerSystem.cs
Content.Shared/Station/Components/StationMemberComponent.cs [moved from Content.Server/Station/Components/StationMemberComponent.cs with 69% similarity]

index d00e319eed91c3fba223f7b662ee404323337706..801a3f8fdfb667f52e468bffec9ea346ce17c714 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Shared.Movement.Components;
+using Content.Shared.Station.Components;
 using Robust.Shared.GameStates;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
@@ -164,14 +165,25 @@ public sealed partial class ReplaySpectatorSystem
         float? maxSize = null;
         var gridQuery = EntityQueryEnumerator<MapGridComponent>();
 
+        var stationFound = false;
         while (gridQuery.MoveNext(out var uid, out var grid))
         {
             var size = grid.LocalAABB.Size.LengthSquared();
-            if (maxSize == null || size > maxSize)
-            {
-                maxUid = (uid, grid);
-                maxSize = size;
-            }
+
+            if (maxSize is not null && size < maxSize)
+                continue;
+
+            var station = HasComp<StationMemberComponent>(uid);
+
+            if (!station && stationFound)
+               continue;
+
+            maxUid = (uid, grid);
+            maxSize = size;
+
+            if (station)
+                stationFound = true;
+
         }
 
         coords = new EntityCoordinates(maxUid ?? default, default);
index cc5d99e8b2f599a11bcaac3b3fba010d65128053..0ccb5e314b98b764a6897f7b1441a00b7edf0306 100644 (file)
@@ -18,6 +18,7 @@ using Content.Shared.Hands.Components;
 using Content.Shared.Inventory;
 using Content.Shared.NPC.Systems;
 using Content.Shared.NukeOps;
+using Content.Shared.Station.Components;
 using Robust.Server.GameObjects;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Map.Components;
index d1997c68baf3f82535efd108c0eec24189fd0e77..f991eabdbd5a4a457a7cc13eee1ff4cf4ff95367 100644 (file)
@@ -16,6 +16,7 @@ using Robust.Shared.GameObjects;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Prototypes;
+using Content.Shared.Station.Components;
 using Robust.Shared.Utility;
 using YamlDotNet.RepresentationModel;
 
index 0384e069561d86b7c156a4f3b57555226389d24e..3de5d98a81a8e69296acba88b529e2dacf95d689 100644 (file)
@@ -1,5 +1,5 @@
 using System.Text.Json;
-using Content.Server.Station.Components;
+using Content.Shared.Station.Components;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 
index 156088ea072ea8285927c251efaa03e1d7b7b641..b6810aa33be6041d0c945d5ff0b6b199aef73036 100644 (file)
@@ -3,11 +3,11 @@ using Content.Server.Audio;
 using Content.Server.Light.Components;
 using Content.Server.Power.Components;
 using Content.Server.Power.EntitySystems;
-using Content.Server.Station.Components;
 using Content.Server.Station.Systems;
 using Content.Shared.Examine;
 using Content.Shared.Light;
 using Content.Shared.Light.Components;
+using Content.Shared.Station.Components;
 using Robust.Server.GameObjects;
 using Color = Robust.Shared.Maths.Color;
 
index 35b17dc9584984d1f5063c25d6433bedebcc553f..a07d590461eaaaa36fd57b802c069ad19814b41d 100644 (file)
@@ -4,10 +4,10 @@ using Content.Server.NodeContainer.Nodes;
 using Content.Server.Power.Components;
 using Content.Server.Power.Nodes;
 using Content.Server.Power.NodeGroups;
-using Content.Server.Station.Components;
 using Content.Server.StationEvents.Components;
 using Content.Shared.GameTicking.Components;
 using Content.Shared.Pinpointer;
+using Content.Shared.Station.Components;
 using Content.Shared.Power;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
index 6c7bb5c92349ed7f5508db9a16a8557c181c8d51..bdaa4a40bc10cbde683ba2debefbf6093dc681f1 100644 (file)
@@ -2,7 +2,7 @@
 using Content.Server.Atmos.EntitySystems;
 using Content.Server.Chat.Managers;
 using Content.Server.GameTicking;
-using Content.Server.Station.Components;
+using Content.Shared.Station.Components;
 using Content.Server.Station.Systems;
 using Content.Shared.Database;
 using Content.Shared.Maps;
index 3af461bedac924fb502164aac1c11c41390d562c..eb5e11b8ebeb781c58191eb94bd5a245a210015b 100644 (file)
@@ -1,6 +1,6 @@
 using Content.Server.Shuttles.Components;
 using Content.Server.Shuttles.Events;
-using Content.Server.Station.Components;
+using Content.Shared.Station.Components;
 using Content.Shared.UserInterface;
 
 namespace Content.Server.Shuttles.Systems;
index b4fcccd80557c5059c64ed321d85f5f715d1e444..0976bc5de1c4c6ce673a2f901bb76d6cd6f75d7e 100644 (file)
@@ -7,6 +7,7 @@ using Content.Shared.CCVar;
 using Content.Shared.Procedural;
 using Content.Shared.Salvage;
 using Content.Shared.Shuttles.Components;
+using Content.Shared.Station.Components;
 using Robust.Shared.Collections;
 using Robust.Shared.Map;
 using Robust.Shared.Random;
index 5930eef39bda1419d468025ec321e7977cbe5ad2..5ddb0e7746bf570511266172508f8e112098d6a4 100644 (file)
@@ -5,6 +5,7 @@ using Content.Server.Station.Components;
 using Content.Server.Station.Events;
 using Content.Shared.CCVar;
 using Content.Shared.Station;
+using Content.Shared.Station.Components;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
index b19485bc31ee6d09d6e9343f6a1371214a26b959..0dd4e9247706f4f5642f800e68f0fb354745ebe2 100644 (file)
@@ -1,10 +1,9 @@
-using Content.Server.GameTicking.Rules.Components;
 using Content.Server.Resist;
-using Content.Server.Station.Components;
 using Content.Server.StationEvents.Components;
 using Content.Server.Storage.Components;
 using Content.Server.Storage.EntitySystems;
 using Content.Shared.Access.Components;
+using Content.Shared.Station.Components;
 using Content.Shared.GameTicking.Components;
 using Content.Shared.Coordinates;
 
index 0cfe87051d5eb0f575886540fbecaa556356ab3a..8a25d40abbc27c968d34ddc45ac79ee7ee36ae06 100644 (file)
@@ -1,8 +1,8 @@
 using Content.Server.Power.Components;
 using Content.Server.Power.EntitySystems;
-using Content.Server.Station.Components;
 using Content.Server.StationEvents.Components;
-using Content.Shared.GameTicking.Components;
+using Content.Shared.GameTicking.Components;
+using Content.Shared.Station.Components;
 using JetBrains.Annotations;
 
 namespace Content.Server.StationEvents.Events;
index 926ecc2db921290cd6909c7bbc8e6a92500a26e9..b20b81822f32f30aff6bb81bdeac6f0bb74aa053 100644 (file)
@@ -1,6 +1,5 @@
 using System.Linq;
 using Content.Server.Silicons.Laws;
-using Content.Server.Station.Components;
 using Content.Server.StationEvents.Components;
 using Content.Shared.Administration.Logs;
 using Content.Shared.Database;
@@ -11,6 +10,7 @@ using Content.Shared.Random;
 using Content.Shared.Random.Helpers;
 using Content.Shared.Silicons.Laws;
 using Content.Shared.Silicons.Laws.Components;
+using Content.Shared.Station.Components;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 
index e00369a321c9ffc0f7a19ef7cbbefaaadca61eca..a4594e1387966d2bd92b73d20e76c48e1cb652a0 100644 (file)
@@ -1,10 +1,9 @@
 using System.Threading;
-using Content.Server.GameTicking.Rules.Components;
 using Content.Server.Power.Components;
 using Content.Server.Power.EntitySystems;
-using Content.Server.Station.Components;
 using Content.Server.StationEvents.Components;
 using Content.Shared.GameTicking.Components;
+using Content.Shared.Station.Components;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
index 043ea0375aaa6e52b6e504b7b46fc7a2d3e8f491..f14958631d1c964bb35a811a4cf61d64142dd25c 100644 (file)
@@ -1,14 +1,13 @@
 using Content.Server.Atmos.Piping.Unary.Components;
-using Content.Server.Station.Components;
+using Content.Server.Fluids.EntitySystems;
+using Content.Server.StationEvents.Components;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.Reagent;
+using Content.Shared.GameTicking.Components;
+using Content.Shared.Station.Components;
 using JetBrains.Annotations;
 using Robust.Shared.Random;
 using System.Linq;
-using Content.Server.Fluids.EntitySystems;
-using Content.Server.GameTicking.Rules.Components;
-using Content.Server.StationEvents.Components;
-using Content.Shared.GameTicking.Components;
 
 namespace Content.Server.StationEvents.Events;
 
index fba9cfa6a60effba81b94818741059557e65e7f6..5ca5a9d215c21b570941f3f5bf36a83be76fa598 100644 (file)
@@ -1,7 +1,6 @@
 using Content.Server.StationEvents.Components;
-using Content.Server.GameTicking.Rules.Components;
-using Content.Server.Station.Components;
 using Content.Shared.GameTicking.Components;
+using Content.Shared.Station.Components;
 using Content.Shared.Storage;
 using Robust.Shared.Map;
 using Robust.Shared.Random;
index 9da7606bcc58dea54bd7bf0fca2f7c8032ba3c1a..3754919c689764036b210966e6fcd8a8a96543c1 100644 (file)
@@ -1,7 +1,6 @@
 using System.Linq;
 using Content.Server.Explosion.EntitySystems;
 using Content.Server.Resist;
-using Content.Server.Station.Components;
 using Content.Server.Storage.Components;
 using Content.Shared.Access;
 using Content.Shared.Access.Components;
@@ -9,6 +8,7 @@ using Content.Shared.Coordinates;
 using Content.Shared.DoAfter;
 using Content.Shared.Lock;
 using Content.Shared.Mind.Components;
+using Content.Shared.Station.Components;
 using Content.Shared.Storage.Components;
 using Content.Shared.Storage.EntitySystems;
 using Content.Shared.Tools.Systems;
similarity index 69%
rename from Content.Server/Station/Components/StationMemberComponent.cs
rename to Content.Shared/Station/Components/StationMemberComponent.cs
index 2100c20c55d338d79fba8a89e2975f878d05c1f3..ce5d95ad0d2cc45600e8414c0948c43d0880cf98 100644 (file)
@@ -1,11 +1,11 @@
-using Content.Server.Station.Systems;
+using Robust.Shared.GameStates;
 
-namespace Content.Server.Station.Components;
+namespace Content.Shared.Station.Components;
 
 /// <summary>
 /// Indicates that a grid is a member of the given station.
 /// </summary>
-[RegisterComponent, Access(typeof(StationSystem))]
+[RegisterComponent, NetworkedComponent]
 public sealed partial class StationMemberComponent : Component
 {
     /// <summary>