Automatically apply RSA patch

This commit is contained in:
Thoronium
2023-02-27 17:15:21 -07:00
committed by GitHub
parent 55fa0a8d3c
commit 62a97d86cb
23 changed files with 184 additions and 468 deletions

View File

@@ -17,7 +17,7 @@ import { invoke } from '@tauri-apps/api'
import { listen } from '@tauri-apps/api/event'
import { dataDir } from '@tauri-apps/api/path'
import { appWindow } from '@tauri-apps/api/window'
import { unpatchGame } from '../utils/metadata'
import { unpatchGame } from '../utils/rsa'
import DownloadHandler from '../utils/download'
// Graphics
@@ -65,16 +65,16 @@ export class Main extends React.Component<IProps, IState> {
setConfigOption('grasscutter_path', payload)
})
// Emitted for metadata replacing-purposes
// Emitted for rsa replacing-purposes
listen('game_closed', async () => {
const wasPatched = await getConfigOption('patch_metadata')
const wasPatched = await getConfigOption('patch_rsa')
if (wasPatched) {
const unpatched = await unpatchGame()
if (!unpatched) {
alert(
`Could not unpatch game! (You should be able to find your metadata backup in ${await dataDir()}\\cultivation\\)`
`Could not unpatch game! (Delete version.dll in your game folder)`
)
}
}