Change the location of snowygui configuration files

This commit is contained in:
Username404 2021-06-01 11:40:31 +02:00
parent 3313bd7c7d
commit c74456c000
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 2 deletions

View File

@ -25,8 +25,9 @@ object Configuration {
private fun Config.withFullModifiableValues() = ModifiableValues.entries.fold(this) { previous, entry ->
previous.withValue(entry.key, entry.value.get())
}
private val file: File = File(Minecraft.getInstance().gameDirectory.absolutePath + File.separator + "snowy.conf")
private val macroFile: File = File(Minecraft.getInstance().gameDirectory.absolutePath + File.separator + "snowy-macros.json")
private val configDirectory: String = (Minecraft.getInstance().gameDirectory.absolutePath + File.separator + "config").also { File(it).mkdir() }
private val file: File = File(configDirectory + File.separator + "snowy.conf")
private val macroFile: File = File(configDirectory + File.separator + "snowy-macros.json")
private suspend fun writeConfig(c: Config) = coroutineScope {
launch {
file.writeText(