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("Fullscreen enabled", Color.Green);
|
||||
|
||||
GameSettings.ShowUserStatisticsPrompt = true;
|
||||
|
||||
GameSettings.VerboseLogging = false;
|
||||
|
||||
if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Barotrauma
|
||||
Config.WasGameUpdated = false;
|
||||
Config.Save("config.xml");
|
||||
}
|
||||
|
||||
|
||||
ApplyGraphicsSettings();
|
||||
|
||||
Content.RootDirectory = "Content";
|
||||
@@ -244,12 +244,18 @@ namespace Barotrauma
|
||||
new string[] { "Yes", "No" });
|
||||
userStatsPrompt.Buttons[0].OnClicked += (btn, userdata) =>
|
||||
{
|
||||
GameSettings.ShowUserStatisticsPrompt = false;
|
||||
GameSettings.SendUserStatistics = true;
|
||||
GameAnalyticsManager.Init();
|
||||
return true;
|
||||
};
|
||||
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;
|
||||
}
|
||||
else if (GameSettings.SendUserStatistics)
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace Barotrauma
|
||||
GameMain.Config.Save("config.xml");
|
||||
}
|
||||
}
|
||||
public static bool ShowUserStatisticsPrompt { get; private set; }
|
||||
public static bool ShowUserStatisticsPrompt { get; set; }
|
||||
|
||||
public GameSettings(string filePath)
|
||||
{
|
||||
@@ -334,8 +334,12 @@ namespace Barotrauma
|
||||
new XAttribute("soundvolume", soundVolume),
|
||||
new XAttribute("verboselogging", VerboseLogging),
|
||||
new XAttribute("savedebugconsolelogs", SaveDebugConsoleLogs),
|
||||
new XAttribute("enablesplashscreen", EnableSplashScreen),
|
||||
new XAttribute("senduserstatistics", sendUserStatistics));
|
||||
new XAttribute("enablesplashscreen", EnableSplashScreen));
|
||||
|
||||
if (!ShowUserStatisticsPrompt)
|
||||
{
|
||||
doc.Root.Add(new XAttribute("senduserstatistics", sendUserStatistics));
|
||||
}
|
||||
|
||||
if (WasGameUpdated)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user