From f3c52999e87b4a4440744439ba411614017b72b5 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Sun, 10 Oct 2021 20:08:29 +0200 Subject: [PATCH] Fixed action rewrite build errors --- app/imports/api/creature/creatures/Creatures.js | 1 + app/imports/api/engine/actions/applyProperty.js | 11 ++++++++++- .../shared/recalculateCalculation.js | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/imports/api/creature/creatures/Creatures.js b/app/imports/api/creature/creatures/Creatures.js index 43762c81..375d29b9 100644 --- a/app/imports/api/creature/creatures/Creatures.js +++ b/app/imports/api/creature/creatures/Creatures.js @@ -146,6 +146,7 @@ Creatures.attachSchema(CreatureSchema); import '/imports/api/creature/creatures/methods/index.js'; +import '/imports/api/engine/actions/doAction.js'; export default Creatures; export { CreatureSchema }; diff --git a/app/imports/api/engine/actions/applyProperty.js b/app/imports/api/engine/actions/applyProperty.js index 24652a73..fe88c208 100644 --- a/app/imports/api/engine/actions/applyProperty.js +++ b/app/imports/api/engine/actions/applyProperty.js @@ -1,12 +1,21 @@ +import action from './applyPropertyByType/applyAction.js'; +import adjustment from './applyPropertyByType/applyAdjustment.js'; +import branch from './applyPropertyByType/applyBranch.js'; +import buff from './applyPropertyByType/applyBuff.js'; +import damage from './applyPropertyByType/applyDamage.js'; +import roll from './applyPropertyByType/applyRoll.js'; +import savingThrow from './applyPropertyByType/applySavingThrow.js'; +import toggle from './applyPropertyByType/applyToggle.js'; const applyPropertyByType = { action, + adjustment, branch, buff, damage, roll, savingThrow, - spell, + spell: action, toggle, }; diff --git a/app/imports/api/engine/actions/applyPropertyByType/shared/recalculateCalculation.js b/app/imports/api/engine/actions/applyPropertyByType/shared/recalculateCalculation.js index b58666b0..4481069d 100644 --- a/app/imports/api/engine/actions/applyPropertyByType/shared/recalculateCalculation.js +++ b/app/imports/api/engine/actions/applyPropertyByType/shared/recalculateCalculation.js @@ -1,4 +1,4 @@ -import evaluateCalculation from '../utility/evaluateCalculation.js'; +import evaluateCalculation from '/imports/api/engine/computation/utility/evaluateCalculation.js'; import logErrors from './logErrors.js'; export default function recalculateCalculation(calc, scope, log, context){