Refactored creature property methods into separate documents, might have broken a lot of things
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user