Skip to content

Commit

Permalink
Fix plando with Unicorn Mart
Browse files Browse the repository at this point in the history
Move docs generation to be last as it is not important
  • Loading branch information
bartz24games@gmail.com committed Jul 4, 2021
1 parent 7a1e0fd commit 2b0fb98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -757,21 +757,27 @@ 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();

//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;
}
Expand Down
1 change: 1 addition & 0 deletions Randomizers/RandoTreasure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 2b0fb98

Please sign in to comment.