Skip to content

Commit bf21bf1

Browse files
committed
Don't install library mods that are built into CCLoader3
1 parent 9979cbf commit bf21bf1

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Fix game crash when trying to enable a mod that has missing dependencies
1818
- Show a prompt to enable installed mod dependencies when they are disabled after installation
1919
- Fix an error message being printed when in mod options menu that contains an `OBJECT_SLIDER` and resizing a window
20+
- Don't install library mods that are built into CCLoader3 (`input-api`, `extension-assert-preloader`, `nax-module-cache`)
2021

2122
## [1.0.4] 2025-06-26
2223

lang/en_US.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@
193193
"missingExtension": "Mod \\c[3][modName] ([modId])\\c[0] has is missing an required extension: \\c[3][extensionName] ([extensionId])\\c[0]",
194194
"missingDependency": "Mod \\c[3][modName] ([modId])\\c[0] has is missing a required dependency: \\c[3][missingModId]\\c[0]",
195195
"differentCCLoaderMajor": "Mod \\c[3][modName] ([modId])\\c[0] depends on a differect major version of CCLoader than is installed. Installed: \\c[3][versionInstalled]\\c[0], expected: \\c[3][versionExpected]\\c[0]",
196-
"simplifyOnNonCCLoader2": "Mod \"[modName]\" ([modId]) depends Simplify, which is CCLoader 2 specific. Major CCLoader version installed: [version]",
197196
"virtualVersionRequirement": "\\c[3][name] ([id])\\c[0] version does not meat the requirement: \\c[3][req]\\c[0]",
198197
"versionRequirement": "Dependency \\c[3][name] ([id])\\c[0] cannot be resolved, version range \\c[3][req]\\c[0] was not met. Database has only \\c[3][reqHas]\\c[0]",
199198
"digestMismatch": "Mod \\c[3][modName] ([modId])\\c[0] digest mismatch. Contact mod developers in the modding discord."

src/gui/list.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ModEntry } from '../types'
22
import { ModDB } from '../moddb'
33
import { Fliters, createFuzzyFilteredModList } from '../filters'
44
import { LocalMods } from '../local-mods'
5-
import { InstallQueue } from '../mod-installer'
5+
import { InstallQueue, ModInstaller } from '../mod-installer'
66
import { Lang } from '../lang-manager'
77
import { Opts } from '../options'
88
import { isFullMode } from '../plugin'
@@ -293,6 +293,7 @@ modmanager.gui.MenuList = sc.ListTabbedPane.extend({
293293
populateOnline(list, _, sort: modmanager.gui.MENU_SORT_ORDER) {
294294
let mods = Object.values(ModDB.removeModDuplicatesAndResolveTesting(ModDB.modRecord))
295295
mods = createFuzzyFilteredModList(this.filters, mods)
296+
mods = mods.filter(mod => !ModInstaller.virtualMods[mod.id])
296297
this.sortModEntries(mods, sort)
297298
this.populateListFromMods(mods, list)
298299
},

src/mod-installer.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ModManager from './plugin'
77
import { Lang } from './lang-manager'
88
import { semver } from './library-providers'
99
import { Unzipped, unzip } from 'fflate/browser'
10+
import { SemVer } from 'semver'
1011

1112
const fs: typeof import('fs') = window.require?.('fs')
1213
const path: typeof import('path') = window.require?.('path')
@@ -129,6 +130,15 @@ export class ModInstaller {
129130
if (ModManager.mod.isCCL3) {
130131
// @ts-expect-error missing ccloader3 typings :sob:
131132
this.modsDir = modloader.config.modsDirs[0]
133+
134+
for (const [id, version] of modloader.virtualPackages.entries()) {
135+
this.virtualMods[id] = {
136+
id,
137+
name: id,
138+
description: '',
139+
version: version.version,
140+
}
141+
}
132142
} else {
133143
this.modsDir = `assets/mods/`
134144
}
@@ -201,19 +211,6 @@ export class ModInstaller {
201211
throw new Error(msg)
202212
}
203213
}
204-
205-
if (dep.id == 'Simplify' && localMajor != 2) {
206-
/* if this option is false, an error will get thrown when getModDependencies reaches CCLoader anyways */
207-
if (Opts.ignoreCCLoaderMajorVersion) {
208-
console.warn(
209-
Lang.errors.install.simplifyOnNonCCLoader2
210-
.replace(/\[modName\]/, prepareModName(mod))
211-
.replace(/\[modId\]/, mod.id)
212-
.replace(/\[version\]/, localMajor.toString())
213-
)
214-
continue
215-
}
216-
}
217214
}
218215

219216
this.setOrAddNewer(deps, dep, reqVersionRange)

0 commit comments

Comments
 (0)