Skip to content

Commit

Permalink
Improved ccloader3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
krypciak committed Aug 8, 2024
1 parent 9fe8d07 commit 435d2f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Fixed mod installation successful dialog poping up before the installation finished
- Prevent mod description and mod tags overlapping each other
- Fixed the confirmation buttons for the mod installation prompt getting off-screen when the mod list is too big
- Improved ccloader3 compatibility

## [0.9.17] 2024-08-05

Expand Down
11 changes: 10 additions & 1 deletion src/local-mods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ declare global {
var activeMods: CCL2Mod[]
var inactiveMods: CCL2Mod[]
var versions: { ccloader: string; crosscode: string }
/* ccl3 types only */
namespace modloader {
const _runtimeMod: Mod
}
}

export class LocalMods {
Expand All @@ -47,6 +51,11 @@ export class LocalMods {
disableUninstall: true,
disableUpdate: true,
},
'ccloader-runtime': {
disableDisabling: true,
disableUninstall: true,
disableUpdate: true,
},
}

static async initAll() {
Expand Down Expand Up @@ -180,7 +189,7 @@ export class LocalMods {
}

private static convertCCL3Mod(mod: Mod): ModEntryLocal {
const active = sc.options.get(`modEnabled-${mod.id}`) as boolean
const active = mod == modloader._runtimeMod ? true : (sc.options.get(`modEnabled-${mod.id}`) as boolean)
return {
database: 'LOCAL',
isLocal: true,
Expand Down

0 comments on commit 435d2f6

Please sign in to comment.