diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-28 16:41:06 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-28 16:41:06 +0200 |
commit | 52e0ff843dbd3cb0616bc37cee11594b64363636 (patch) | |
tree | 6411a45eccf0e7078ecbfdd67474a06a270926f6 /src-tauri/src/main.rs | |
parent | a0f8e9e8861506e6b843977c489fb6ed5d2aaf7d (diff) | |
download | FlightCore-52e0ff843dbd3cb0616bc37cee11594b64363636.tar.gz FlightCore-52e0ff843dbd3cb0616bc37cee11594b64363636.zip |
Add backend logic to parse `enabledmods.json`
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7c54e630..f75f78c7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -12,8 +12,8 @@ use std::{ use app::{ check_is_flightcore_outdated, check_is_valid_game_path, check_northstar_running, check_origin_running, convert_release_candidate_number, find_game_install_location, - get_host_os, get_log_list, get_northstar_version_number, install_northstar, launch_northstar, - GameInstall, + get_enabled_mods, get_host_os, get_log_list, get_northstar_version_number, install_northstar, + launch_northstar, GameInstall, }; mod repair_and_verify; @@ -83,7 +83,8 @@ fn main() { launch_northstar_caller, check_is_flightcore_outdated_caller, get_log_list_caller, - verify_game_files_caller + verify_game_files_caller, + get_enabled_mods_caller ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); @@ -256,3 +257,8 @@ fn get_log_list_caller(game_install: GameInstall) -> Result<Vec<std::path::PathB fn verify_game_files_caller(game_install: GameInstall) -> Result<String, String> { verify_game_files(game_install) } + +#[tauri::command] +fn get_enabled_mods_caller(game_install: GameInstall) -> Result<serde_json::value::Value, String> { + get_enabled_mods(game_install) +} |