"improving" pair handler clean up and some other stuff
This commit is contained in:
@@ -57,7 +57,8 @@ public static class VariousExtensions
|
||||
}
|
||||
|
||||
public static Dictionary<ObjectKind, HashSet<PlayerChanges>> CheckUpdatedData(this CharacterData newData, Guid applicationBase,
|
||||
CharacterData? oldData, ILogger logger, IPairPerformanceSubject cachedPlayer, bool forceApplyCustomization, bool forceApplyMods)
|
||||
CharacterData? oldData, ILogger logger, IPairPerformanceSubject cachedPlayer, bool forceApplyCustomization, bool forceApplyMods,
|
||||
bool suppressForcedRedrawOnForcedModApply = false)
|
||||
{
|
||||
oldData ??= new();
|
||||
|
||||
@@ -78,6 +79,7 @@ public static class VariousExtensions
|
||||
|
||||
bool hasNewAndOldFileReplacements = newFileReplacements != null && existingFileReplacements != null;
|
||||
bool hasNewAndOldGlamourerData = newGlamourerData != null && existingGlamourerData != null;
|
||||
var forceRedrawOnForcedApply = forceApplyMods && !suppressForcedRedrawOnForcedModApply;
|
||||
|
||||
if (hasNewButNotOldFileReplacements || hasOldButNotNewFileReplacements || hasNewButNotOldGlamourerData || hasOldButNotNewGlamourerData)
|
||||
{
|
||||
@@ -100,7 +102,7 @@ public static class VariousExtensions
|
||||
{
|
||||
logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (FileReplacements not equal) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.ModFiles);
|
||||
charaDataToUpdate[objectKind].Add(PlayerChanges.ModFiles);
|
||||
if (forceApplyMods || objectKind != ObjectKind.Player)
|
||||
if (objectKind != ObjectKind.Player || forceRedrawOnForcedApply)
|
||||
{
|
||||
charaDataToUpdate[objectKind].Add(PlayerChanges.ForcedRedraw);
|
||||
}
|
||||
@@ -167,7 +169,7 @@ public static class VariousExtensions
|
||||
if (objectKind != ObjectKind.Player) continue;
|
||||
|
||||
bool manipDataDifferent = !string.Equals(oldData.ManipulationData, newData.ManipulationData, StringComparison.Ordinal);
|
||||
if (manipDataDifferent || forceApplyMods)
|
||||
if (manipDataDifferent || forceRedrawOnForcedApply)
|
||||
{
|
||||
logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (Diff manip data) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.ModManip);
|
||||
charaDataToUpdate[objectKind].Add(PlayerChanges.ModManip);
|
||||
|
||||
Reference in New Issue
Block a user