mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 14:23:43 +01:00
Finish CollectionTab rework.
This commit is contained in:
parent
25cb46525a
commit
9c4f7b7562
22 changed files with 1350 additions and 1543 deletions
|
|
@ -113,7 +113,8 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
return false;
|
||||
}
|
||||
|
||||
var newCollection = duplicate?.Duplicate(name, _collections.Count) ?? ModCollection.CreateEmpty(name, _collections.Count, _modStorage.Count);
|
||||
var newCollection = duplicate?.Duplicate(name, _collections.Count)
|
||||
?? ModCollection.CreateEmpty(name, _collections.Count, _modStorage.Count);
|
||||
_collections.Add(newCollection);
|
||||
|
||||
_saveService.ImmediateSave(new ModCollectionSave(_modStorage, newCollection));
|
||||
|
|
@ -195,6 +196,13 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
|
||||
/// <summary> Remove a specific setting for not currently-installed mods from the given collection. </summary>
|
||||
public void CleanUnavailableSetting(ModCollection collection, string? setting)
|
||||
{
|
||||
if (setting != null && ((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings).Remove(setting))
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if a name is valid to use for a collection.
|
||||
/// Does not check for uniqueness.
|
||||
|
|
@ -214,7 +222,8 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
|
||||
foreach (var file in _saveService.FileNames.CollectionFiles)
|
||||
{
|
||||
if (!ModCollectionSave.LoadFromFile(file, out var name, out var version, out var settings, out var inheritance) || !IsValidName(name))
|
||||
if (!ModCollectionSave.LoadFromFile(file, out var name, out var version, out var settings, out var inheritance)
|
||||
|| !IsValidName(name))
|
||||
continue;
|
||||
|
||||
if (ByName(name, out _))
|
||||
|
|
@ -224,7 +233,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
continue;
|
||||
}
|
||||
|
||||
var collection = ModCollection.CreateFromData(_saveService, _modStorage, name, version, Count, settings);
|
||||
var collection = ModCollection.CreateFromData(_saveService, _modStorage, name, version, Count, settings);
|
||||
var correctName = _saveService.FileNames.CollectionFile(collection);
|
||||
if (file.FullName != correctName)
|
||||
Penumbra.ChatService.NotificationMessage($"Collection {file.Name} does not correspond to {collection.Name}.", "Warning",
|
||||
|
|
@ -305,4 +314,4 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,150 +430,13 @@ public static class CollectionTypeExtensions
|
|||
public static string ToDescription(this CollectionType collectionType)
|
||||
=> collectionType switch
|
||||
{
|
||||
CollectionType.Yourself => "This collection applies to your own character, regardless of its name.\n"
|
||||
+ "It takes precedence before all other collections except for explicitly named individual collections.",
|
||||
CollectionType.NonPlayerChild =>
|
||||
"This collection applies to all non-player characters with a child body-type.\n"
|
||||
+ "It takes precedence before all other collections except for explicitly named individual collections.",
|
||||
CollectionType.NonPlayerElderly =>
|
||||
"This collection applies to all non-player characters with an elderly body-type.\n"
|
||||
+ "It takes precedence before all other collections except for explicitly named individual collections.",
|
||||
CollectionType.MalePlayerCharacter =>
|
||||
"This collection applies to all male player characters that do not have a more specific character or racial collections associated.",
|
||||
CollectionType.MaleNonPlayerCharacter =>
|
||||
"This collection applies to all human male non-player characters except those explicitly named. It takes precedence before the default and racial collections.",
|
||||
CollectionType.MaleMidlander =>
|
||||
"This collection applies to all male player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHighlander =>
|
||||
"This collection applies to all male player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleWildwood =>
|
||||
"This collection applies to all male player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDuskwight =>
|
||||
"This collection applies to all male player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MalePlainsfolk =>
|
||||
"This collection applies to all male player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDunesfolk =>
|
||||
"This collection applies to all male player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeekerOfTheSun =>
|
||||
"This collection applies to all male player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleKeeperOfTheMoon =>
|
||||
"This collection applies to all male player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeawolf =>
|
||||
"This collection applies to all male player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHellsguard =>
|
||||
"This collection applies to all male player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRaen =>
|
||||
"This collection applies to all male player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleXaela =>
|
||||
"This collection applies to all male player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHelion =>
|
||||
"This collection applies to all male player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleLost =>
|
||||
"This collection applies to all male player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRava =>
|
||||
"This collection applies to all male player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleVeena =>
|
||||
"This collection applies to all male player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleMidlanderNpc =>
|
||||
"This collection applies to all male non-player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHighlanderNpc =>
|
||||
"This collection applies to all male non-player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleWildwoodNpc =>
|
||||
"This collection applies to all male non-player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDuskwightNpc =>
|
||||
"This collection applies to all male non-player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MalePlainsfolkNpc =>
|
||||
"This collection applies to all male non-player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDunesfolkNpc =>
|
||||
"This collection applies to all male non-player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeekerOfTheSunNpc =>
|
||||
"This collection applies to all male non-player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleKeeperOfTheMoonNpc =>
|
||||
"This collection applies to all male non-player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeawolfNpc =>
|
||||
"This collection applies to all male non-player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHellsguardNpc =>
|
||||
"This collection applies to all male non-player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRaenNpc =>
|
||||
"This collection applies to all male non-player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleXaelaNpc =>
|
||||
"This collection applies to all male non-player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHelionNpc =>
|
||||
"This collection applies to all male non-player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleLostNpc =>
|
||||
"This collection applies to all male non-player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRavaNpc =>
|
||||
"This collection applies to all male non-player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleVeenaNpc =>
|
||||
"This collection applies to all male non-player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlayerCharacter =>
|
||||
"This collection applies to all female player characters that do not have a more specific character or racial collections associated.",
|
||||
CollectionType.FemaleNonPlayerCharacter =>
|
||||
"This collection applies to all human female non-player characters except those explicitly named. It takes precedence before the default and racial collections.",
|
||||
CollectionType.FemaleMidlander =>
|
||||
"This collection applies to all female player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHighlander =>
|
||||
"This collection applies to all female player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleWildwood =>
|
||||
"This collection applies to all female player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDuskwight =>
|
||||
"This collection applies to all female player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlainsfolk =>
|
||||
"This collection applies to all female player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDunesfolk =>
|
||||
"This collection applies to all female player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeekerOfTheSun =>
|
||||
"This collection applies to all female player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleKeeperOfTheMoon =>
|
||||
"This collection applies to all female player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeawolf =>
|
||||
"This collection applies to all female player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHellsguard =>
|
||||
"This collection applies to all female player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRaen =>
|
||||
"This collection applies to all female player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleXaela =>
|
||||
"This collection applies to all female player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHelion =>
|
||||
"This collection applies to all female player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleLost =>
|
||||
"This collection applies to all female player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRava =>
|
||||
"This collection applies to all female player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleVeena =>
|
||||
"This collection applies to all female player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleMidlanderNpc =>
|
||||
"This collection applies to all female non-player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHighlanderNpc =>
|
||||
"This collection applies to all female non-player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleWildwoodNpc =>
|
||||
"This collection applies to all female non-player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDuskwightNpc =>
|
||||
"This collection applies to all female non-player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlainsfolkNpc =>
|
||||
"This collection applies to all female non-player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDunesfolkNpc =>
|
||||
"This collection applies to all female non-player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeekerOfTheSunNpc =>
|
||||
"This collection applies to all female non-player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleKeeperOfTheMoonNpc =>
|
||||
"This collection applies to all female non-player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeawolfNpc =>
|
||||
"This collection applies to all female non-player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHellsguardNpc =>
|
||||
"This collection applies to all female non-player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRaenNpc =>
|
||||
"This collection applies to all female non-player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleXaelaNpc =>
|
||||
"This collection applies to all female non-player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHelionNpc =>
|
||||
"This collection applies to all female non-player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleLostNpc =>
|
||||
"This collection applies to all female non-player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRavaNpc =>
|
||||
"This collection applies to all female non-player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleVeenaNpc =>
|
||||
"This collection applies to all female non-player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.Default => "World, Music, Furniture, baseline for characters and monsters not specialized.",
|
||||
CollectionType.Interface => "User Interface, Icons, Maps, Styles.",
|
||||
CollectionType.Yourself => "Your characters, regardless of name, race or gender. Applies in the login screen.",
|
||||
CollectionType.MalePlayerCharacter => "Baseline for male player characters.",
|
||||
CollectionType.FemalePlayerCharacter => "Baseline for female player characters.",
|
||||
CollectionType.MaleNonPlayerCharacter => "Baseline for humanoid male non-player characters.",
|
||||
CollectionType.FemaleNonPlayerCharacter => "Baseline for humanoid female non-player characters.",
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue