Added profile priority system, fixed a few issues
This commit is contained in:
@@ -413,6 +413,7 @@ public unsafe sealed class ArmatureManager : IDisposable
|
||||
type is not ProfileChanged.Type.TemporaryProfileDeleted &&
|
||||
type is not ProfileChanged.Type.AddedCharacter &&
|
||||
type is not ProfileChanged.Type.RemovedCharacter &&
|
||||
type is not ProfileChanged.Type.PriorityChanged &&
|
||||
type is not ProfileChanged.Type.ChangedDefaultProfile &&
|
||||
type is not ProfileChanged.Type.ChangedDefaultLocalPlayerProfile)
|
||||
return;
|
||||
@@ -438,6 +439,26 @@ public unsafe sealed class ArmatureManager : IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
if(type == ProfileChanged.Type.PriorityChanged)
|
||||
{
|
||||
if (!profile.Enabled)
|
||||
return;
|
||||
|
||||
foreach (var character in profile.Characters)
|
||||
{
|
||||
if (!character.IsValid)
|
||||
continue;
|
||||
|
||||
foreach (var armature in GetArmaturesForCharacter(character))
|
||||
{
|
||||
armature.IsPendingProfileRebind = true;
|
||||
_logger.Debug($"ArmatureManager.OnProfileChange profile {profile} priority changed, planning rebind for armature {armature}");
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == ProfileChanged.Type.Toggled)
|
||||
{
|
||||
if (!profile.Enabled && profile.Armatures.Count == 0)
|
||||
|
||||
Reference in New Issue
Block a user