aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/i18n/lang/en.json1
-rw-r--r--src-vue/src/plugins/store.ts10
-rw-r--r--src-vue/src/utils/GameInstall.ts1
-rw-r--r--src-vue/src/views/SettingsView.vue19
4 files changed, 30 insertions, 1 deletions
diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json
index 470e98be..b1c69388 100644
--- a/src-vue/src/i18n/lang/en.json
+++ b/src-vue/src/i18n/lang/en.json
@@ -92,6 +92,7 @@
"settings": {
"manage_install": "Manage installation",
+ "launch_parameters": "Launch parameters",
"choose_folder": "Choose installation folder",
"open_game_folder": "Open Folder",
"nb_ts_mods_per_page": "Number of Thunderstore mods per page",
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) {
diff --git a/src-vue/src/utils/GameInstall.ts b/src-vue/src/utils/GameInstall.ts
index 07358f6c..22081afc 100644
--- a/src-vue/src/utils/GameInstall.ts
+++ b/src-vue/src/utils/GameInstall.ts
@@ -1,4 +1,5 @@
export interface GameInstall {
game_path: string;
+ launch_parameters: string;
install_type: string;
}
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index c4e94c80..5cc87213 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -21,6 +21,15 @@
</el-input>
</div>
+ <!-- Extra Launch parameters when starting Northtsar -->
+ <div class="fc_parameter__panel">
+ <h3>{{ $t('settings.launch_parameters') }}</h3>
+ <el-input
+ v-model="launchParameters"
+ >
+ </el-input>
+ </div>
+
<!-- Thunderstore mods per page configuration -->
<div class="fc_parameter__panel">
<h3>{{ $t('settings.nb_ts_mods_per_page') }}</h3>
@@ -135,6 +144,16 @@ export default defineComponent({
}
}
},
+ launchParameters: {
+ get(): string {
+ return this.$store.state.launch_parameters
+ },
+ async set(value: string) {
+ this.$store.state.launch_parameters = value;
+ persistentStore.set('northstar-launch-parameters', { value });
+ await persistentStore.save(); // explicit save to disk
+ }
+ },
modsPerPage: {
get(): number {
return this.$store.state.mods_per_page;