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

@@ -10,7 +10,7 @@ export default function computeCreature(creatureId){
try {
computeCreatureComputation(computation);
writeAlteredProperties(computation);
writeScope(creatureId, computation.scope);
writeScope(creatureId, computation);
} catch (e){
const errorText = e.reason || e.message || e.toString();
computation.errors.push({