Skip to content

Commit 2657e02

Browse files
committed
Do not ask to enable mod dependencies after auto update
1 parent 47760d3 commit 2657e02

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Fixed
88

99
- Fix mod updates not getting detected sometimes
10+
- Do not ask to enable mod dependencies after auto update
1011

1112
## [1.1.1] 2025-10-03
1213

src/gui/install-dialogs.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const green = '\\c[2]'
1919
const yellow = '\\c[3]'
2020

2121
export 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

Comments
 (0)