diff --git a/CustomizePlus/Profiles/ProfileManager.cs b/CustomizePlus/Profiles/ProfileManager.cs index b98a38a..195a499 100644 --- a/CustomizePlus/Profiles/ProfileManager.cs +++ b/CustomizePlus/Profiles/ProfileManager.cs @@ -95,7 +95,7 @@ public class ProfileManager : IDisposable public void LoadProfiles() { - _logger.Information("Loading profiles from directory..."); + _logger.Information("Loading profiles..."); //todo: hot reload was not tested //save temp profiles @@ -105,6 +105,8 @@ public class ProfileManager : IDisposable List<(Profile, string)> invalidNames = new(); foreach (var file in _saveService.FileNames.Profiles()) { + _logger.Debug($"Reading profile {file.FullName}"); + try { var text = File.ReadAllText(file.FullName); @@ -146,7 +148,7 @@ public class ProfileManager : IDisposable _logger.Information( $"Moved {invalidNames.Count - failed} profiles to correct names.{(failed > 0 ? $" Failed to move {failed} profiles to correct names." : string.Empty)}"); - _logger.Information("Directory load complete"); + _logger.Information("Profiles load complete"); _event.Invoke(ProfileChanged.Type.ReloadedAll, null, null); } @@ -506,7 +508,7 @@ public class ProfileManager : IDisposable return profile.CharacterName.Text == name && (!profile.LimitLookupToOwnedObjects || (actorIdentifier.Type == IdentifierType.Owned && - actorIdentifier.PlayerName != _actorManager.GetCurrentPlayer().PlayerName)); + actorIdentifier.PlayerName == _actorManager.GetCurrentPlayer().PlayerName)); } if (_templateEditorManager.IsEditorActive && _templateEditorManager.EditorProfile.Enabled && IsProfileAppliesToCurrentActor(_templateEditorManager.EditorProfile)) diff --git a/CustomizePlus/Templates/TemplateManager.cs b/CustomizePlus/Templates/TemplateManager.cs index 2048c2b..1df8a31 100644 --- a/CustomizePlus/Templates/TemplateManager.cs +++ b/CustomizePlus/Templates/TemplateManager.cs @@ -45,12 +45,13 @@ public class TemplateManager public void LoadTemplates() { - _logger.Information("Loading templates from directory..."); + _logger.Information("Loading templates..."); _templates.Clear(); List<(Template, string)> invalidNames = new(); foreach (var file in _saveService.FileNames.Templates()) { + _logger.Debug($"Reading template {file.FullName}"); try { var text = File.ReadAllText(file.FullName); @@ -77,7 +78,7 @@ public class TemplateManager _logger.Information( $"Moved {invalidNames.Count - failed} templates to correct names.{(failed > 0 ? $" Failed to move {failed} templates to correct names." : string.Empty)}"); - _logger.Information("Directory load complete"); + _logger.Information("Templates load complete"); _event.Invoke(TemplateChanged.Type.ReloadedAll, null, null); }