- revert to case-sensitive config

- fix handling of toggle lists
- ignore unknown options in config file
This commit is contained in:
octarine-noise
2016-09-13 20:36:35 +02:00
parent 400b965e02
commit 2c0e95ba5b
4 changed files with 8 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: 'kotlin'
group = 'com.github.octarine-noise'
version = "2.0.14"
version = "2.0.15"
archivesBaseName = rootProject.name + '-MC1.8'
buildscript {

View File

@@ -38,7 +38,7 @@ object BetterFoliageMod {
@Mod.EventHandler
fun preInit(event: FMLPreInitializationEvent) {
log = event.modLog
config = Configuration(event.suggestedConfigurationFile, null, false)
config = Configuration(event.suggestedConfigurationFile, null, true)
}

View File

@@ -57,6 +57,6 @@ abstract class IdListConfigEntry<T>(
}
override fun getComment() = I18n.format("${configElement.languageKey}.tooltip.element", "${GOLD}${item.itemName}${YELLOW}")
val booleanValue: Boolean get() = value as Boolean
val booleanValue: Boolean get() = defaultValue as Boolean
}
}

View File

@@ -61,6 +61,11 @@ abstract class DelegatingConfig(val modId: String, val langPrefix: String) {
rootGuiElements.add(ConfigElement(configCategory))
}
save()
// hide all categories not in the config singleton
config.categoryNames.forEach {
config.getCategory(it).setShowInGui(it in subProperties.keySet())
}
}
/**