chore: cleaning up control_nodes

This commit is contained in:
Sara Gerretsen 2026-03-12 22:10:13 +01:00
parent 78db4ffa07
commit 1e7f1cb3f6
2 changed files with 8 additions and 8 deletions

View file

@ -1,8 +1,6 @@
#include "control_nodes.h"
#include "behaviour_nodes/behaviour_node.h"
void BehaviourSequence::_bind_methods() {}
PackedStringArray BehaviourSequence::get_configuration_warnings() const {
PackedStringArray warnings{ super_type::get_configuration_warnings() };
if (get_child_behaviours().is_empty()) {
@ -25,7 +23,9 @@ void BehaviourSequence::execute() {
break;
case Success:
++this->current;
set_status(this->current >= get_child_behaviours().size() ? Success : Running);
set_status(this->current >= get_child_behaviours().size()
? Success
: Running);
break;
}
} else {
@ -40,8 +40,6 @@ BehaviourNode *BehaviourSequence::get_next() {
: cast_to<BehaviourNode>(get_parent());
}
void BehaviourSelector::_bind_methods() {}
PackedStringArray BehaviourSelector::get_configuration_warnings() const {
PackedStringArray warnings{ super_type::get_configuration_warnings() };
if (get_child_behaviours().is_empty()) {
@ -61,7 +59,9 @@ void BehaviourSelector::execute() {
break;
case Fail:
++this->current;
set_status(this->current >= get_child_behaviours().size() ? Fail : Running);
set_status(this->current >= get_child_behaviours().size()
? Fail
: Running);
break;
case Success:
set_status(Success);

View file

@ -5,7 +5,7 @@
class BehaviourSequence : public BehaviourComposite {
GDCLASS(BehaviourSequence, BehaviourComposite);
static void _bind_methods();
static void _bind_methods() {}
public:
PackedStringArray get_configuration_warnings() const override;
@ -18,7 +18,7 @@ private:
class BehaviourSelector : public BehaviourComposite {
GDCLASS(BehaviourSelector, BehaviourNode);
static void _bind_methods();
static void _bind_methods() {}
public:
PackedStringArray get_configuration_warnings() const override;