mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 20:33:43 +01:00
Add some log statements.
This commit is contained in:
parent
717ddba8d2
commit
4378c826f0
7 changed files with 25 additions and 9 deletions
|
|
@ -325,6 +325,7 @@ public class ActiveCollections : ISavable, IDisposable
|
|||
/// </summary>
|
||||
private void LoadCollections()
|
||||
{
|
||||
Penumbra.Log.Debug("[Collections] Reading collection assignments...");
|
||||
var configChanged = !Load(_saveService.FileNames, out var jObject);
|
||||
|
||||
// Load the default collection. If the string does not exist take the Default name if no file existed or the Empty name if one existed.
|
||||
|
|
@ -389,6 +390,8 @@ public class ActiveCollections : ISavable, IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
Penumbra.Log.Debug("[Collections] Loaded non-individual collection assignments.");
|
||||
|
||||
configChanged |= ActiveCollectionMigration.MigrateIndividualCollections(_storage, Individuals, jObject);
|
||||
configChanged |= Individuals.ReadJObject(_saveService, this, jObject[nameof(Individuals)] as JArray, _storage);
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
/// </summary>
|
||||
private void ReadCollections(out ModCollection defaultNamedCollection)
|
||||
{
|
||||
Penumbra.Log.Debug("[Collections] Reading saved collections...");
|
||||
foreach (var file in _saveService.FileNames.CollectionFiles)
|
||||
{
|
||||
if (!ModCollectionSave.LoadFromFile(file, out var name, out var version, out var settings, out var inheritance))
|
||||
|
|
@ -202,6 +203,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
}
|
||||
|
||||
defaultNamedCollection = SetDefaultNamedCollection();
|
||||
Penumbra.Log.Debug($"[Collections] Found {Count} saved collections.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ public partial class IndividualCollections
|
|||
public bool ReadJObject(SaveService saver, ActiveCollections parent, JArray? obj, CollectionStorage storage)
|
||||
{
|
||||
if (_actorService.Valid)
|
||||
return ReadJObjectInternal(obj, storage);
|
||||
{
|
||||
var ret = ReadJObjectInternal(obj, storage);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Func()
|
||||
{
|
||||
|
|
@ -38,14 +41,19 @@ public partial class IndividualCollections
|
|||
_actorService.FinishedCreation -= Func;
|
||||
}
|
||||
|
||||
Penumbra.Log.Debug("[Collections] Delayed reading individual assignments until actor service is ready...");
|
||||
_actorService.FinishedCreation += Func;
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ReadJObjectInternal(JArray? obj, CollectionStorage storage)
|
||||
{
|
||||
Penumbra.Log.Debug("[Collections] Reading individual assignments...");
|
||||
if (obj == null)
|
||||
{
|
||||
Penumbra.Log.Debug($"[Collections] Finished reading {Count} individual assignments...");
|
||||
return true;
|
||||
}
|
||||
|
||||
var changes = false;
|
||||
foreach (var data in obj)
|
||||
|
|
@ -58,7 +66,7 @@ public partial class IndividualCollections
|
|||
{
|
||||
changes = true;
|
||||
Penumbra.Messager.NotificationMessage("Could not load an unknown individual collection, removed.",
|
||||
NotificationType.Warning);
|
||||
NotificationType.Error);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +94,8 @@ public partial class IndividualCollections
|
|||
}
|
||||
}
|
||||
|
||||
Penumbra.Log.Debug($"Finished reading {Count} individual assignments...");
|
||||
|
||||
return changes;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue