mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
create resources file on ifrst config write
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
"disabled": "Disabled",
|
"disabled": "Disabled",
|
||||||
"game_exec": "Set Game Executable",
|
"game_exec": "Set Game Executable",
|
||||||
"game_version": "Set Game Version",
|
"game_version": "Set Game Version",
|
||||||
"emergency_metadata": "Emergency Metadata Replacement",
|
"emergency_metadata": "Emergency Metadata Restore",
|
||||||
"grasscutter_jar": "Set Grasscutter JAR",
|
"grasscutter_jar": "Set Grasscutter JAR",
|
||||||
"toggle_encryption": "Toggle Encryption",
|
"toggle_encryption": "Toggle Encryption",
|
||||||
"java_path": "Set Custom Java Path",
|
"java_path": "Set Custom Java Path",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { fs } from '@tauri-apps/api'
|
import { fs } from '@tauri-apps/api'
|
||||||
import { dataDir } from '@tauri-apps/api/path'
|
import { dataDir } from '@tauri-apps/api/path'
|
||||||
|
import { cacheLauncherResources } from './resources'
|
||||||
|
|
||||||
let configFilePath: string
|
let configFilePath: string
|
||||||
let defaultConfig: Configuration
|
let defaultConfig: Configuration
|
||||||
@@ -119,6 +120,9 @@ async function readConfigFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await fs.writeFile(file)
|
await fs.writeFile(file)
|
||||||
|
|
||||||
|
// ALso just shoe-horning this in, cache resources on first launch
|
||||||
|
await cacheLauncherResources()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, read the file
|
// Finally, read the file
|
||||||
|
|||||||
Reference in New Issue
Block a user