mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 08:34:43 +01:00
BIG FAT CLEANUP PART ONE
This commit is contained in:
12
src/utils/game.ts
Normal file
12
src/utils/game.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { getConfig } from './configuration'
|
||||
|
||||
export async function getGameExecutable() {
|
||||
const config = await getConfig()
|
||||
|
||||
if(!config.game_install_path) {
|
||||
return null
|
||||
}
|
||||
|
||||
const pathArr = config.game_executable.replace(/\\/g, '/').split('/')
|
||||
return pathArr[pathArr.length - 1].replace('.exe', '')
|
||||
}
|
||||
Reference in New Issue
Block a user