) {
type="target"
position={Position.Bottom}
id="TriggerBeliefs"
- style={{ left: '40%' }}
+ style={{ left: '40%' }}
rules={[
- allowOnlyConnectionsFromType(['basic_belief', "inferred_belief"]),
+ allowOnlyConnectionsFromType(['basic_belief']),
]}
/>
@@ -136,7 +136,7 @@ export function TriggerConnectionTarget(_thisNode: Node, _sourceNodeId: string)
const otherNode = nodes.find((x) => x.id === _sourceNodeId)
if (!otherNode) return;
- if (otherNode.type === 'basic_belief'|| otherNode.type ==='inferred_belief') {
+ if (otherNode.type === 'basic_belief' /* TODO: Add the option for an inferred belief */) {
data.condition = _sourceNodeId;
}
@@ -172,7 +172,7 @@ export function TriggerDisconnectionTarget(_thisNode: Node, _sourceNodeId: strin
const data = _thisNode.data as TriggerNodeData;
// remove if the target of disconnection was our condition
if (_sourceNodeId == data.condition) data.condition = undefined
-
+
data.plan = deleteGoalInPlanByID(structuredClone(data.plan) as Plan, _sourceNodeId)
}