diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-07-17 14:12:46 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-07-17 14:12:46 +0200 |
commit | baa1c52126eae7980f49f39631e2c5931d5b478f (patch) | |
tree | b27069d05074304c6837125314b851b753ab9fc7 /src-vue/src/plugins | |
parent | c8be2cc35d9440260e57c1169a8bffc81f16c2e9 (diff) | |
download | FlightCore-baa1c52126eae7980f49f39631e2c5931d5b478f.tar.gz FlightCore-baa1c52126eae7980f49f39631e2c5931d5b478f.zip |
Add support for launch parameters
Diffstat (limited to 'src-vue/src/plugins')
-rw-r--r-- | src-vue/src/plugins/store.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index e7dc0763..57021c97 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -26,6 +26,7 @@ const persistentStore = new Store('flight-core-settings.json'); export interface FlightCoreStore { developer_mode: boolean, game_path: string, + launch_parameters: string, install_type: InstallType, flightcore_version: string, @@ -62,6 +63,7 @@ export const store = createStore<FlightCoreStore>({ return { developer_mode: false, game_path: undefined as unknown as string, + launch_parameters: undefined as unknown as string, install_type: undefined as unknown as InstallType, flightcore_version: "", @@ -243,7 +245,8 @@ export const store = createStore<FlightCoreStore>({ async launchGameSteam(state: any, no_checks = false) { let game_install = { game_path: state.game_path, - install_type: state.install_type + install_type: state.install_type, + launch_parameters: state.launch_parameters } as GameInstall; await invoke("launch_northstar_steam", { gameInstall: game_install, bypassChecks: no_checks }) @@ -374,6 +377,11 @@ async function _initializeApp(state: any) { state.enableReleasesSwitch = valueFromStore.value; } + const paramsFromStore: { value: boolean } | null = await persistentStore.get('northstar-launch-parameters'); + if (paramsFromStore) { + state.launch_parameters = paramsFromStore.value; + } + // Grab "Thunderstore mods per page" setting from store if possible const perPageFromStore: { value: number } | null = await persistentStore.get('thunderstore-mods-per-page'); if (perPageFromStore && perPageFromStore.value) { |