As seen on TV: ConfigLoader v2

ConfigLoader will now read the internal and external versions of files it is loading to:
- Prune old keys in the external not in the internal
- Add new keys to the external from the internal

Additionally, while order is not presently preserved, all comments will be copied out, even for new keys.
Old keys will retain their values in the external if they differ from the internal.

Also changed the config.yml to say the version on which the config was last updated, not first generated as this will be updated as part of copying out comments.

Known issue: Extra spacing in the internal config files will not be copied out.

Closes #629
This commit is contained in:
NuclearW
2013-02-20 13:11:06 -05:00
parent c805a48a87
commit dec3c10ec1
2 changed files with 92 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#
# mcMMO configuration
# First generated on ${project.version}-b${BUILD_NUMBER}
# Last updated on ${project.version}-b${BUILD_NUMBER}
#
#####