Skip to content

Commit

Permalink
Keep unlocked items in a consistent order (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekolis committed Jun 21, 2022
1 parent ede28b9 commit 884a7eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions FrEee/Game/Objects/Civilization/Empire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ public IEnumerable<IUnlockable> UnlockedItems
private ModProgress<Tech>[] researchProgress;
private ResourceQuantity tradeIncome;

private ISet<IUnlockable> unlockedItems;
private IList<IUnlockable> unlockedItems;

/// <summary>
/// Belays (cancels) an order.
Expand Down Expand Up @@ -1132,7 +1132,10 @@ public void RefreshUnlockedItem(IUnlockable u)

public void RefreshUnlockedItems()
{
unlockedItems = new HashSet<IUnlockable>(Mod.Current.Objects.OfType<IUnlockable>().Union(Galaxy.Current.Referrables.OfType<IUnlockable>()).Where(r => CheckUnlockStatus(r)));
unlockedItems = new List<IUnlockable>(
Mod.Current.Objects.OfType<IUnlockable>()
.Union(Galaxy.Current.Referrables.OfType<IUnlockable>())
.Where(r => CheckUnlockStatus(r)));
}

/// <summary>
Expand Down

0 comments on commit 884a7eb

Please sign in to comment.