Sort Dat54SoundSet entries by ScriptName hash on XML import

This commit is contained in:
dexy 2021-11-13 22:10:15 +11:00
parent 50accd8180
commit 7922cff694

View File

@ -4677,6 +4677,11 @@ namespace CodeWalker.GameFiles
base.ReadXml(node);
Items = XmlRel.ReadItemArray<Dat54SoundSetItem>(node, "Items");
ItemCount = (Items?.Length ?? 0);
if (Items != null)
{
Array.Sort(Items, (a, b) => a.ScriptName.Hash.CompareTo(b.ScriptName.Hash));
}
}
public override void WriteXml(StringBuilder sb, int indent)
{