Skip to content

Commit

Permalink
Fixed face keyword applied to NPCs with aborted face patching
Browse files Browse the repository at this point in the history
  • Loading branch information
Piranha91 committed Nov 24, 2023
1 parent ddfeaf0 commit 2f4fda1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions SynthEBD/Patcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,17 @@ private void MainLoop(
_combinationLog.LogAssignment(currentNPCInfo, assignedCombinations, assignedPaths);
if (npcRecord.Keywords == null) { npcRecord.Keywords = new Noggog.ExtendedList<IFormLinkGetter<IKeywordGetter>>(); }

if (_patcherState.TexMeshSettings.bLegacyEBDMode)
if (npcRecord.HeadTexture.TryGetModKey(out var headTextureSourceMod) && headTextureSourceMod.Equals(outputMod.ModKey)) // if the patcher tried to patch but didn't set a head texture, don't apply the headpart script to this NPC
{
npcRecord.Keywords.Add(EBDFaceKW);
npcRecord.Keywords.Add(EBDScriptKW);
}
else
{
npcRecord.Keywords.Add(synthEBDFaceKW);
if (_patcherState.TexMeshSettings.bLegacyEBDMode)
{
npcRecord.Keywords.Add(EBDFaceKW);
npcRecord.Keywords.Add(EBDScriptKW);
}
else
{
npcRecord.Keywords.Add(synthEBDFaceKW);
}
}
RecordGenerator.AddCustomKeywordsToNPC(assignedCombinations, npcRecord, outputMod);

Expand Down

0 comments on commit 2f4fda1

Please sign in to comment.