Fixed dependency loops created by inactive props

depending on their parent toggles
This commit is contained in:
Stefan Zermatten
2022-08-16 11:19:16 +02:00
parent 79c9e67ce2
commit 34e3325464
3 changed files with 23 additions and 6 deletions

View File

@@ -89,6 +89,10 @@ export function buildComputationFromProps(properties, creature, variables){
// Walk the property trees computing things that need to be inherited
walkDown(forest, node => {
computeInactiveStatus(node);
});
// Inactive status must be complete for the whole tree before toggle deps
// are calculated
walkDown(forest, node => {
computeToggleDependencies(node, dependencyGraph);
computeSlotQuantityFilled(node, dependencyGraph);
});