(1bd090dc7) Show the audio icon next to characters that are speaking in the single player crew menu
This commit is contained in:
@@ -654,6 +654,10 @@ namespace Barotrauma
|
||||
}
|
||||
if (string.IsNullOrEmpty(text)) { return; }
|
||||
|
||||
if (sender != null)
|
||||
{
|
||||
GameMain.GameSession.CrewManager.SetCharacterSpeaking(sender);
|
||||
}
|
||||
ChatBox.AddMessage(ChatMessage.Create(senderName, text, messageType, sender));
|
||||
}
|
||||
|
||||
@@ -705,15 +709,19 @@ namespace Barotrauma
|
||||
soundIconDisabled.ToolTip = TextManager.Get(mutedLocally ? "MutedLocally" : "MutedGlobally");
|
||||
}
|
||||
|
||||
public void SetPlayerSpeaking(Client client)
|
||||
public void SetClientSpeaking(Client client)
|
||||
{
|
||||
if (client?.Character == null) { return; }
|
||||
if (client?.Character != null) { SetCharacterSpeaking(client.Character); }
|
||||
}
|
||||
|
||||
var playerFrame = characterListBox.Content.FindChild(client.Character)?.FindChild(client.Character);
|
||||
public void SetCharacterSpeaking(Character character)
|
||||
{
|
||||
var playerFrame = characterListBox.Content.FindChild(character)?.FindChild(character);
|
||||
if (playerFrame == null) { return; }
|
||||
var soundIcon = playerFrame.FindChild("soundicon");
|
||||
soundIcon.Color = new Color(soundIcon.Color, 1.0f);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -631,7 +631,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
else
|
||||
{
|
||||
GameMain.GameSession?.CrewManager?.SetPlayerSpeaking(myClient);
|
||||
GameMain.GameSession?.CrewManager?.SetClientSpeaking(myClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
GameMain.NetLobbyScreen.SetPlayerSpeaking(client);
|
||||
GameMain.GameSession?.CrewManager?.SetPlayerSpeaking(client);
|
||||
GameMain.GameSession?.CrewManager?.SetClientSpeaking(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,9 +132,6 @@ namespace Barotrauma
|
||||
{
|
||||
GameMain.Instance.ShowEditorDisclaimer();
|
||||
}
|
||||
OpenDoors();
|
||||
GameMain.Instance.OnResolutionChanged += OnResolutionChanged;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void ResetVariables()
|
||||
|
||||
@@ -279,7 +279,6 @@ namespace Barotrauma
|
||||
movementSoundVolume = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (waterAmbiences.Count > 1)
|
||||
{
|
||||
|
||||
@@ -2130,7 +2130,8 @@ namespace Barotrauma
|
||||
|
||||
public void Speak(string message, ChatMessageType? messageType = null, float delay = 0.0f, string identifier = "", float minDurationBetweenSimilar = 0.0f)
|
||||
{
|
||||
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) return;
|
||||
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) { return; }
|
||||
if (string.IsNullOrEmpty(message)) { return; }
|
||||
|
||||
//already sent a similar message a moment ago
|
||||
if (!string.IsNullOrEmpty(identifier) && minDurationBetweenSimilar > 0.0f &&
|
||||
@@ -2139,7 +2140,6 @@ namespace Barotrauma
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
aiChatMessageQueue.Add(new AIChatMessage(message, messageType, identifier, delay));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user