From 2b0fb9816e887902e897ae392ab1ab06e7f190ef Mon Sep 17 00:00:00 2001 From: "bartz24games@gmail.com" Date: Sun, 4 Jul 2021 09:46:59 -0400 Subject: [PATCH] Fix plando with Unicorn Mart Move docs generation to be last as it is not important --- FormMain.cs | 16 +++++++++++----- Randomizers/RandoTreasure.cs | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/FormMain.cs b/FormMain.cs index fc13c52..b33448f 100644 --- a/FormMain.cs +++ b/FormMain.cs @@ -731,7 +731,7 @@ private void button9_Click(object sender, EventArgs e) } RandomNum.ClearRand(); - foreach(string path in fileNamesModified) + foreach (string path in fileNamesModified) { if (File.Exists(path)) File.Delete(path); @@ -757,10 +757,16 @@ private void button9_Click(object sender, EventArgs e) new ProgressForm(rando.GetProgressMessage(), bw => rando.Randomize(bw)).ShowDialog(); } new ProgressForm("Saving data...", bw => SaveRandos(randomizers, bw)).ShowDialog(); - new ProgressForm("Generating Documentation...", bw => GenerateDocumentation(randomizers, bw)).ShowDialog(); + new ProgressForm("Inserting files...", bw => insertFiles(bw, true)).ShowDialog(); + try + { + new ProgressForm("Generating Documentation...", bw => GenerateDocumentation(randomizers, bw)).ShowDialog(); + } catch (Exception) + { + MessageBox.Show("Documention generation encountered an error. The game is still playable, but docs may not exist or be incorrect."); + } - new ProgressForm("Inserting files...", bw => insertFiles(bw, true)).ShowDialog(); UserFlagsSeed.Export(RandoPath, textBoxSeed.Text.Trim(), Version); addHistory(); @@ -768,10 +774,10 @@ private void button9_Click(object sender, EventArgs e) //UserFlagsSeed.Export("logs", textBoxSeed.Text.Trim(), version); MessageBox.Show("Complete! Ready to play! Whenever you need to uninstall the rando, come back to this program and go to the Uninstall tab!"); - } catch(Exception ex) + } catch (Exception ex) { Exception innerMost = ex; - while(innerMost.InnerException != null) + while (innerMost.InnerException != null) { innerMost = innerMost.InnerException; } diff --git a/Randomizers/RandoTreasure.cs b/Randomizers/RandoTreasure.cs index 8249352..918341b 100644 --- a/Randomizers/RandoTreasure.cs +++ b/Randomizers/RandoTreasure.cs @@ -131,6 +131,7 @@ public override void Randomize(BackgroundWorker backgroundWorker) } shopsRemaining.Shuffle(); + ShopMappings.Add("key_shop_00", "key_shop_00"); for (int i = 1; i <= 13; i++) { string id = "key_shop_" + i.ToString("00");