Add copy with to modlist
This commit is contained in:
@@ -501,6 +501,21 @@ class ModList {
|
|||||||
}
|
}
|
||||||
return generateLoadOrder();
|
return generateLoadOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModList copyWith({
|
||||||
|
String? configPath,
|
||||||
|
String? modsPath,
|
||||||
|
Map<String, Mod>? mods,
|
||||||
|
Map<String, bool>? activeMods,
|
||||||
|
}) {
|
||||||
|
final newModlist = ModList(
|
||||||
|
configPath: configPath ?? this.configPath,
|
||||||
|
modsPath: modsPath ?? this.modsPath,
|
||||||
|
);
|
||||||
|
newModlist.mods = mods ?? this.mods;
|
||||||
|
newModlist.activeMods = activeMods ?? this.activeMods;
|
||||||
|
return newModlist;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _expansionNameFromId(String id) {
|
String _expansionNameFromId(String id) {
|
||||||
|
Reference in New Issue
Block a user