Fixed massive writes to creature.variables on calc

Now only writes changed variables, preventing oplog from being
polluted with massive updates
This commit is contained in:
Stefan Zermatten
2022-04-25 13:57:39 +02:00
parent 33f60c2c6d
commit ea32c54f57
4 changed files with 28 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ function getCreature(creatureId){
export function buildComputationFromProps(properties, creature){
const computation = new CreatureComputation(properties);
const computation = new CreatureComputation(properties, creature);
// Dependency graph where edge(a, b) means a depends on b
// The graph includes all dependencies even of inactive properties
// such that any properties changing without changing their dependencies