Replaced manual recompute calls with dirty flag settings
This commit is contained in:
@@ -21,6 +21,7 @@ export default function writeAlteredProperties(computation){
|
||||
'deactivatedByAncestor',
|
||||
'deactivatedByToggle',
|
||||
'damage',
|
||||
'dirty',
|
||||
...schema.objectKeys(),
|
||||
];
|
||||
op = addChangedKeysToOp(op, keys, original, changed);
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user