mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 08:34:43 +01:00
only unpatch when game was patched automatically
This commit is contained in:
@@ -63,6 +63,9 @@ 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 wasPatched = await getConfigOption('patch_metadata')
|
||||||
|
|
||||||
|
if (wasPatched) {
|
||||||
const unpatched = await unpatchGame()
|
const unpatched = await unpatchGame()
|
||||||
|
|
||||||
console.log(`unpatched game? ${unpatched}`)
|
console.log(`unpatched game? ${unpatched}`)
|
||||||
@@ -70,6 +73,7 @@ class App extends React.Component<IProps, IState> {
|
|||||||
if (!unpatched) {
|
if (!unpatched) {
|
||||||
alert(`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`)
|
alert(`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let min = false
|
let min = false
|
||||||
|
|||||||
Reference in New Issue
Block a user