Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src-tauri/bindings/NorthstarLaunchOptions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type NorthstarLaunchOptions = { launch_via_steam: boolean, bypass_checks: boolean, };
export type NorthstarLaunchOptions = { launch_via_steam: boolean, bypass_checks: boolean, cmd_args: string, };
3 changes: 2 additions & 1 deletion src-tauri/src/northstar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use ts_rs::TS;
pub struct NorthstarLaunchOptions {
launch_via_steam: bool,
bypass_checks: bool,
cmd_args: String,
}

/// Gets list of available Northstar versions from Thunderstore
Expand Down Expand Up @@ -215,7 +216,7 @@ pub fn launch_northstar(
let ns_profile_arg = format!("-profile={}", game_install.profile);

let mut output = std::process::Command::new("C:\\Windows\\System32\\cmd.exe")
.args(["/C", "start", "", &ns_exe_path, &ns_profile_arg])
.args(["/C", "start", "", &ns_exe_path, &ns_profile_arg]).args(launch_options.cmd_args.split(" ").map(|a| a.trim()))
.spawn()
.expect("failed to execute process");
output.wait().expect("failed waiting on child process");
Expand Down
10 changes: 8 additions & 2 deletions src-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
"title": "Profiler"
}
},
"cmd_args": {
"title": "Northstar command line argumenter",
"placeholder": "-novid"
},
"repair": {
"title": "Reparere",
"open_window": "Åbn reparationsvinduet",
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"disable_modsettings": "Deaktiviere den ModSettings Mod"
}
},
"cmd_args": {
"title": "Northstar command line argumenten",
"placeholder": "-novid"
},
"show_deprecated_mods_desc1": "Damit werden veraltete Mods in der Online-Mods-Ansicht sichtbar.",
"show_deprecated_mods_desc2": "Aber Vorsicht, solche Mods sind normalerweise aus gutem Grund als veraltet markiert.",
"show_deprecated_mods": "Veraltete Thunderstore mods anzeigen",
Expand Down
5 changes: 5 additions & 0 deletions src-vue/src/i18n/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@
"show_deprecated_mods_desc2": "Watch out, such mods are usually deprecated for a good reason.",
"show_nsfw_mods": "Show NSFW Thunderstore mods",

"cmd_args": {
"title": "Northstar command line arguments",
"placeholder": "-novid"
},

"profile": {
"active": "Active Profile",
"edit": "Edit Profiles",
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
"clone": "Duplicar"
}
},
"cmd_args": {
"title": "Northstar command line argumentos",
"placeholder": "-novid"
},
"repair": {
"title": "Reparar",
"window": {
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"kill_northstar_process": "Arrêter le processus en cous de Northstar/Titanfall2"
}
},
"cmd_args": {
"title": "Northstar command line arguments",
"placeholder": "-novid"
},
"show_deprecated_mods": "Montrer les mods Thunderstore dépréciés",
"show_deprecated_mods_desc1": "Ce paramètre vous permet d'afficher les mods Thunderstore dépréciés dans la collection de mods.",
"show_deprecated_mods_desc2": "Attention, les mods dépréciés le sont généralement pour une bonne raison.",
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
"disable_modsettings": "Disabilita la mod ModSettings"
}
},
"cmd_args": {
"title": "Northstar command line argomenti",
"placeholder": "-novid"
},
"profile": {
"active": "Profilo attivo",
"dialog": {
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"kill_northstar_process": "Zamknij uruchomiony proces Northstar/Titanfall2"
}
},
"cmd_args": {
"title": "Northstar command line argumenty",
"placeholder": "-novid"
},
"nb_ts_mods_per_page_desc1": "Ma to wpływ na wydajność wyświetlania podczas przeglądania modów Thunderstore.",
"open_game_folder": "Otwórz folder",
"show_deprecated_mods_desc2": "Ostrożnie, mody są zazwyczaj oznaczone jako przestarzałe nie bez powodu.",
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
},
"title": "Фиксы"
},
"cmd_args": {
"title": "Аргументы командной строки Northstar",
"placeholder": "-novid"
},
"nb_ts_mods_per_page_desc1": "Это влияет на производительность при просмотре модов с Thunderstore.",
"about": "Информация:",
"nb_ts_mods_per_page": "Количество модов Thunderstore на каждую страницу",
Expand Down
4 changes: 4 additions & 0 deletions src-vue/src/i18n/lang/zh_Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
"show_deprecated_mods": "显示已弃用的Thunderstore模组",
"show_deprecated_mods_desc1": "该选项会使您可以在线上模组合集中看到已弃用的模组。",
"show_deprecated_mods_desc2": "请注意,这类模组被弃用一般是有原因的。",
"cmd_args": {
"title": "Northstar 命令行参数",
"placeholder": "-novid"
},
"repair": {
"title": "修复",
"window": {
Expand Down
10 changes: 8 additions & 2 deletions src-vue/src/plugins/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const store = createStore<FlightCoreStore>({
}
}
},
async launchGame(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: false, bypass_checks: false}) {
async launchGame(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: false, bypass_checks: false, cmd_args: state.command_line_args }) {

if (launch_options.bypass_checks) {
await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options })
Expand Down Expand Up @@ -248,7 +248,7 @@ export const store = createStore<FlightCoreStore>({
break;
}
},
async launchGameSteam(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: true, bypass_checks: false}) {
async launchGameSteam(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: true, bypass_checks: false, cmd_args: state.command_line_args }) {
await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options })
.then((_message) => {
showNotification('Success');
Expand Down Expand Up @@ -403,6 +403,12 @@ async function _initializeApp(state: any) {
state.mods_per_page = perPageFromStore.value;
}

// Grab "Northstar command line arguments" setting from store if possible
const commandLineArgs: { value: String } | null | undefined = await persistentStore.get('northstar-command-line-args');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On first launch, this would return nothing, leading to an error when starting the game

if (commandLineArgs) {
state.command_line_args = commandLineArgs.value;
}

// Get FlightCore version number
state.flightcore_version = await invoke("get_flightcore_version_number");

Expand Down
16 changes: 16 additions & 0 deletions src-vue/src/views/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
</el-input>
</div>

<!-- Northstar Command Line Arguments -->
<div class="fc_parameter__panel">
<h3>{{$t('settings.cmd_args.title')}}</h3>
<el-input v-model="commandLineArgs" :placeholder="$t('settings.cmd_args.placeholder')" clearable />
</div>

<!-- Northstar Active Profile -->
<div class="fc_parameter__panel" v-if="$store.state.developer_mode">
<h3>{{ $t('settings.profile.active') }}</h3>
Expand Down Expand Up @@ -210,6 +216,16 @@ export default defineComponent({
await persistentStore.save(); // explicit save to disk
}
},
commandLineArgs: {
get(): String {
return this.$store.state.command_line_args;
},
async set(value: String) {
this.$store.state.command_line_args = value;
persistentStore.set('northstar-command-line-args', { value });
await persistentStore.save();
}
},
activeProfile(): String {
return this.$store.state.game_install.profile || "None";
},
Expand Down