Admin Log Browser Improvements (#39130)

This commit is contained in:
Southbridge
2025-08-21 16:12:16 -04:00
committed by GitHub
parent 002d9272e6
commit f67cebf7a4
27 changed files with 4608 additions and 77 deletions

View File

@@ -87,6 +87,7 @@ public sealed partial class AdminLogManager : SharedAdminLogManager, IAdminLogMa
// Per round
private int _currentRoundId;
private int _currentLogId;
private TimeSpan _currentRoundStartTime;
private int NextLogId => Interlocked.Increment(ref _currentLogId);
private GameRunLevel _runLevel = GameRunLevel.PreRoundLobby;
@@ -260,6 +261,7 @@ public sealed partial class AdminLogManager : SharedAdminLogManager, IAdminLogMa
public void RoundStarting(int id)
{
_currentRoundStartTime = _timing.CurTime;
_currentRoundId = id;
CacheNewRound();
}
@@ -316,6 +318,7 @@ public sealed partial class AdminLogManager : SharedAdminLogManager, IAdminLogMa
Type = type,
Impact = impact,
Date = DateTime.UtcNow,
CurTime = (_timing.CurTime - _currentRoundStartTime).Ticks,
Message = message,
Json = json,
Players = new List<AdminLogPlayer>(players.Count)