Implement some more helper methods and proper copy in modlist
This commit is contained in:
@@ -196,6 +196,18 @@ class ModList {
|
||||
}
|
||||
}
|
||||
|
||||
void enableMods(List<String> modIds) {
|
||||
for (final modId in modIds) {
|
||||
setEnabled(modId, true);
|
||||
}
|
||||
}
|
||||
|
||||
void disableMods(List<String> modIds) {
|
||||
for (final modId in modIds) {
|
||||
setEnabled(modId, false);
|
||||
}
|
||||
}
|
||||
|
||||
List<List<String>> checkIncompatibilities() {
|
||||
List<List<String>> conflicts = [];
|
||||
List<String> activeModIds = activeMods.keys.toList();
|
||||
@@ -512,8 +524,8 @@ class ModList {
|
||||
configPath: configPath ?? this.configPath,
|
||||
modsPath: modsPath ?? this.modsPath,
|
||||
);
|
||||
newModlist.mods = mods ?? this.mods;
|
||||
newModlist.activeMods = activeMods ?? this.activeMods;
|
||||
newModlist.mods = Map.from(mods ?? this.mods);
|
||||
newModlist.activeMods = Map.from(activeMods ?? this.activeMods);
|
||||
return newModlist;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user