HomeWildfire Games

Mod and mod-mounting cleanup and improvements.
AuditedrP25474

Description

Mod and mod-mounting cleanup and improvements.

  • Non-visual replays now automatically try to load the replay mods. This removes the annoyance that -mod=public usually had to be passed.
  • MountMods is no longer called in InitVfs but later, making it possible to load the game in one pass & simplifying things considerably.
  • Explicitly ignore duplicates when loading mods
  • Interface cleanup: failed mods and incompatible mods were redundant, only incompatible mods is kept.
  • Interface cleanup: AreModsCompatiblebecomes CheckForIncompatibleMods, which becomes a private pure function, simplifying the control flow somewhat.
  • Interface cleanup: CheckAndEnableMods is just EnableMods, which explicitly updates loaded & incompatible mods.
  • CacheEnabledModVersions becomes private and is called on behalf of the user, removing the need to be careful about updating that (fixes my concern at rP21823)

Overall, the logic around mounting & enabled mods should be easier to understand.

Differential Revision: https://code.wildfiregames.com/D3982

Event Timeline

Silier raised a concern with this commit.May 20 2021, 6:41 PM
Silier added a subscriber: Silier.

Does it work as before with incompatible mods?
Does it display all mods which were enabled when compatibility failed in enabled section?

/ps/trunk/binaries/data/mods/mod/gui/modmod/modmod.js
121

^

This commit now has outstanding concerns.May 20 2021, 6:41 PM
In rP25474#51793, @Angen wrote:

Does it work as before with incompatible mods?
Does it display all mods which were enabled when compatibility failed in enabled section?

See D3990

wraitii requested verification of this commit.May 20 2021, 7:11 PM
This commit now requires verification by auditors.May 20 2021, 7:11 PM
Silier accepted this commit.May 22 2021, 10:08 AM
All concerns with this commit have now been addressed.May 22 2021, 10:08 AM