mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Fix bug with new empty collections.
This commit is contained in:
parent
94b53ce7fa
commit
d4183a03c0
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ public partial class ModCollection
|
||||||
/// Create the always available Empty Collection that will always sit at index 0,
|
/// Create the always available Empty Collection that will always sit at index 0,
|
||||||
/// can not be deleted and does never create a cache.
|
/// can not be deleted and does never create a cache.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ModCollection Empty = CreateEmpty(EmptyCollectionName, 0, 0);
|
public static readonly ModCollection Empty = new(Guid.Empty, EmptyCollectionName, 0, 0, CurrentVersion, [], [], []);
|
||||||
|
|
||||||
/// <summary> The name of a collection. </summary>
|
/// <summary> The name of a collection. </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
@ -150,7 +150,7 @@ public partial class ModCollection
|
||||||
public static ModCollection CreateEmpty(string name, int index, int modCount)
|
public static ModCollection CreateEmpty(string name, int index, int modCount)
|
||||||
{
|
{
|
||||||
Debug.Assert(index >= 0, "Empty collection created with negative index.");
|
Debug.Assert(index >= 0, "Empty collection created with negative index.");
|
||||||
return new ModCollection(Guid.Empty, name, index, 0, CurrentVersion, Enumerable.Repeat((ModSettings?)null, modCount).ToList(), [],
|
return new ModCollection(Guid.NewGuid(), name, index, 0, CurrentVersion, Enumerable.Repeat((ModSettings?)null, modCount).ToList(), [],
|
||||||
[]);
|
[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue