mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
only unpatch when game was patched automatically
This commit is contained in:
@@ -63,12 +63,16 @@ class App extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
// Emitted for metadata replacing-purposes
|
// Emitted for metadata replacing-purposes
|
||||||
listen('game_closed', async () => {
|
listen('game_closed', async () => {
|
||||||
const unpatched = await unpatchGame()
|
const wasPatched = await getConfigOption('patch_metadata')
|
||||||
|
|
||||||
console.log(`unpatched game? ${unpatched}`)
|
if (wasPatched) {
|
||||||
|
const unpatched = await unpatchGame()
|
||||||
|
|
||||||
if (!unpatched) {
|
console.log(`unpatched game? ${unpatched}`)
|
||||||
alert(`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`)
|
|
||||||
|
if (!unpatched) {
|
||||||
|
alert(`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user