diff --git a/AA2Snowflake/Changelog.txt b/AA2Snowflake/Changelog.txt index 0ec6815..4737c73 100644 --- a/AA2Snowflake/Changelog.txt +++ b/AA2Snowflake/Changelog.txt @@ -1,4 +1,9 @@ -v2.0 +v2.0.1 ++ Fixed some issues ++ Changed crash dialogs to display in english ++ Fixed links in crash dialog + +v2.0 + Massive amount of bugfixes ++ Crashes when border changes have been temporarily dealt with ++ Cards no longer crash when saving whilst being accessed at the same time diff --git a/AA2Snowflake/Personality.cs b/AA2Snowflake/Personality.cs index 57b16df..059c13c 100644 --- a/AA2Snowflake/Personality.cs +++ b/AA2Snowflake/Personality.cs @@ -149,7 +149,7 @@ public static Dictionary GetAllPersonalities() { CustomPersonality cp = LoadPersonality(new ppParser(path, new ppFormat_AA2())); if (!ReferenceEquals(cp, null)) //is there a better way to check null? - pers.Add(cp.Slot, cp); + pers[cp.Slot] = cp; } return pers; diff --git a/AA2Snowflake/Program.cs b/AA2Snowflake/Program.cs index b285cd8..83f7d80 100644 --- a/AA2Snowflake/Program.cs +++ b/AA2Snowflake/Program.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Threading; @@ -60,11 +61,14 @@ static bool saveLog(Exception ex) { try { + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; + SerializableDictionary log = new SerializableDictionary(); log["message"] = ex.Message; log["stacktrace"] = ex.StackTrace; - System.IO.File.WriteAllText(Environment.CurrentDirectory + @"\AA2Snowflake crash " + DateTime.Now.ToString("d-M-yyyy hh-mm-ss") + ".dmp", log.SerializeObject()); + File.WriteAllText(Environment.CurrentDirectory + @"\AA2Snowflake crash " + DateTime.Now.ToString("d-M-yyyy hh-mm-ss") + ".dmp", log.SerializeObject()); return true; } catch diff --git a/AA2Snowflake/Properties/AssemblyInfo.cs b/AA2Snowflake/Properties/AssemblyInfo.cs index f34ef12..2d26dc0 100644 --- a/AA2Snowflake/Properties/AssemblyInfo.cs +++ b/AA2Snowflake/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] +[assembly: AssemblyVersion("2.0.1.0")] +[assembly: AssemblyFileVersion("2.0.1.0")] diff --git a/AA2Snowflake/formCrash.cs b/AA2Snowflake/formCrash.cs index 55ed066..5752842 100644 --- a/AA2Snowflake/formCrash.cs +++ b/AA2Snowflake/formCrash.cs @@ -29,7 +29,7 @@ public void launchLink(string link) private void linkGithub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - launchLink(@"https://github.com/aa2g/AA2Install/issues/new"); + launchLink(@"https://github.com/aa2g/AA2Snowflake/issues/new"); } private void linkaa2g_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) @@ -39,8 +39,7 @@ private void linkaa2g_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e private void linkHongfire_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - //launchLink(@"http://www.hongfire.com/forum/showthread.php/447075-AA2Install-Open-source-mod-installer-Prerelease-5-2-2"); - //need to make a post first + launchLink(@"http://www.hongfire.com/forum/showthread.php/453615-AA2Snowflake-v2-0"); } } } diff --git a/AA2Snowflake/formMain.cs b/AA2Snowflake/formMain.cs index ddfbb30..3836555 100644 --- a/AA2Snowflake/formMain.cs +++ b/AA2Snowflake/formMain.cs @@ -746,14 +746,14 @@ private void chkMouth32_CheckedChanged(object sender, EventArgs e) public void GenerateICFBackups() { SerializableDictionary backup = new SerializableDictionary(); - Regex regex = new Regex(@"e\d{2}_\d{2}_\d{2}\.icf"); + Regex regex = new Regex(@"e\d{2}_\d{2}_\d{2}\.[Ii][Cc][Ff]"); foreach (IPersonality personality in Personalities.Values) - foreach (IWriteFile icf in personality.GetIcfPP().Subfiles.Where(iw => iw.Name.EndsWith(".icf"))) + foreach (IWriteFile icf in personality.GetIcfPP().Subfiles.Where(iw => iw.Name.ToLower().EndsWith(".icf"))) if (regex.IsMatch(icf.Name)) using (MemoryStream ms = new MemoryStream()) { icf.WriteTo(ms); - backup[icf.Name] = ms.ToByteArray(); + backup[icf.Name.ToLower()] = ms.ToByteArray(); } File.WriteAllText(Paths.BACKUP + "\\icfbackup.xml", backup.SerializeObject()); } @@ -814,7 +814,7 @@ private void cmbMode33_SelectedIndexChanged(object sender, EventArgs e) private void btnSet33_Click(object sender, EventArgs e) { - if (!File.Exists(Paths.BACKUP + "\\lstbackup.xml")) + if (!File.Exists(Paths.BACKUP + "\\icfbackup.xml")) if (MessageBox.Show("You haven't created a backup, so restoration is not possible.\nAre you sure you want to continue?", "Unable to restore", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) != DialogResult.Yes) return; @@ -870,7 +870,7 @@ private void btnRestore33_Click(object sender, EventArgs e) string name = "e" + cmbMode33.SelectedIndex.ToString("00") + "_" + personality.Slot.ToString("00") + "_" + cmbHeight33.SelectedIndex.ToString("00") + ".ICF"; var sub = pp.Subfiles.First(iw => iw.Name.ToLower() == name.ToLower()); var index = pp.Subfiles.IndexOf(pp.Subfiles.First(iw => iw.Name.ToLower() == name.ToLower())); - sub = new MemSubfile(new MemoryStream(backup[name]), name); + sub = new MemSubfile(new MemoryStream(backup[name.ToLower()]), name); pp.Subfiles[index] = sub; var back = pp.WriteArchive(pp.FilePath, false, "bak", true); ShowLoadingForm();