Right now, config is part of mods, in a single file, with a lot of hand written reads with defaults defined as part of the load process.
I feel like this is getting a bit fragile, and also disconnects the mapping of a named config value from what is actually used throughout the code.
Thinking a little ahead, with us now having a bit of a UI on Mac and maybe something coming for windows too, if we were to decide to add config into those that would result in a lot of duplicate code, which is very fragile and will fall apart in some way.
Proposal:
Create a new config system, split it out into a standalone module with a C API that can be used across the patch and all the UIs to have a unified way of how a config works.
Right now, config is part of mods, in a single file, with a lot of hand written reads with defaults defined as part of the load process. I feel like this is getting a bit fragile, and also disconnects the mapping of a named config value from what is actually used throughout the code.
Thinking a little ahead, with us now having a bit of a UI on Mac and maybe something coming for windows too, if we were to decide to add config into those that would result in a lot of duplicate code, which is very fragile and will fall apart in some way.
Proposal:
Create a new config system, split it out into a standalone module with a C API that can be used across the patch and all the UIs to have a unified way of how a config works.