public void ClearMatch() { foreach (TrackedPlayer player in GetPlayers()) { player.Score = 0; player.Kills = new List <KillEvent>(); player.ValidKills = new List <KillEvent>(); player.Deaths = new List <KillEvent>(); player.Exp = new List <ExpEvent>(); player.Streak = 0; player.Streaks = new List <int>(); player.Characters = new List <Character>(); player.Wins = 0; } _Players.Clear(); _MatchTicks = 0; SetState(MatchState.UNSTARTED); _MatchEvents.EmitTimerEvent(0); _MatchStart = DateTime.UtcNow; _MatchEnd = null; _AdminMessages.Clear(); _MatchMessages.Clear(); _AdminMessages.Log($"Match cleared at {DateTime.UtcNow}"); }
public void Clear(string which) { if (which.ToLower() == "admin") { _AdminMessages.Clear(); _Logger.LogInformation($"Cleared admin logs"); } else if (which.ToLower() == "match") { _MatchMessages.Clear(); _Logger.LogInformation($"Cleared match logs"); } else { _Logger.LogError($"Unknown message broadcast server '{which}'"); } }