PolyhedralDev / Terra

Voxel world generation modding platform
MIT License
665 stars 87 forks source link

Implement Protolith for easy config updating #342

Open dfsek opened 2 years ago

dfsek commented 2 years ago

Using Protolith, require all registered objects to be Protolith compatible (provide a Protolith codec), and integrate with Tectonic to allow for simple "Updates" to be applied to configs.

Automatic updates would be applied by having every config type specify a version key, with updates being applied between versions. Updates would simply provide optics onto old config schemas which "translate" to new config schema values. These translation optics would then be composed together automatically to incrementally update old config schemas.