Coerce mod settings types during data export

Use the settings prototypes to coerce any incorrectly typed mod settings
to the correct type either by casting or by replacing the value with the
default value from the prototype.

This will fix cases where an update to a mod changes the type of ono of
its defined settings.
This commit is contained in:
Hornwitser committed 2024-04-28 16:52:33 +02:00
1 parent c37fe0f438
commit 3cf9f96233
3 files changed
+99 -9

No files matched your search

+1
View File
@@ -37,6 +37,7 @@ Many thanks to the following for contributing to this release:
- Fixed plugin events being invoked while a host connection was in an invalid state.
- Suppresed bogus warning about event listener leak in the browser's console [#600](https://github.com/clusterio/clusterio/pull/600).
- Fixed installer breaking on Windows after Node.js released a security fix [#614](https://github.com/clusterio/clusterio/pull/614).
- During a data export the mod settings in mod packs will now be corrected to the type of the settings prototype if the type is incorrect.
Many thanks to the following for contributing to this release:
[@Cooldude2606](https://github.com/Cooldude2606)