Fixed a lot broken with nested sets

This commit is contained in:
ThaumRystra
2023-12-18 23:12:39 +02:00
parent a891f26b63
commit 4a349ea906
32 changed files with 435 additions and 284 deletions

View File

@@ -56,6 +56,7 @@ export function getProperties(creatureId) {
const creature = loadedCreatures.get(creatureId);
if (creature) {
const props = Array.from(creature.properties.values());
props.sort((a, b) => a.left - b.left);
return EJSON.clone(props);
}
// console.time(`Cache miss on creature properties: ${creatureId}`)
@@ -78,6 +79,7 @@ export function getPropertiesOfType(creatureId, propType) {
props.push(prop);
}
}
props.sort((a, b) => a.left - b.left);
return EJSON.clone(props);
}
// console.time(`Cache miss on creature properties: ${creatureId}`)