diff --git a/packages/entity/src/behavior-components/expression.jsx b/packages/entity/src/behavior-components/expression.jsx index adfb521..3256c72 100644 --- a/packages/entity/src/behavior-components/expression.jsx +++ b/packages/entity/src/behavior-components/expression.jsx @@ -203,6 +203,23 @@ const Expression = ({ if ('any' === arg.type) { return {type: 'undefined'}; } + if ('condition' === arg.type) { + return { + ...(false === arg.compile ? {compile: false} : {}), + type: 'condition', + operator: 'and', + operands: [ + { + type: 'literal', + value: true, + }, + { + type: 'literal', + value: true, + }, + ], + }; + } if ('expressions' === arg.type) { return { type: 'expressions', diff --git a/packages/entity/src/index.js b/packages/entity/src/index.js index fe2940d..f7d0ab5 100644 --- a/packages/entity/src/index.js +++ b/packages/entity/src/index.js @@ -2,6 +2,7 @@ import {basename, extname} from 'path'; import {camelCase} from '@latus/core'; +import Condition from './behavior-components/condition'; import Expression from './behavior-components/expression'; import Expressions from './behavior-components/expressions'; import Literal from './behavior-components/literal'; @@ -21,6 +22,7 @@ export default { const TraitRenderers = latus.invokeReduce('@persea/entity/trait-components'); latus.set('%trait-components', TraitRenderers); latus.set('%behavior-controllers', { + condition: Condition, expression: Expression, expressions: Expressions, literal: Literal,