From 8ca30b2fafc0160cc951353db180f65ecd4d7952 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 13 Apr 2026 21:05:54 -0400 Subject: feat: appid-based patch/unpatch with multi-library discovery and marker tracking --- src/api/index.ts | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src/api/index.ts') diff --git a/src/api/index.ts b/src/api/index.ts index 226f29f..c205a87 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -17,7 +17,7 @@ export const checkFGModPath = callable< export const listInstalledGames = callable< [], - { status: string; games: { appid: string; name: string }[] } + { status: string; message?: string; games: { appid: string; name: string; install_found?: boolean }[] } >("list_installed_games"); export const logError = callable<[string], void>("log_error"); @@ -36,3 +36,43 @@ export const runManualUnpatch = callable< [string], { status: string; message?: string; output?: string } >("manual_unpatch_directory"); + +export const getGameStatus = callable< + [appid: string], + { + status: string; + message?: string; + appid?: string; + name?: string; + install_found?: boolean; + patched?: boolean; + dll_name?: string | null; + target_dir?: string | null; + patched_at?: string | null; + } +>("get_game_status"); + +export const patchGame = callable< + [appid: string, dll_name: string, current_launch_options: string], + { + status: string; + message?: string; + appid?: string; + name?: string; + dll_name?: string; + target_dir?: string; + launch_options?: string; + original_launch_options?: string; + } +>("patch_game"); + +export const unpatchGame = callable< + [appid: string], + { + status: string; + message?: string; + appid?: string; + name?: string; + launch_options?: string; + } +>("unpatch_game"); -- cgit v1.2.3