chore: merge the rest of the nodes back into this structure, and make sure that start and end nodes are not deletable.
This commit is contained in:
@@ -6,12 +6,18 @@ import { EndNodeDefaults } from "./nodes/EndNode.default";
|
||||
import { StartNodeDefaults } from "./nodes/StartNode.default";
|
||||
import { PhaseNodeDefaults } from "./nodes/PhaseNode.default";
|
||||
import { NormNodeDefaults } from "./nodes/NormNode.default";
|
||||
import GoalNode, { GoalConnects, GoalReduce } from "./nodes/GoalNode";
|
||||
import { GoalNodeDefaults } from "./nodes/GoalNode.default";
|
||||
import TriggerNode, { TriggerConnects, TriggerReduce } from "./nodes/TriggerNode";
|
||||
import { TriggerNodeDefaults } from "./nodes/TriggerNode.default";
|
||||
|
||||
export const NodeTypes = {
|
||||
start: StartNode,
|
||||
end: EndNode,
|
||||
phase: PhaseNode,
|
||||
norm: NormNode,
|
||||
goal: GoalNode,
|
||||
trigger: TriggerNode,
|
||||
};
|
||||
|
||||
// Default node data for creation
|
||||
@@ -20,6 +26,8 @@ export const NodeDefaults = {
|
||||
end: EndNodeDefaults,
|
||||
phase: PhaseNodeDefaults,
|
||||
norm: NormNodeDefaults,
|
||||
goal: GoalNodeDefaults,
|
||||
trigger: TriggerNodeDefaults,
|
||||
};
|
||||
|
||||
export const NodeReduces = {
|
||||
@@ -27,6 +35,8 @@ export const NodeReduces = {
|
||||
end: EndReduce,
|
||||
phase: PhaseReduce,
|
||||
norm: NormReduce,
|
||||
goal: GoalReduce,
|
||||
trigger: TriggerReduce,
|
||||
}
|
||||
|
||||
export const NodeConnects = {
|
||||
@@ -34,4 +44,13 @@ export const NodeConnects = {
|
||||
end: EndConnects,
|
||||
phase: PhaseConnects,
|
||||
norm: NormConnects,
|
||||
goal: GoalConnects,
|
||||
trigger: TriggerConnects,
|
||||
}
|
||||
|
||||
// Function to tell the visual program if we're allowed to delete them...
|
||||
// Right now it doesn't take in any values, but that could also be done later.
|
||||
export const NodeDeletes = {
|
||||
start: () => false,
|
||||
end: () => false,
|
||||
}
|
||||
Reference in New Issue
Block a user