Properly recalculate compatible mods on stability tolerance change#4552
Merged
HebaruSan merged 2 commits intoApr 11, 2026
Merged
Conversation
Coverage Report for CI Build 24290576706Coverage increased (+0.01%) to 85.481%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
2e9ab55 to
56be05a
Compare
56be05a to
41e9087
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Pointed out by @JonnyOThan in Discord.
Cause
CompatibilitySorter retains a
readonlyreference to the StabilityToleranceConfig that was used to generate its LatestCompatible property. Registry.CompatibleModules compares this property to the current settings received from its parameter and recalculates the compatible mods if needed.That comparison gives the wrong answer because the reference held by CompatibilitySorter points to the same object that the other code modifies when you change the settings. So when the mod list is refreshed after the stability config change, the list of compatible mods is left the same as it was before, so the mod list isn't changed, and mod info receives the same mod as before.
Changes
IEquatable<StabilityToleranceConfig>and overridesoperator!=to make sure the comparison is accurateAfter this, changing the compatibility override for a mod will show the correct relationships on the Relationships tab.