Update TextNotificationsManager to use Ui.Send

This commit is contained in:
tomas
2022-07-12 17:46:20 +02:00
committed by Gustas
parent b0329aad35
commit 5f4ed5f16b
6 changed files with 25 additions and 55 deletions

View File

@@ -51,10 +51,6 @@ namespace OpenRA.Network
readonly List<ClientOrder> processClientOrders = new List<ClientOrder>();
readonly List<int> processClientsToRemove = new List<int>();
readonly List<TextNotification> notificationsCache = new List<TextNotification>();
public IReadOnlyList<TextNotification> NotificationsCache => notificationsCache;
bool disposed;
bool generateSyncReport = false;
int sentOrdersFrame = 0;
@@ -108,7 +104,6 @@ namespace OpenRA.Network
{
Connection = conn;
syncReport = new SyncReport(this);
AddTextNotification += CacheTextNotification;
LastTickTime = new TickTime(() => SuggestedTimestep, Game.RunTime);
}
@@ -127,12 +122,6 @@ namespace OpenRA.Network
localOrders.Add(order);
}
public Action<TextNotification> AddTextNotification = (notification) => { };
void CacheTextNotification(TextNotification notification)
{
notificationsCache.Add(notification);
}
void SendImmediateOrders()
{
if (localImmediateOrders.Count != 0 && GameSaveLastFrame < NetFrameNumber)