Change the location of snowygui configuration files
This commit is contained in:
parent
3313bd7c7d
commit
c74456c000
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue