Build 1.1.4.0
This commit is contained in:
@@ -232,9 +232,8 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
GameSettings.Init();
|
||||
CreatureMetrics.Init();
|
||||
|
||||
Md5Hash.Cache.Load();
|
||||
|
||||
ConsoleArguments = args;
|
||||
|
||||
try
|
||||
@@ -747,7 +746,7 @@ namespace Barotrauma
|
||||
}
|
||||
else if (HasLoaded)
|
||||
{
|
||||
if (ConnectCommand is Some<ConnectCommand> { Value: var connectCommand })
|
||||
if (ConnectCommand.TryUnwrap(out var connectCommand))
|
||||
{
|
||||
if (Client != null)
|
||||
{
|
||||
@@ -1069,21 +1068,23 @@ namespace Barotrauma
|
||||
|
||||
public static void QuitToMainMenu(bool save)
|
||||
{
|
||||
CreatureMetrics.Save();
|
||||
if (save)
|
||||
{
|
||||
GUI.SetSavingIndicatorState(true);
|
||||
|
||||
if (GameSession.Submarine != null && !GameSession.Submarine.Removed)
|
||||
{
|
||||
GameSession.SubmarineInfo = new SubmarineInfo(GameSession.Submarine);
|
||||
}
|
||||
|
||||
// Update store stock when saving and quitting in an outpost (normally updated when CampaignMode.End() is called)
|
||||
if (GameSession?.Campaign is SinglePlayerCampaign spCampaign && Level.IsLoadedFriendlyOutpost)
|
||||
if (GameSession.Campaign is CampaignMode campaign)
|
||||
{
|
||||
spCampaign.UpdateStoreStock();
|
||||
if (campaign is SinglePlayerCampaign spCampaign && Level.IsLoadedFriendlyOutpost)
|
||||
{
|
||||
spCampaign.UpdateStoreStock();
|
||||
}
|
||||
GameSession.EventManager?.RegisterEventHistory(registerFinishedOnly: true);
|
||||
campaign.End();
|
||||
}
|
||||
|
||||
SaveUtil.SaveGame(GameSession.SavePath);
|
||||
}
|
||||
|
||||
@@ -1174,6 +1175,7 @@ namespace Barotrauma
|
||||
protected override void OnExiting(object sender, EventArgs args)
|
||||
{
|
||||
exiting = true;
|
||||
CreatureMetrics.Save();
|
||||
DebugConsole.NewMessage("Exiting...");
|
||||
Client?.Quit();
|
||||
SteamManager.ShutDown();
|
||||
|
||||
Reference in New Issue
Block a user