Skip to content

Commit

Permalink
fix: Urgent hotfix for adding chunks
Browse files Browse the repository at this point in the history
Fixed added new chunks not working when WolvenKit did not have any custom assemblies registered.
  • Loading branch information
glassfish777 committed Aug 9, 2023
1 parent ed21b23 commit 54e016c
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions WolvenKit/Forms/Dialog/frmAddChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,33 @@ public frmAddChunk(List<string> list = null, bool isVariant = false, bool allowE
list.Sort();

customClasses = CR2WManager.TypeNames;
customClasses.Sort();

classTypes = list.Concat(customClasses).Distinct().ToArray();

if (customClasses?.Any() == true)
{
customClasses.Sort();
classTypes = list.Concat(customClasses).Distinct().ToArray();
}
else
{
classTypes = list.ToArray();
}


vanillaEnums = AssemblyDictionary.EnumNames;
vanillaEnums.Sort();
customEnums = CR2WManager.EnumNames;
customEnums.Sort();


if (customEnums?.Any() == true)
{
customEnums.Sort();
enumTypes = vanillaEnums.Concat(customEnums).Distinct().ToArray();
}
else
{
enumTypes = vanillaEnums.ToArray();
}

enumTypes = vanillaEnums.Concat(customEnums).Distinct().ToArray();

UpdateTypeChoices();
}
Expand Down

0 comments on commit 54e016c

Please sign in to comment.