mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-02-17 02:17:54 +08:00
Sort Dat54SoundSet entries by ScriptName hash on XML import
This commit is contained in:
parent
50accd8180
commit
7922cff694
@ -4677,6 +4677,11 @@ namespace CodeWalker.GameFiles
|
|||||||
base.ReadXml(node);
|
base.ReadXml(node);
|
||||||
Items = XmlRel.ReadItemArray<Dat54SoundSetItem>(node, "Items");
|
Items = XmlRel.ReadItemArray<Dat54SoundSetItem>(node, "Items");
|
||||||
ItemCount = (Items?.Length ?? 0);
|
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)
|
public override void WriteXml(StringBuilder sb, int indent)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user