]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use round time instead of server time for criminal history (#26949)
authorilya.mikheev.coder <imc-ext+github@ilyamikcoder.com>
Sun, 14 Apr 2024 13:33:04 +0000 (15:33 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2024 13:33:04 +0000 (23:33 +1000)
make criminal records computer use round time for history instead of the server time

Content.Server/CriminalRecords/Systems/CriminalRecordsSystem.cs

index efec18485c223bfe71cb39afa0ad272ef130fad8..9ffe94448674647a9cf33ad2ca06fcea6ff65a69 100644 (file)
@@ -3,7 +3,7 @@ using Content.Server.StationRecords.Systems;
 using Content.Shared.CriminalRecords;
 using Content.Shared.Security;
 using Content.Shared.StationRecords;
-using Robust.Shared.Timing;
+using Content.Server.GameTicking;
 
 namespace Content.Server.CriminalRecords.Systems;
 
@@ -17,7 +17,7 @@ namespace Content.Server.CriminalRecords.Systems;
 /// </summary>
 public sealed class CriminalRecordsSystem : EntitySystem
 {
-    [Dependency] private readonly IGameTiming _timing = default!;
+    [Dependency] private readonly GameTicker _ticker = default!;
     [Dependency] private readonly StationRecordsSystem _stationRecords = default!;
 
     public override void Initialize()
@@ -71,7 +71,7 @@ public sealed class CriminalRecordsSystem : EntitySystem
     /// </summary>
     public bool TryAddHistory(StationRecordKey key, string line)
     {
-        var entry = new CrimeHistory(_timing.CurTime, line);
+        var entry = new CrimeHistory(_ticker.RoundDuration(), line);
         return TryAddHistory(key, entry);
     }