Refactored creature property methods into separate documents, might have broken a lot of things

This commit is contained in:
Stefan Zermatten
2021-02-04 11:38:29 +02:00
parent 60ea545ee9
commit 449a4fba7d
66 changed files with 882 additions and 710 deletions

View File

@@ -0,0 +1,12 @@
import { recomputeCreatureById } from '/imports/api/creature/computation/recomputeCreature.js';
/**
* Recomputes all ancestor creatures of this property
*/
export default function recomputeCreaturesByProperty(property){
for (let ref of property.ancestors){
if (ref.collection === 'creatures') {
recomputeCreatureById.call(ref.id);
}
}
}