Skip to content

Commit

Permalink
Headpart Tracker fix
Browse files Browse the repository at this point in the history
Tracker reinitializes at patching start even if headpart randomization is disabled, because it's still required if TexMesh settings produce new head parts.
  • Loading branch information
Piranha91 authored and Piranha91 committed Aug 29, 2022
1 parent eda9539 commit 830c13a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SynthEBD/Patcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ public async Task RunPatcher()
if (removedHeadParts)
{
Logger.LogMessage("Some head parts will not be distributed because they are no longer present in your load order.");
}

HeadPartTracker = new Dictionary<FormKey, HeadPartSelection>();
}

HeadPartPreprocessing.CompilePresetRaces(copiedHeadPartSettings);
HeadPartPreprocessing.FlattenGroupAttributes(copiedHeadPartSettings);
Expand All @@ -174,6 +172,8 @@ public async Task RunPatcher()

int npcCounter = 0;
HashSet<Npc> headPartNPCs = new HashSet<Npc>();
HeadPartTracker = new Dictionary<FormKey, HeadPartSelection>(); // needs re-initialization even if headpart distribution is disabled because TexMesh settings can also produce headparts.

_statusBar.ProgressBarMax = allNPCs.Count();
_statusBar.ProgressBarCurrent = 0;
_statusBar.ProgressBarDisp = "Patched " + _statusBar.ProgressBarCurrent + " NPCs";
Expand Down

0 comments on commit 830c13a

Please sign in to comment.