Add per player mutes

This commit is contained in:
Gustas
2022-08-10 12:58:59 +03:00
committed by teinarss
parent 81da717f19
commit ce254f8b46
12 changed files with 193 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ namespace OpenRA.Network
readonly Dictionary<int, (int SyncHash, ulong DefeatState)> syncForFrame = new Dictionary<int, (int, ulong)>();
public Session LobbyInfo = new Session();
/// <summary> Null when watching a replay </summary>
public Session.Client LocalClient => LobbyInfo.ClientWithIndex(Connection.LocalClientId);
public World World;
public int OrderQueueLength => pendingOrders.Count > 0 ? pendingOrders.Min(q => q.Value.Count) : 0;

View File

@@ -21,6 +21,8 @@ namespace OpenRA
static readonly string SystemMessageLabel;
public static long ChatDisabledUntil { get; internal set; }
public static readonly Dictionary<int, bool> MutedPlayers = new Dictionary<int, bool>();
static readonly List<TextNotification> NotificationsCache = new List<TextNotification>();
public static IReadOnlyList<TextNotification> Notifications => NotificationsCache;
@@ -94,6 +96,7 @@ namespace OpenRA
public static void Clear()
{
NotificationsCache.Clear();
MutedPlayers.Clear();
}
}
}