Skip to content

Commit

Permalink
Complete implementation of the Blackboard Nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Apr 18, 2024
1 parent 3c75e14 commit 0cc6396
Show file tree
Hide file tree
Showing 7 changed files with 512 additions and 303 deletions.
46 changes: 46 additions & 0 deletions app/admin_panel/src/lib/CodeBox_Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ export const common_nodes = [
"Task",
"UseRoot",

// Blackboard
"Blackboard:ChangeInteger",
"Blackboard:IntegerCondition",

"Action:PauseExecution",

"Action:Print",
Expand All @@ -688,6 +692,15 @@ export const common_nodes = [
"Condition:SucceedOnAverageColour",
];

export const condition_operator_types = [
"==",
"!=",
"<",
"<=",
">",
">=",
]

export const xml_schema = {
elements: [
{
Expand Down Expand Up @@ -755,6 +768,36 @@ export const xml_schema = {
attributes: ["id"],
completion: { type: "keyword" },
},
{
name: "Blackboard:ChangeInteger",
attributes: [
"variable_name",
"value",
{
name: "integer_change_type",
values: [
"Set",
"Add",
"Subtract",
],
completion: { type: "keyword" },
},
],
completion: { type: "keyword" },
},
{
name: "Blackboard:IntegerCondition",
attributes: [
"variable_name",
"value",
{
name: "condition_operator_type",
values: condition_operator_types,
completion: { type: "keyword" },
},
],
completion: { type: "keyword" },
},
{
name: "Action:PauseExecution",
attributes: ["ms"],
Expand Down Expand Up @@ -907,6 +950,9 @@ const node_information_list = new Map([
["Fail", "Always fails"],
["Succeed", "Always succeeds"],

["Blackboard:ChangeInteger", "Changes the integer value of the blackboard"],
["Blackboard:IntegerCondition", "Checks the integer value of the blackboard"],

["Action:PauseExecution", "Pauses the execution for the given amount of time"],
["Action:Print", "Prints the given message"],

Expand Down
Loading

0 comments on commit 0cc6396

Please sign in to comment.