Moved creature variables to their own collection

Another big change to the engine, expect bugs
This commit is contained in:
Stefan Zermatten
2022-06-29 14:54:25 +02:00
parent 9dd84a83d2
commit f07f05ca2c
14 changed files with 174 additions and 70 deletions

View File

@@ -2,7 +2,7 @@ import { EJSON } from 'meteor/ejson';
import createGraph from 'ngraph.graph';
export default class CreatureComputation {
constructor(properties, creature){
constructor(properties, creature, variables){
// Set up fields
this.originalPropsById = {};
this.propsById = {};
@@ -12,6 +12,7 @@ export default class CreatureComputation {
this.dependencyGraph = createGraph();
this.errors = [];
this.creature = creature;
this.variables = variables;
// Store properties for easy access later
properties.forEach(prop => {