Skip to content

Commit

Permalink
Merge pull request az64#7 from Kjelli/fix-refactor
Browse files Browse the repository at this point in the history
fixed nullreference in no-logic mode, and disabled controls when buil…
  • Loading branch information
ZoeyZolotova authored May 4, 2019
2 parents 5271673 + 600f8a0 commit cf42c1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Shuffle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,9 @@ private void PrepareRulesetItemData()
{
string[] data = ReadRulesetFromResources();

ItemList = new List<ItemObject>();

// no logic
if (data == null)
{
for (var i = 0; i < Items.TotalNumberOfItems; i++)
Expand All @@ -555,8 +558,11 @@ private void PrepareRulesetItemData()
ItemList.Add(currentItem);
}
}
else
{
PopulateItemList(data);
}

PopulateItemList(data);
AddRequirementsForSongOath();
}

Expand All @@ -569,8 +575,6 @@ private void AddRequirementsForSongOath()

private void PopulateItemList(string[] data)
{
ItemList = new List<ItemObject>();

int itemId = 0;
int lineNumber = 0;

Expand Down
2 changes: 2 additions & 0 deletions fMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ private void EnableAllControls(bool v)
cCutsc.Enabled = v;
cDChests.Enabled = v;
cDEnt.Enabled = v;
cMode.Enabled = v;
cDMult.Enabled = v;
cDType.Enabled = v;
cDummy.Enabled = v;
Expand All @@ -825,6 +826,7 @@ private void EnableAllControls(bool v)
cVC.Enabled = v;
cQText.Enabled = v;
cSpoiler.Enabled = v;
cTatl.Enabled = v;

bopen.Enabled = v;
bRandomise.Enabled = v;
Expand Down

0 comments on commit cf42c1e

Please sign in to comment.