HouseRules

HouseRules

1.4k Downloads

Fix predefined rulesets overriding eachother's values.

orendain opened this issue ยท 0 comments

commented

Thanks to @Buruko for noticing that pre-defined rulesets (e.g., easy/hard/legendary difficulty rulesets) interfere with eachother.

Note: This does not affect rulesets loaded from configs.

The issue is for rules that store config values in static variables. The last rule to be created will set the value, even if it's not the rule that's loaded. Use of static variables in some cases was a known crutch, due to some limitations in the mod loader (and Harmony patcher requirements).

I'll have to think about how to properly isolate rules from each other moving forward. In the meantime, predefined rulesets that use the same IPatachable rules may interfere with eachother.

However, rulesets defined in configuration are still 100% fine.