Faction Test 100.4.0.0
This commit is contained in:
@@ -4,6 +4,7 @@ using Barotrauma.Networking;
|
||||
using Barotrauma.Particles;
|
||||
using Barotrauma.Steam;
|
||||
using Barotrauma.Transition;
|
||||
using Barotrauma.Tutorials;
|
||||
using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -774,9 +775,9 @@ namespace Barotrauma
|
||||
{
|
||||
GUIMessageBox.MessageBoxes.Remove(GUIMessageBox.VisibleBox);
|
||||
}
|
||||
else if (GameSession?.GameMode is TutorialMode tutorialMode && tutorialMode.Tutorial.ContentRunning)
|
||||
else if (ObjectiveManager.ContentRunning)
|
||||
{
|
||||
tutorialMode.Tutorial.CloseActiveContentGUI();
|
||||
ObjectiveManager.CloseActiveContentGUI();
|
||||
}
|
||||
else if (GameSession.IsTabMenuOpen)
|
||||
{
|
||||
@@ -791,6 +792,10 @@ namespace Barotrauma
|
||||
{
|
||||
GUI.TogglePauseMenu();
|
||||
}
|
||||
else if (GameSession?.Campaign is { ShowCampaignUI: true, ForceMapUI: false })
|
||||
{
|
||||
GameSession.Campaign.ShowCampaignUI = false;
|
||||
}
|
||||
//open the pause menu if not controlling a character OR if the character has no UIs active that can be closed with ESC
|
||||
else if ((Character.Controlled == null || !itemHudActive())
|
||||
&& CharacterHealth.OpenHealthWindow == null
|
||||
@@ -824,7 +829,7 @@ namespace Barotrauma
|
||||
Paused =
|
||||
(DebugConsole.IsOpen || DebugConsole.Paused ||
|
||||
GUI.PauseMenuOpen || GUI.SettingsMenuOpen ||
|
||||
(GameSession?.GameMode is TutorialMode tutoMode && tutoMode.Tutorial.ContentRunning)) &&
|
||||
(GameSession?.GameMode is TutorialMode && ObjectiveManager.ContentRunning)) &&
|
||||
(NetworkMember == null || !NetworkMember.GameStarted);
|
||||
if (GameSession?.GameMode != null && GameSession.GameMode.Paused)
|
||||
{
|
||||
@@ -858,8 +863,9 @@ namespace Barotrauma
|
||||
{
|
||||
Screen.Selected.Update(Timing.Step);
|
||||
}
|
||||
else if (GameSession?.GameMode is TutorialMode tutorialMode && tutorialMode.Tutorial.ContentRunning)
|
||||
else if (ObjectiveManager.ContentRunning && GameSession?.GameMode is TutorialMode tutorialMode)
|
||||
{
|
||||
ObjectiveManager.VideoPlayer.Update();
|
||||
tutorialMode.Update((float)Timing.Step);
|
||||
}
|
||||
else
|
||||
@@ -1200,7 +1206,7 @@ namespace Barotrauma
|
||||
base.OnExiting(sender, args);
|
||||
}
|
||||
|
||||
public void ShowOpenUrlInWebBrowserPrompt(string url, string promptExtensionTag = null)
|
||||
public static void ShowOpenUrlInWebBrowserPrompt(string url, string promptExtensionTag = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url)) { return; }
|
||||
if (GUIMessageBox.VisibleBox?.UserData as string == "verificationprompt") { return; }
|
||||
@@ -1218,7 +1224,14 @@ namespace Barotrauma
|
||||
};
|
||||
msgBox.Buttons[0].OnClicked = (btn, userdata) =>
|
||||
{
|
||||
ToolBox.OpenFileWithShell(url);
|
||||
try
|
||||
{
|
||||
ToolBox.OpenFileWithShell(url);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to open the url {url}", e);
|
||||
}
|
||||
msgBox.Close();
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user