mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 09:04:45 +01:00
remove redundant option
This commit is contained in:
@@ -7,8 +7,7 @@ let defaultConfig: Configuration
|
||||
(async() => {
|
||||
defaultConfig = {
|
||||
toggle_grasscutter: false,
|
||||
game_install_path: 'C:\\Program Files\\Genshin Impact\\Genshin Impact game',
|
||||
game_executable: 'GenshinImpact.exe',
|
||||
game_install_path: 'C:\\Program Files\\Genshin Impact\\Genshin Impact game\\GenshinImpact.exe',
|
||||
grasscutter_with_game: false,
|
||||
grasscutter_path: '',
|
||||
java_path: '',
|
||||
@@ -31,7 +30,6 @@ let defaultConfig: Configuration
|
||||
export interface Configuration {
|
||||
toggle_grasscutter: boolean
|
||||
game_install_path: string
|
||||
game_executable: string
|
||||
grasscutter_with_game: boolean
|
||||
grasscutter_path: string
|
||||
java_path: string
|
||||
|
||||
@@ -7,6 +7,6 @@ export async function getGameExecutable() {
|
||||
return null
|
||||
}
|
||||
|
||||
const pathArr = config.game_executable.replace(/\\/g, '/').split('/')
|
||||
const pathArr = config.game_install_path.replace(/\\/g, '/').split('/')
|
||||
return pathArr[pathArr.length - 1].replace('.exe', '')
|
||||
}
|
||||
@@ -9,8 +9,7 @@ export async function patchMetadata() {
|
||||
})
|
||||
|
||||
if (!metadataExists) {
|
||||
alert('Global metadata not found!')
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
console.log('Copying unpatched metadata to backup location')
|
||||
@@ -23,7 +22,6 @@ export async function patchMetadata() {
|
||||
})
|
||||
|
||||
if (!copiedMeta) {
|
||||
alert('Failed to backup metadata!')
|
||||
console.log(await getBackupMetadataPath())
|
||||
return false
|
||||
}
|
||||
@@ -37,7 +35,6 @@ export async function patchMetadata() {
|
||||
})
|
||||
|
||||
if (!patchedMeta) {
|
||||
alert('Failed to patch metadata!')
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -51,7 +48,6 @@ export async function patchMetadata() {
|
||||
})
|
||||
|
||||
if (!replacedMeta) {
|
||||
alert('Failed to replace game metadata!')
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user