Skip to content

Commit

Permalink
updates of values.json can be denied (useful for console players that…
Browse files Browse the repository at this point in the history
… get game-updates later).
  • Loading branch information
cadaei committed Jan 14, 2017
1 parent 10ab5cc commit 002ea76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1429,11 +1429,13 @@ private void checkForUpdates(bool silentCheck = false)
if (Int32.TryParse(remoteVers[0], out remoteFileVer) && Values.V.version < remoteFileVer)
{
// backup the current version (to safe user added custom commands)
if (MessageBox.Show("There is a new version of the values-file \"" + filename + "\", do you want to make a backup of the current file?\nThis is recommended if you have changed the file manually and want to keep these changes.", "Backup old file?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
System.IO.File.Copy(filename, filename + "_backup_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".json");
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(remoteUri + filename, filename);
updated = true;
if (MessageBox.Show("There is a new version of the values-file \"" + filename + "\", do you want to update it?\n\nIf you play on a console (Xbox or PS4) make a backup of the current file before you click on Yes, as the updated values may not work with the console-version for some time.\nUsually it takes some days to weeks until the changes are valid on the consoles as well.", "Update Values-File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
// System.IO.File.Copy(filename, filename + "_backup_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".json");
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(remoteUri + filename, filename);
updated = true;
}
}
}
catch (System.Net.WebException ex)
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/ver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2530000,0.20.8.3
2530000,0.20.9.0

0 comments on commit 002ea76

Please sign in to comment.