Cleanbuild console command resets the user statistics setting
This commit is contained in:
@@ -438,6 +438,8 @@ namespace Barotrauma
|
|||||||
NewMessage("Resolution set to 0 x 0 (screen resolution will be used)", Color.Green);
|
NewMessage("Resolution set to 0 x 0 (screen resolution will be used)", Color.Green);
|
||||||
NewMessage("Fullscreen enabled", Color.Green);
|
NewMessage("Fullscreen enabled", Color.Green);
|
||||||
|
|
||||||
|
GameSettings.ShowUserStatisticsPrompt = true;
|
||||||
|
|
||||||
GameSettings.VerboseLogging = false;
|
GameSettings.VerboseLogging = false;
|
||||||
|
|
||||||
if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
|
if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
|
||||||
|
|||||||
@@ -244,12 +244,18 @@ namespace Barotrauma
|
|||||||
new string[] { "Yes", "No" });
|
new string[] { "Yes", "No" });
|
||||||
userStatsPrompt.Buttons[0].OnClicked += (btn, userdata) =>
|
userStatsPrompt.Buttons[0].OnClicked += (btn, userdata) =>
|
||||||
{
|
{
|
||||||
|
GameSettings.ShowUserStatisticsPrompt = false;
|
||||||
GameSettings.SendUserStatistics = true;
|
GameSettings.SendUserStatistics = true;
|
||||||
GameAnalyticsManager.Init();
|
GameAnalyticsManager.Init();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
userStatsPrompt.Buttons[0].OnClicked += userStatsPrompt.Close;
|
userStatsPrompt.Buttons[0].OnClicked += userStatsPrompt.Close;
|
||||||
userStatsPrompt.Buttons[1].OnClicked += (btn, userdata) => { GameSettings.SendUserStatistics = false; return true; };
|
userStatsPrompt.Buttons[1].OnClicked += (btn, userdata) =>
|
||||||
|
{
|
||||||
|
GameSettings.ShowUserStatisticsPrompt = false;
|
||||||
|
GameSettings.SendUserStatistics = false;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
userStatsPrompt.Buttons[1].OnClicked += userStatsPrompt.Close;
|
userStatsPrompt.Buttons[1].OnClicked += userStatsPrompt.Close;
|
||||||
}
|
}
|
||||||
else if (GameSettings.SendUserStatistics)
|
else if (GameSettings.SendUserStatistics)
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace Barotrauma
|
|||||||
GameMain.Config.Save("config.xml");
|
GameMain.Config.Save("config.xml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static bool ShowUserStatisticsPrompt { get; private set; }
|
public static bool ShowUserStatisticsPrompt { get; set; }
|
||||||
|
|
||||||
public GameSettings(string filePath)
|
public GameSettings(string filePath)
|
||||||
{
|
{
|
||||||
@@ -334,8 +334,12 @@ namespace Barotrauma
|
|||||||
new XAttribute("soundvolume", soundVolume),
|
new XAttribute("soundvolume", soundVolume),
|
||||||
new XAttribute("verboselogging", VerboseLogging),
|
new XAttribute("verboselogging", VerboseLogging),
|
||||||
new XAttribute("savedebugconsolelogs", SaveDebugConsoleLogs),
|
new XAttribute("savedebugconsolelogs", SaveDebugConsoleLogs),
|
||||||
new XAttribute("enablesplashscreen", EnableSplashScreen),
|
new XAttribute("enablesplashscreen", EnableSplashScreen));
|
||||||
new XAttribute("senduserstatistics", sendUserStatistics));
|
|
||||||
|
if (!ShowUserStatisticsPrompt)
|
||||||
|
{
|
||||||
|
doc.Root.Add(new XAttribute("senduserstatistics", sendUserStatistics));
|
||||||
|
}
|
||||||
|
|
||||||
if (WasGameUpdated)
|
if (WasGameUpdated)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user