sort items in generated overlay resource files

This makes them easier to read.
This commit is contained in:
Dmitry Muhomor 2023-08-26 19:21:50 +03:00 committed by Daniel Micay
parent 5c9e695863
commit bcc612c622

View file

@ -436,7 +436,11 @@ export async function serializePartOverlays(partValues: PartResValues, overlaysD
})
let valuesObj = { resources: {} as { [type: string]: Array<any> } }
for (let [{ type, key }, value] of values.entries()) {
let resEntries = Array.from(values.entries())
resEntries.sort(([k1], [k2]) => {
return k1.key.localeCompare(k2.key)
})
for (let [{ type, key }, value] of resEntries) {
let entry = {
$: {
name: key,