Refactored creature property methods into separate documents, might have broken a lot of things
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import CreatureProperties from '/imports/api/creature/CreatureProperties.js';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
|
||||
export default function getComputationProperties(creatureId){
|
||||
// find ids of all toggles that have conditions, even if they are inactive
|
||||
|
||||
@@ -94,3 +94,17 @@ export function recomputeCreatureByDoc(creature){
|
||||
recomputeSlotFullness(creatureId);
|
||||
return computationMemo;
|
||||
}
|
||||
|
||||
// TODO
|
||||
export function recomputePropertyDependencies(property){
|
||||
// Placeholder functionality, just recompute the whole creature
|
||||
let creature = Creatures.findOne(property.ancestors[0].id);
|
||||
recomputeCreatureByDoc(creature);
|
||||
}
|
||||
|
||||
// TODO
|
||||
export function recomputeCreatureByIdAndDependencies({creatureId, dependencies}){
|
||||
// Placeholder functionality, just recompute the whole creature
|
||||
let creature = Creatures.findOne(creatureId);
|
||||
recomputeCreatureByDoc(creature);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Meteor } from 'meteor/meteor'
|
||||
import { isEqual, forOwn } from 'lodash';
|
||||
import CreatureProperties from '/imports/api/creature/CreatureProperties.js';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
import propertySchemasIndex from '/imports/api/properties/computedOnlyPropertySchemasIndex.js';
|
||||
|
||||
export default function writeAlteredProperties(memo){
|
||||
|
||||
Reference in New Issue
Block a user