File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ use crate::{
21
21
steam_helper:: SteamState ,
22
22
} ;
23
23
24
+ use crate :: util:: args:: Args ;
25
+
24
26
#[ derive( Default ) ]
25
27
enum State {
26
28
#[ default]
@@ -150,9 +152,16 @@ impl Modmanager {
150
152
ui : & mut Ui ,
151
153
settings : & mut ModmanagerSettings ,
152
154
steam_state : Option < & mut SteamState > ,
155
+ args : & Args ,
153
156
) {
154
157
if let State :: JustStarted = self . state {
155
- if check_path_valid ( & settings. game_exe_path ) {
158
+ if let Some ( path) = & args. exe_path {
159
+ if check_path_valid ( path) {
160
+ settings. game_exe_path = path. to_path_buf ( ) ;
161
+ info ! ( "Path from command line is valid, checking mod now" ) ;
162
+ self . state = State :: PreCheckMod ;
163
+ }
164
+ } else if check_path_valid ( & settings. game_exe_path ) {
156
165
info ! ( "Path is valid, checking mod now" ) ;
157
166
self . state = State :: PreCheckMod ;
158
167
} else {
Original file line number Diff line number Diff line change @@ -1501,6 +1501,7 @@ impl eframe::App for App {
1501
1501
ui,
1502
1502
& mut self . modmanager_settings ,
1503
1503
self . steam_state . as_mut ( ) . ok ( ) ,
1504
+ & self . args ,
1504
1505
)
1505
1506
} ) ;
1506
1507
if self . modmanager . is_done ( ) {
Original file line number Diff line number Diff line change @@ -20,4 +20,7 @@ pub struct Args {
20
20
/// host either steam or ip.
21
21
#[ argh( option) ]
22
22
pub host : Option < String > ,
23
+ /// noita.exe path
24
+ #[ argh( option) ]
25
+ pub exe_path : Option < PathBuf > ,
23
26
}
You can’t perform that action at this time.
0 commit comments