remove redundant option

This commit is contained in:
SpikeHD
2022-07-13 18:15:32 -07:00
parent b903c27a22
commit fd87adc1f6
4 changed files with 5 additions and 41 deletions

View File

@@ -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

View File

@@ -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', '')
}

View File

@@ -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
}