Skip to content

Commit

Permalink
Temporary for-foreach change
Browse files Browse the repository at this point in the history
  • Loading branch information
Piranha91 committed Jan 20, 2024
1 parent d60857d commit f566651
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions SynthEBD/Patcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,8 @@ private void MainLoop(
int npcCount = npcCollection.Count();
var npcArray = npcCollection.ToArray();

for (int i = 0; i < npcCount; i++)
foreach (var npc in npcArray)
{
var npc = npcArray[i];
_statusBar.ProgressBarCurrent++;

var currentNPCInfo = _npcInfoFactory(npc, linkedGroupsHashSet, generatedLinkGroups);
Expand Down Expand Up @@ -656,8 +655,7 @@ private void MainLoop(
{
if (_patcherState.TexMeshSettings.StrippedSkinWNAMs.Any())
{
npc = _recordGenerator.StripSpecifiedSkinArmor(npc, _environmentProvider.LinkCache, outputMod);
currentNPCInfo.NPC = npc;
currentNPCInfo.NPC = _recordGenerator.StripSpecifiedSkinArmor(npc, _environmentProvider.LinkCache, outputMod);
}
var npcRecord = outputMod.Npcs.GetOrAddAsOverride(currentNPCInfo.NPC);
var npcObjectMap = new Dictionary<string, dynamic>(StringComparer.OrdinalIgnoreCase) { { "", npcRecord } };
Expand Down

0 comments on commit f566651

Please sign in to comment.