mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Notification on invalid collection names.
This commit is contained in:
parent
183b59305a
commit
46bf3d7391
1 changed files with 9 additions and 2 deletions
|
|
@ -222,10 +222,17 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
||||||
|
|
||||||
foreach (var file in _saveService.FileNames.CollectionFiles)
|
foreach (var file in _saveService.FileNames.CollectionFiles)
|
||||||
{
|
{
|
||||||
if (!ModCollectionSave.LoadFromFile(file, out var name, out var version, out var settings, out var inheritance)
|
if (!ModCollectionSave.LoadFromFile(file, out var name, out var version, out var settings, out var inheritance))
|
||||||
|| !IsValidName(name))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!IsValidName(name))
|
||||||
|
{
|
||||||
|
// TODO: handle better.
|
||||||
|
Penumbra.ChatService.NotificationMessage($"Collection of unsupported name found: {name} is not a valid collection name.",
|
||||||
|
"Warning", NotificationType.Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ByName(name, out _))
|
if (ByName(name, out _))
|
||||||
{
|
{
|
||||||
Penumbra.ChatService.NotificationMessage($"Duplicate collection found: {name} already exists. Import skipped.",
|
Penumbra.ChatService.NotificationMessage($"Duplicate collection found: {name} already exists. Import skipped.",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue