Collections are packages of their own
A collection is no longer a file inside a mod: it is a package (folder or zip) named after its id with collection.json, cover and optional locale/, shipped in collections/ next to the mods or kept by the player in user://collections/. Covers and texts come from the package; mods do not ship collections.
This commit is contained in:
1 parent
eabb06fcbe
commit
91d93e1368
2 files changed
+4
-4
No files matched your search
@@ -1632,7 +1632,7 @@ namespace Mods.ModManager
|
|||||||
return TranslationServer.Translate("mod_manager/collection_json_id_changed");
|
return TranslationServer.Translate("mod_manager/collection_json_id_changed");
|
||||||
|
|
||||||
parsed.Origin = ModCollectionOrigin.User;
|
parsed.Origin = ModCollectionOrigin.User;
|
||||||
parsed.SourceModId = OriginalCollection(_currentId)?.SourceModId;
|
parsed.Package = OriginalCollection(_currentId)?.Package;
|
||||||
_overrides[_currentId] = parsed;
|
_overrides[_currentId] = parsed;
|
||||||
RebuildGameSelect();
|
RebuildGameSelect();
|
||||||
Rebuild();
|
Rebuild();
|
||||||
@@ -1650,7 +1650,7 @@ namespace Mods.ModManager
|
|||||||
copy.Id = UniqueGameId();
|
copy.Id = UniqueGameId();
|
||||||
copy.Kind = source.Kind;
|
copy.Kind = source.Kind;
|
||||||
copy.Origin = ModCollectionOrigin.User;
|
copy.Origin = ModCollectionOrigin.User;
|
||||||
copy.SourceModId = source.SourceModId;
|
copy.Package = source.Package;
|
||||||
copy.Name = string.Format(TranslationServer.Translate("mod_manager/collection_copy_name"),
|
copy.Name = string.Format(TranslationServer.Translate("mod_manager/collection_copy_name"),
|
||||||
CollectionText.Resolve(source.GetLocalizedName(TranslationServer.GetLocale())));
|
CollectionText.Resolve(source.GetLocalizedName(TranslationServer.GetLocale())));
|
||||||
copy.Locale = null;
|
copy.Locale = null;
|
||||||
@@ -1772,7 +1772,7 @@ namespace Mods.ModManager
|
|||||||
fork.Id = forkId;
|
fork.Id = forkId;
|
||||||
fork.Kind = ModCollectionKind.Component;
|
fork.Kind = ModCollectionKind.Component;
|
||||||
fork.Origin = ModCollectionOrigin.User;
|
fork.Origin = ModCollectionOrigin.User;
|
||||||
fork.SourceModId = source.SourceModId;
|
fork.Package = source.Package;
|
||||||
_overrides[forkId] = fork;
|
_overrides[forkId] = fork;
|
||||||
_statusMessage = string.Format(TranslationServer.Translate("mod_manager/collection_forked"),
|
_statusMessage = string.Format(TranslationServer.Translate("mod_manager/collection_forked"),
|
||||||
CollectionText.Resolve(source.GetLocalizedName(TranslationServer.GetLocale())));
|
CollectionText.Resolve(source.GetLocalizedName(TranslationServer.GetLocale())));
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Mods.ModManager
|
|||||||
/// own collections can go: a collection a mod or the catalog ships would
|
/// own collections can go: a collection a mod or the catalog ships would
|
||||||
/// come back on the next merge (its edited version is dropped with
|
/// come back on the next merge (its edited version is dropped with
|
||||||
/// "Revert to built-in" instead). Deleting touches only
|
/// "Revert to built-in" instead). Deleting touches only
|
||||||
/// <c>user://collections.json</c> — the mods of the collection stay
|
/// <c>user://collections/</c> — the mods of the collection stay
|
||||||
/// installed and its saves stay on disk (they reappear if a collection
|
/// installed and its saves stay on disk (they reappear if a collection
|
||||||
/// with the same id comes back), which the confirmation spells out.
|
/// with the same id comes back), which the confirmation spells out.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in new issue
Block a user