0ad/source/ps/GameSetup
trompetin17 8e255af185
Fix mods configuration stacking and mergin per mod
Previously, the engine only loaded the last mod’s `config/mod.cfg` file,
causing earlier mods' configuration settings to be ignored. This broke
the expectation of stackable mod behavior and affected features relying
on custom config, such as font overrides.

This commit updates the mod mounting and configuration process to:

- Mount each mod's files before attempting to load its config.
- Reload each mod's `config/modname.cfg` via `g_ConfigDB.Reload(CFG_MOD)`
  after mounting.
- Merge configuration keys into the CFG_MOD namespace:
  - If a key exists, its value is updated.
  - If not, the key is added.

This behavior now aligns with the VFS override system, where later mods
take precedence but earlier mods still contribute.

Also adds `_test.mods` for validation.

Fixes edge cases for mod authors who rely on consistent and layered
configuration overrides.

Related: #6383, #1810
Fixes: #8060
2025-06-16 11:03:09 -05:00
..
tests Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
Atlas.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
Atlas.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
CmdLineArgs.cpp Fix style of #7269 after Vlad's comments 2024-12-17 11:19:20 +01:00
CmdLineArgs.h Fix style of #7269 after Vlad's comments 2024-12-17 11:19:20 +01:00
Config.cpp Get config values without using return parameters 2025-04-09 12:51:21 +02:00
Config.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
GameSetup.cpp Fix mods configuration stacking and mergin per mod 2025-06-16 11:03:09 -05:00
GameSetup.h Don't use std::shared_ptr to store m_ScriptContext and m_ScriptInterface in the CGUIManager 2024-06-27 19:09:30 +00:00
HWDetect.cpp Remove ICC code paths 2025-03-25 12:29:51 +01:00
HWDetect.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
Paths.cpp Adjust log path to use XDG_STATE_HOME 2025-06-07 12:39:03 +02:00
Paths.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00