Use round time instead of server time for criminal history (#26949)

make criminal records computer use round time for history instead of the server time

(cherry picked from commit fbec5d18cf175d9418fed77fcb38b673692771c6)
This commit is contained in:
ilya.mikheev.coder 2024-04-14 15:33:04 +02:00 committed by NullWanderer
parent 6d03b821a6
commit 9d48c01543
No known key found for this signature in database
GPG Key ID: 212F05528FD678BE
1 changed files with 3 additions and 3 deletions

View 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);
}