Add lobby sounds for leave, join and option change
This commit is contained in:
committed by
Gustas
parent
d217ab39c2
commit
a1efb28f0b
@@ -20,6 +20,12 @@ namespace OpenRA.Network
|
||||
{
|
||||
public const int ChatMessageMaxLength = 2500;
|
||||
|
||||
[TranslationReference("player")]
|
||||
const string Joined = "notification-joined";
|
||||
|
||||
[TranslationReference("player")]
|
||||
const string Left = "notification-lobby-disconnected";
|
||||
|
||||
static Player FindPlayerByClient(this World world, Session.Client c)
|
||||
{
|
||||
return world.Players.FirstOrDefault(p => p.ClientIndex == c.Index && p.PlayerReference.Playable);
|
||||
@@ -44,7 +50,12 @@ namespace OpenRA.Network
|
||||
foreach (var node in yaml)
|
||||
{
|
||||
var localizedMessage = new LocalizedMessage(node.Value);
|
||||
TextNotificationsManager.AddSystemLine(localizedMessage.TranslatedText);
|
||||
if (localizedMessage.Key == Joined)
|
||||
TextNotificationsManager.AddPlayerJoinedLine(localizedMessage.TranslatedText);
|
||||
else if (localizedMessage.Key == Left)
|
||||
TextNotificationsManager.AddPlayerLeftLine(localizedMessage.TranslatedText);
|
||||
else
|
||||
TextNotificationsManager.AddSystemLine(localizedMessage.TranslatedText);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user