From 7f0ee9be80988f13f1d234136725a03db0335ec5 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 29 Sep 2022 01:15:42 +0200 Subject: Add backend function to disable all mods but core Should help with fixing a Northstar install in the case of conflicting mods. --- src-tauri/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src-tauri/src/main.rs') diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 4089d72b..a2866cb4 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -17,7 +17,7 @@ use app::{ }; mod repair_and_verify; -use repair_and_verify::verify_game_files; +use repair_and_verify::{verify_game_files, disable_all_but_core}; use tauri::Manager; use tauri_plugin_store::PluginBuilder; @@ -85,7 +85,8 @@ fn main() { get_log_list_caller, verify_game_files_caller, get_enabled_mods_caller, - set_mod_enabled_status_caller + set_mod_enabled_status_caller, + disable_all_but_core_caller ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); @@ -272,3 +273,8 @@ fn set_mod_enabled_status_caller( ) -> Result<(), String> { set_mod_enabled_status(game_install, mod_name, is_enabled) } + +#[tauri::command] +fn disable_all_but_core_caller(game_install: GameInstall) -> Result<(), String> { + disable_all_but_core(game_install) +} -- cgit v1.2.3