Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 [WIP] reimplement all nodes in C++ #287

Open
wants to merge 20 commits into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/beehave-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on:
branches:
- "godot-4.x"
paths-ignore:
- '**.jpg'
- '**.png'
- '**.svg'
- '**.md'
- '**plugin.cfg'
- "**.jpg"
- "**.png"
- "**.svg"
- "**.md"
- "**plugin.cfg"
pull_request:
paths-ignore:
- '**.jpg'
- '**.png'
- '**.svg'
- '**.md'
- '**plugin.cfg'
- "**.jpg"
- "**.png"
- "**.svg"
- "**.md"
- "**plugin.cfg"
workflow_dispatch:

concurrency:
Expand All @@ -31,7 +31,7 @@ jobs:
fail-fast: false
max-parallel: 10
matrix:
godot-version: ['4.0.4', '4.1.3', '4.2.1']
godot-version: ["4.2.1"]

name: "🤖 CI on Godot ${{ matrix.godot-version }}"
uses: ./.github/workflows/unit-tests.yml
Expand Down
20 changes: 19 additions & 1 deletion addons/beehave/beehave.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,22 @@ ios.debug = "res://addons/beehave/libs/ios/beehave.ios.template_debug.universal
ios.release = "res://addons/beehave/libs/ios/beehave.ios.template_release.universal.dylib"

[icons]
BeehaveTree = "res://addons/beehave/icons/tree.svg"
BeehaveTree = "res://addons/beehave/icons/tree.svg"
BeehaveBlackboard = "res://addons/beehave/icons/blackboard.svg"
BeehaveSelector = "res://addons/beehave/icons/selector.svg"
BeehaveSelectorRandom = "res://addons/beehave/icons/selector_random.svg"
BeehaveSelectorReactive = "res://addons/beehave/icons/selector_reactive.svg"
BeehaveSequence = "res://addons/beehave/icons/sequence.svg"
BeehaveSequenceRandom = "res://addons/beehave/icons/sequence_random.svg"
BeehaveSequenceReactive = "res://addons/beehave/icons/sequence_reactive.svg"
BeehaveSequenceStar = "res://addons/beehave/icons/sequence_star.svg"
BeehaveSequenceStar = "res://addons/beehave/icons/sequence_star.svg"
BeehaveCooldown = "res://addons/beehave/icons/cooldown.svg"
BeehaveDelayer = "res://addons/beehave/icons/delayer.svg"
BeehaveFailer = "res://addons/beehave/icons/failer.svg"
BeehaveSucceeder = "res://addons/beehave/icons/succeeder.svg"
BeehaveInverter = "res://addons/beehave/icons/inverter.svg"
BeehaveLimiter = "res://addons/beehave/icons/limiter.svg"
BeehaveTimeLimiter = "res://addons/beehave/icons/limiter.svg"
BeehaveAction = "res://addons/beehave/icons/action.svg"
BeehaveCondition = "res://addons/beehave/icons/condition.svg"
Binary file not shown.
20 changes: 20 additions & 0 deletions extension/src/nodes/blackboard.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "blackboard.h"

#include <godot_cpp/core/class_db.hpp>

using namespace godot;

BeehaveBlackboard::BeehaveBlackboard()
{
count = 0;
}

BeehaveBlackboard::~BeehaveBlackboard()
{

}

void BeehaveBlackboard::_bind_methods()
{

}
20 changes: 20 additions & 0 deletions extension/src/nodes/blackboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef BEEHAVE_BLACKBOARD_H
#define BEEHAVE_BLACKBOARD_H

#include <godot_cpp/classes/node.hpp>

using namespace godot;

class BeehaveBlackboard : public Node
{
GDCLASS(BeehaveBlackboard, Node);

protected:
static void _bind_methods();

public:
BeehaveBlackboard();
~BeehaveBlackboard();
};

#endif // BEEHAVE_BLACKBOARD_H
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions extension/src/nodes/node.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "node.h"

#include <godot_cpp/core/class_db.hpp>

using namespace godot;

BeehaveNode::BeehaveNode()
{

}

BeehaveNode::~BeehaveNode()
{

}

void BeehaveNode::_bind_methods()
{

}
20 changes: 20 additions & 0 deletions extension/src/nodes/node.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef BEEHAVE_NODE_H
#define BEEHAVE_NODE_H

#include <godot_cpp/classes/node.hpp>

using namespace godot;

class BeehaveNode : public Node
{
GDCLASS(BeehaveNode, Node);

protected:
static void _bind_methods();

public:
BeehaveNode();
~BeehaveNode();
};

#endif // BEEHAVE_NODE_H
20 changes: 20 additions & 0 deletions extension/src/nodes/tree.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "tree.h"

#include <godot_cpp/core/class_db.hpp>

using namespace godot;

BeehaveTree::BeehaveTree()
{
count = 0;
}

BeehaveTree::~BeehaveTree()
{

}

void BeehaveTree::_bind_methods()
{

}
20 changes: 20 additions & 0 deletions extension/src/nodes/tree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef BEEHAVE_TREE_H
#define BEEHAVE_TREE_H

#include <godot_cpp/classes/node.hpp>

using namespace godot;

class BeehaveTree : public Node
{
GDCLASS(BeehaveTree, Node);

protected:
static void _bind_methods();

public:
BeehaveTree();
~BeehaveTree();
};

#endif // BEEHAVE_TREE_H
5 changes: 5 additions & 0 deletions extension/src/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/godot.hpp>

#include "nodes/tree.h"
#include "nodes/blackboard.h"

using namespace godot;

void initialize_beehave_types(ModuleInitializationLevel p_level)
{
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
ClassDB::register_class<BeehaveTree>();
ClassDB::register_class<BeehaveBlackboard>();
}

void uninitialize_beehave_types(ModuleInitializationLevel p_level) {
Expand Down