Replaced manual recompute calls with dirty flag settings

This commit is contained in:
Stefan Zermatten
2022-05-11 15:42:29 +02:00
parent 7a35c66904
commit 1b3efae81a
28 changed files with 138 additions and 128 deletions

View File

@@ -20,7 +20,6 @@ export default function writeScope(creatureId, computation) {
// Only update changed fields
if (!EJSON.equals(variables[key], scope[key])) {
if (!$set) $set = {};
// Set the changed key in the creature variables
$set[`variables.${key}`] = scope[key];
}