mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-18 11:44:42 +02:00
feat(mods): enhance mod management with profile controls and dependency checks
- Added dedicated profile control in the MODS panel for easier profile management. - Implemented dependency checking during mod installation and updates to ensure compatibility. - Improved manifest parsing to support GitHub repository hints for dependencies. - Enhanced UI interactions for saving and renaming profiles. - Updated tests to cover new functionality and ensure stability.
This commit is contained in:
@@ -1162,6 +1162,18 @@ seedOpts.modProfiles = {}
|
||||
ModProfile.ensureFirst(seedOpts, ms.status.available, {})
|
||||
check(#seedOpts.modProfiles == 0, "seeding never runs twice")
|
||||
|
||||
local LauncherMods = require("src.mods.LauncherMods")
|
||||
local testProfOpts = { activeProfile = "P1", modProfiles = { { name = "P1", enabled = { a = true } } } }
|
||||
local dupSnap = LauncherMods.duplicateProfile("P1", testProfOpts)
|
||||
check(dupSnap and dupSnap.name == "P1 (Copy)" and testProfOpts.activeProfile == "P1 (Copy)",
|
||||
"duplicateProfile creates P1 (Copy) and activates it")
|
||||
check(LauncherMods.renameProfile("P1 (Copy)", "RenamedP", testProfOpts) == true,
|
||||
"renameProfile renames active profile")
|
||||
check(testProfOpts.activeProfile == "RenamedP", "activeProfile updates on rename")
|
||||
check(LauncherMods.deleteProfile("RenamedP", testProfOpts) == true, "deleteProfile removes profile")
|
||||
check(#testProfOpts.modProfiles == 1 and testProfOpts.modProfiles[1].name == "P1", "only original profile remains")
|
||||
check(testProfOpts.activeProfile == "P1", "activeProfile falls back to remaining profile")
|
||||
|
||||
-- permissions rows
|
||||
local permy = manifest("permy", { permissions = { "network" } })
|
||||
local msP = ManagerState.new(managerGame(fakeLoader({ permy })))
|
||||
|
||||
Reference in New Issue
Block a user