@@ -19,7 +19,7 @@ const green = '\\c[2]'
1919const yellow = '\\c[3]'
2020
2121export class ModInstallDialogs {
22- static showModInstallDialog ( ) {
22+ static showModInstallDialog ( autoupdate ?: boolean ) {
2323 const deps = InstallQueue . values ( ) . filter ( mod => mod . installStatus == 'dependency' )
2424 const toInstall = InstallQueue . values ( ) . filter ( mod => mod . installStatus == 'new' )
2525 const toUpdate = InstallQueue . values ( ) . filter ( mod => mod . installStatus == 'update' )
@@ -155,11 +155,13 @@ export class ModInstallDialogs {
155155
156156 sc . BUTTON_SOUND . shop_cash . play ( )
157157
158- for ( const mod of toInstall ) {
159- const { deps } = LocalMods . findDeps ( mod )
160- const inactiveDependencies = [ ...deps ] . filter ( mod => ! mod . active )
161- if ( inactiveDependencies . length > 0 ) {
162- await ModInstallDialogs . showEnableModDialog ( mod as unknown as ModEntryLocal )
158+ if ( ! autoupdate ) {
159+ for ( const mod of toInstall ) {
160+ const { deps } = LocalMods . findDeps ( mod )
161+ const inactiveDependencies = [ ...deps ] . filter ( mod => ! mod . active )
162+ if ( inactiveDependencies . length > 0 ) {
163+ await ModInstallDialogs . showEnableModDialog ( mod as unknown as ModEntryLocal )
164+ }
163165 }
164166 }
165167
@@ -186,7 +188,7 @@ export class ModInstallDialogs {
186188 [ ig . lang . get ( 'sc.gui.dialogs.yes' ) , ig . lang . get ( 'sc.gui.dialogs.no' ) ] ,
187189 button => {
188190 if ( button . data == 0 ) {
189- this . showModInstallDialog ( )
191+ this . showModInstallDialog ( true )
190192 } else {
191193 InstallQueue . clear ( )
192194 }
0 commit comments