]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Move GameTicker.RoundDuration to Shared (#29425)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Sat, 29 Jun 2024 02:42:58 +0000 (19:42 -0700)
committerGitHub <noreply@github.com>
Sat, 29 Jun 2024 02:42:58 +0000 (22:42 -0400)
Content.Server/GameTicking/GameTicker.RoundFlow.cs
Content.Shared/GameTicking/SharedGameTicker.cs

index d67b8d96e356dd2541f4279bc26599f91be921c9..c957e0eb96f40469ad00b18f86a499002d6c5ece 100644 (file)
@@ -622,11 +622,6 @@ namespace Content.Server.GameTicking
             }
         }
 
-        public TimeSpan RoundDuration()
-        {
-            return _gameTiming.CurTime.Subtract(RoundStartTimeSpan);
-        }
-
         private void AnnounceRound()
         {
             if (CurrentPreset == null) return;
index 308476baa8d6d283cb1f58bb402a91d035733740..5126a6bdc4956ff39fecafa243cfd484f97507aa 100644 (file)
@@ -5,12 +5,14 @@ using Robust.Shared.Replays;
 using Robust.Shared.Serialization;
 using Robust.Shared.Serialization.Markdown.Mapping;
 using Robust.Shared.Serialization.Markdown.Value;
+using Robust.Shared.Timing;
 
 namespace Content.Shared.GameTicking
 {
     public abstract class SharedGameTicker : EntitySystem
     {
         [Dependency] private readonly IReplayRecordingManager _replay = default!;
+        [Dependency] private readonly IGameTiming _gameTiming = default!;
 
         // See ideally these would be pulled from the job definition or something.
         // But this is easier, and at least it isn't hardcoded.
@@ -41,6 +43,11 @@ namespace Content.Shared.GameTicking
         {
             metadata["roundId"] = new ValueDataNode(RoundId.ToString());
         }
+
+        public TimeSpan RoundDuration()
+        {
+            return _gameTiming.CurTime.Subtract(RoundStartTimeSpan);
+        }
     }
 
     [Serializable, NetSerializable]