Add lobby sounds for leave, join and option change

This commit is contained in:
Matthias Mailänder
2023-06-14 19:10:52 +02:00
committed by Gustas
parent d217ab39c2
commit a1efb28f0b
8 changed files with 73 additions and 11 deletions

View File

@@ -51,6 +51,16 @@ namespace OpenRA
AddTextNotification(TextNotificationPool.Mission, SystemClientId, prefix, text, prefixColor);
}
public static void AddPlayerJoinedLine(string text)
{
AddTextNotification(TextNotificationPool.Join, SystemClientId, SystemMessageLabel, text);
}
public static void AddPlayerLeftLine(string text)
{
AddTextNotification(TextNotificationPool.Leave, SystemClientId, SystemMessageLabel, text);
}
public static void AddSystemLine(string text)
{
AddSystemLine(SystemMessageLabel, text);
@@ -86,11 +96,15 @@ namespace OpenRA
{
var filters = Game.Settings.Game.TextNotificationPoolFilters;
return pool == TextNotificationPool.Chat ||
pool == TextNotificationPool.System ||
pool == TextNotificationPool.Mission ||
(pool == TextNotificationPool.Transients && filters.HasFlag(TextNotificationPoolFilters.Transients)) ||
(pool == TextNotificationPool.Feedback && filters.HasFlag(TextNotificationPoolFilters.Feedback));
switch (pool)
{
case TextNotificationPool.Transients:
return filters.HasFlag(TextNotificationPoolFilters.Transients);
case TextNotificationPool.Feedback:
return filters.HasFlag(TextNotificationPoolFilters.Feedback);
default:
return true;
}
}
public static void Clear()