Sort mods satisfying the same recommendation by download count #4007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
In #3934, we sorted the providing mods prompt by download count to make it easier for users to find the mods that they're most likely to want.
EnvironmentalVisualEnhancements recommends rather than depends on its config module, so when you install it, instead of the providing mods prompt, it uses the recommendations prompt, which is sorted by the related mod column and otherwise tries to reflect the ordering from the mods' relationships, but doesn't do any particular sorting within a group of mods satisfying a virtual module recommendation:
Changes
Now
Registry.LatestAvailableWithProvides
, which is used to satisfy virtual module recommendations, sorts its returned list by download count, which puts the most commonly used EVE configs at the top:@JonnyOThan, does that list look right to you? I noticed a few spots where the download counts appear to be slightly out of order, but I'm not sure whether those are actual problems or just some harmless quirk elsewhere in the sorting logic.
Fixes #4004.