only unpatch when game was patched automatically

This commit is contained in:
SpikeHD
2022-07-19 17:49:40 -07:00
parent d23d5e3806
commit 1a6ed38f8f

View File

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