Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-10-19 12:18:30 -03:00
613 changed files with 22122 additions and 11481 deletions
@@ -38,6 +38,7 @@ namespace Barotrauma
private float prevUIScale;
private readonly GUIFrame channelSettingsFrame;
private readonly GUITextBlock radioJammedWarning;
private readonly GUITextBox channelText;
private readonly GUILayoutGroup channelPickerContent;
private readonly GUIButton memButton;
@@ -107,6 +108,13 @@ namespace Barotrauma
RelativeSpacing = 0.01f
};
radioJammedWarning = new GUITextBlock(new RectTransform(Vector2.One, channelSettingsFrame.RectTransform), TextManager.Get("radiojammedwarning"),
textColor: GUIStyle.Orange, color: Color.Black,
textAlignment: Alignment.Center, style: "OuterGlow")
{
ToolTip = TextManager.Get("hint.radiojammed")
};
var buttonLeft = new GUIButton(new RectTransform(new Vector2(0.1f, 0.8f), channelSettingsContent.RectTransform), style: "DeviceButton")
{
PlaySoundOnSelect = false,
@@ -649,7 +657,7 @@ namespace Barotrauma
ToggleButton.RectTransform.AbsoluteOffset = new Point(GUIFrame.Rect.Right, GUIFrame.Rect.Y + HUDLayoutSettings.ChatBoxArea.Height - ToggleButton.Rect.Height);
}
if (Character.Controlled != null && ChatMessage.CanUseRadio(Character.Controlled, out WifiComponent radio))
if (Character.Controlled != null && ChatMessage.CanUseRadio(Character.Controlled, out WifiComponent radio, ignoreJamming: true))
{
if (prevRadio != radio)
{
@@ -678,10 +686,11 @@ namespace Barotrauma
}
}
channelSettingsFrame.Visible = true;
radioJammedWarning.Visible = radio is { JamTimer: > 0 };
}
else
{
channelSettingsFrame.Visible = false;
radioJammedWarning.Visible = channelSettingsFrame.Visible = false;
channelPickerContent.Children.First().CanBeFocused = true;
channelMemPending = false;
memButton.Enabled = true;