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,6 +63,9 @@ class App extends React.Component<IProps, IState> {
|
||||
|
||||
// Emitted for metadata replacing-purposes
|
||||
listen('game_closed', async () => {
|
||||
const wasPatched = await getConfigOption('patch_metadata')
|
||||
|
||||
if (wasPatched) {
|
||||
const unpatched = await unpatchGame()
|
||||
|
||||
console.log(`unpatched game? ${unpatched}`)
|
||||
@@ -70,6 +73,7 @@ class App extends React.Component<IProps, IState> {
|
||||
if (!unpatched) {
|
||||
alert(`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let min = false
|
||||
|
||||
Reference in New Issue
Block a user