mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
add cmd arg for noita exe path
This commit is contained in:
parent
f40b13a628
commit
a5c1b0ceee
3 changed files with 14 additions and 1 deletions
|
@ -21,6 +21,8 @@ use crate::{
|
||||||
steam_helper::SteamState,
|
steam_helper::SteamState,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use crate::util::args::Args;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
enum State {
|
enum State {
|
||||||
#[default]
|
#[default]
|
||||||
|
@ -150,9 +152,16 @@ impl Modmanager {
|
||||||
ui: &mut Ui,
|
ui: &mut Ui,
|
||||||
settings: &mut ModmanagerSettings,
|
settings: &mut ModmanagerSettings,
|
||||||
steam_state: Option<&mut SteamState>,
|
steam_state: Option<&mut SteamState>,
|
||||||
|
args: &Args,
|
||||||
) {
|
) {
|
||||||
if let State::JustStarted = self.state {
|
if let State::JustStarted = self.state {
|
||||||
if check_path_valid(&settings.game_exe_path) {
|
if let Some(path) = &args.exe_path {
|
||||||
|
if check_path_valid(path) {
|
||||||
|
settings.game_exe_path = path.to_path_buf();
|
||||||
|
info!("Path from command line is valid, checking mod now");
|
||||||
|
self.state = State::PreCheckMod;
|
||||||
|
}
|
||||||
|
} else if check_path_valid(&settings.game_exe_path) {
|
||||||
info!("Path is valid, checking mod now");
|
info!("Path is valid, checking mod now");
|
||||||
self.state = State::PreCheckMod;
|
self.state = State::PreCheckMod;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1501,6 +1501,7 @@ impl eframe::App for App {
|
||||||
ui,
|
ui,
|
||||||
&mut self.modmanager_settings,
|
&mut self.modmanager_settings,
|
||||||
self.steam_state.as_mut().ok(),
|
self.steam_state.as_mut().ok(),
|
||||||
|
&self.args,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
if self.modmanager.is_done() {
|
if self.modmanager.is_done() {
|
||||||
|
|
|
@ -20,4 +20,7 @@ pub struct Args {
|
||||||
/// host either steam or ip.
|
/// host either steam or ip.
|
||||||
#[argh(option)]
|
#[argh(option)]
|
||||||
pub host: Option<String>,
|
pub host: Option<String>,
|
||||||
|
/// noita.exe path
|
||||||
|
#[argh(option)]
|
||||||
|
pub exe_path: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue