Effects targeting calculations by tag now work in the engine and actions

This commit is contained in:
Stefan Zermatten
2022-02-15 15:59:41 +02:00
parent e0f621cc44
commit 378da71f5d
19 changed files with 454 additions and 98 deletions

View File

@@ -29,7 +29,7 @@ function discoverInlineCalculationFields(prop, schemas){
// Set the value to the uncomputed string for use in calculations
inlineCalcObj.value = string;
// Has the text, if it matches the existing hash, stop
const inlineCalcHash = cyrb53(inlineCalcObj.text);
if (inlineCalcHash === inlineCalcObj.hash){
@@ -57,6 +57,9 @@ function parseAllCalculationFields(prop, schemas){
// Determine the level the calculation should compute down to
let parseLevel = schemas[prop.type].getDefinition(calcKey).parseLevel || 'reduce';
// Special case of effects, when targeting by tags compile
if (prop.type === 'effect' && prop.targetByTags) parseLevel = 'compile';
// For all fields matching they keys
// supports `keys.$.with.$.arrays`
applyFnToKey(prop, calcKey, (prop, key) => {