From 5dc002098fedd642a75a0e6a958aa35e0e1f6242 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 20 Jul 2023 18:35:36 +0200 Subject: [PATCH] Reorganize files and sort includes --- SCsub | 7 +- {bb_param => blackboard/bb_param}/bb_aabb.h | 0 {bb_param => blackboard/bb_param}/bb_array.h | 0 {bb_param => blackboard/bb_param}/bb_basis.h | 0 {bb_param => blackboard/bb_param}/bb_bool.h | 0 .../bb_param}/bb_byte_array.h | 0 {bb_param => blackboard/bb_param}/bb_color.h | 0 .../bb_param}/bb_color_array.h | 0 .../bb_param}/bb_dictionary.h | 0 {bb_param => blackboard/bb_param}/bb_float.h | 0 .../bb_param}/bb_float_array.h | 0 {bb_param => blackboard/bb_param}/bb_int.h | 0 .../bb_param}/bb_int_array.h | 0 {bb_param => blackboard/bb_param}/bb_node.cpp | 0 {bb_param => blackboard/bb_param}/bb_node.h | 0 .../bb_param}/bb_param.cpp | 4 +- {bb_param => blackboard/bb_param}/bb_param.h | 5 +- {bb_param => blackboard/bb_param}/bb_plane.h | 0 .../bb_param}/bb_quaternion.h | 0 {bb_param => blackboard/bb_param}/bb_rect2.h | 0 {bb_param => blackboard/bb_param}/bb_rect2i.h | 0 {bb_param => blackboard/bb_param}/bb_string.h | 0 .../bb_param}/bb_string_array.h | 0 .../bb_param}/bb_string_name.h | 0 .../bb_param}/bb_transform2d.h | 0 .../bb_param}/bb_transform3d.h | 0 .../bb_param}/bb_variant.cpp | 0 .../bb_param}/bb_variant.h | 0 .../bb_param}/bb_vector2.h | 0 .../bb_param}/bb_vector2_array.h | 0 .../bb_param}/bb_vector2i.h | 0 .../bb_param}/bb_vector3.h | 0 .../bb_param}/bb_vector3_array.h | 0 .../bb_param}/bb_vector3i.h | 0 .../bb_param}/bb_vector4.h | 0 .../bb_param}/bb_vector4i.h | 0 blackboard.cpp => blackboard/blackboard.cpp | 1 + blackboard.h => blackboard/blackboard.h | 0 bt/actions/bt_action.h | 1 + bt/actions/bt_console_print.cpp | 4 +- bt/actions/bt_console_print.h | 1 + bt/actions/bt_fail.h | 1 + bt/actions/bt_random_wait.cpp | 1 + bt/actions/bt_random_wait.h | 1 + bt/actions/bt_wait.cpp | 1 + bt/actions/bt_wait.h | 1 + bt/actions/bt_wait_ticks.cpp | 1 + bt/actions/bt_wait_ticks.h | 1 + bt/behavior_tree.cpp | 17 +--- bt/behavior_tree.h | 4 +- bt/bt_player.cpp | 7 +- bt/bt_player.h | 3 +- bt/bt_state.cpp | 10 ++- bt/bt_state.h | 5 +- bt/bt_task.cpp | 7 +- bt/bt_task.h | 3 +- bt/composites/bt_composite.h | 1 + bt/composites/bt_dynamic_selector.h | 1 + bt/composites/bt_dynamic_sequence.h | 1 + bt/composites/bt_parallel.cpp | 1 + bt/composites/bt_parallel.h | 1 + bt/composites/bt_random_selector.h | 1 + bt/composites/bt_random_sequence.h | 1 + bt/composites/bt_sequence.h | 1 + bt/conditions/bt_condition.h | 1 + bt/decorators/bt_always_fail.h | 1 + bt/decorators/bt_always_succeed.h | 1 + bt/decorators/bt_cooldown.cpp | 1 + bt/decorators/bt_cooldown.h | 1 + bt/decorators/bt_decorator.h | 1 + bt/decorators/bt_delay.cpp | 1 + bt/decorators/bt_delay.h | 1 + bt/decorators/bt_for_each.cpp | 6 +- bt/decorators/bt_for_each.h | 1 + bt/decorators/bt_invert.h | 1 + bt/decorators/bt_new_scope.cpp | 4 +- bt/decorators/bt_new_scope.h | 2 +- bt/decorators/bt_probability.cpp | 1 + bt/decorators/bt_probability.h | 1 + bt/decorators/bt_repeat.cpp | 1 + bt/decorators/bt_repeat.h | 1 + bt/decorators/bt_repeat_until_failure.h | 1 + bt/decorators/bt_repeat_until_success.h | 1 + bt/decorators/bt_run_limit.h | 1 + bt/decorators/bt_subtree.cpp | 14 +-- bt/decorators/bt_subtree.h | 3 +- bt/decorators/bt_time_limit.cpp | 1 + bt/decorators/bt_time_limit.h | 1 + .../debugger}/behavior_tree_data.cpp | 1 + .../debugger}/behavior_tree_data.h | 3 +- .../debugger}/behavior_tree_view.cpp | 5 +- .../debugger}/behavior_tree_view.h | 1 + .../debugger}/limbo_debugger.cpp | 4 +- .../debugger}/limbo_debugger.h | 3 +- .../debugger}/limbo_debugger_plugin.cpp | 8 +- .../debugger}/limbo_debugger_plugin.h | 5 +- editor/limbo_ai_editor_plugin.cpp | 17 ++-- editor/limbo_ai_editor_plugin.h | 5 +- limbo_hsm.cpp => hsm/limbo_hsm.cpp | 7 +- limbo_hsm.h => hsm/limbo_hsm.h | 3 +- limbo_state.cpp => hsm/limbo_state.cpp | 4 +- limbo_state.h => hsm/limbo_state.h | 3 +- register_types.cpp | 86 +++++++++---------- .../limbo_string_names.cpp | 1 + .../limbo_string_names.h | 3 +- limbo_utility.cpp => util/limbo_utility.cpp | 4 +- limbo_utility.h => util/limbo_utility.h | 0 107 files changed, 186 insertions(+), 119 deletions(-) rename {bb_param => blackboard/bb_param}/bb_aabb.h (100%) rename {bb_param => blackboard/bb_param}/bb_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_basis.h (100%) rename {bb_param => blackboard/bb_param}/bb_bool.h (100%) rename {bb_param => blackboard/bb_param}/bb_byte_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_color.h (100%) rename {bb_param => blackboard/bb_param}/bb_color_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_dictionary.h (100%) rename {bb_param => blackboard/bb_param}/bb_float.h (100%) rename {bb_param => blackboard/bb_param}/bb_float_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_int.h (100%) rename {bb_param => blackboard/bb_param}/bb_int_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_node.cpp (100%) rename {bb_param => blackboard/bb_param}/bb_node.h (100%) rename {bb_param => blackboard/bb_param}/bb_param.cpp (98%) rename {bb_param => blackboard/bb_param}/bb_param.h (90%) rename {bb_param => blackboard/bb_param}/bb_plane.h (100%) rename {bb_param => blackboard/bb_param}/bb_quaternion.h (100%) rename {bb_param => blackboard/bb_param}/bb_rect2.h (100%) rename {bb_param => blackboard/bb_param}/bb_rect2i.h (100%) rename {bb_param => blackboard/bb_param}/bb_string.h (100%) rename {bb_param => blackboard/bb_param}/bb_string_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_string_name.h (100%) rename {bb_param => blackboard/bb_param}/bb_transform2d.h (100%) rename {bb_param => blackboard/bb_param}/bb_transform3d.h (100%) rename {bb_param => blackboard/bb_param}/bb_variant.cpp (100%) rename {bb_param => blackboard/bb_param}/bb_variant.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector2.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector2_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector2i.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector3.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector3_array.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector3i.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector4.h (100%) rename {bb_param => blackboard/bb_param}/bb_vector4i.h (100%) rename blackboard.cpp => blackboard/blackboard.cpp (99%) rename blackboard.h => blackboard/blackboard.h (100%) rename {debugger => editor/debugger}/behavior_tree_data.cpp (99%) rename {debugger => editor/debugger}/behavior_tree_data.h (97%) rename {debugger => editor/debugger}/behavior_tree_view.cpp (98%) rename {debugger => editor/debugger}/behavior_tree_view.h (97%) rename {debugger => editor/debugger}/limbo_debugger.cpp (99%) rename {debugger => editor/debugger}/limbo_debugger.h (97%) rename {debugger => editor/debugger}/limbo_debugger_plugin.cpp (97%) rename {debugger => editor/debugger}/limbo_debugger_plugin.h (92%) rename limbo_hsm.cpp => hsm/limbo_hsm.cpp (98%) rename limbo_hsm.h => hsm/limbo_hsm.h (98%) rename limbo_state.cpp => hsm/limbo_state.cpp (99%) rename limbo_state.h => hsm/limbo_state.h (96%) rename limbo_string_names.cpp => util/limbo_string_names.cpp (99%) rename limbo_string_names.h => util/limbo_string_names.h (96%) rename limbo_utility.cpp => util/limbo_utility.cpp (97%) rename limbo_utility.h => util/limbo_utility.h (100%) diff --git a/SCsub b/SCsub index 17b1d32..857bbee 100644 --- a/SCsub +++ b/SCsub @@ -6,12 +6,15 @@ Import("env_modules") module_env = env.Clone() module_env.add_source_files(env.modules_sources, "*.cpp") +module_env.add_source_files(env.modules_sources, "blackboard/*.cpp") +module_env.add_source_files(env.modules_sources, "blackboard/bb_param/*.cpp") module_env.add_source_files(env.modules_sources, "bt/*.cpp") module_env.add_source_files(env.modules_sources, "bt/composites/*.cpp") module_env.add_source_files(env.modules_sources, "bt/actions/*.cpp") module_env.add_source_files(env.modules_sources, "bt/decorators/*.cpp") module_env.add_source_files(env.modules_sources, "bt/conditions/*.cpp") -module_env.add_source_files(env.modules_sources, "bb_param/*.cpp") -module_env.add_source_files(env.modules_sources, "debugger/*.cpp") if env.editor_build: module_env.add_source_files(env.modules_sources, "editor/*.cpp") +module_env.add_source_files(env.modules_sources, "editor/debugger/*.cpp") +module_env.add_source_files(env.modules_sources, "hsm/*.cpp") +module_env.add_source_files(env.modules_sources, "util/*.cpp") diff --git a/bb_param/bb_aabb.h b/blackboard/bb_param/bb_aabb.h similarity index 100% rename from bb_param/bb_aabb.h rename to blackboard/bb_param/bb_aabb.h diff --git a/bb_param/bb_array.h b/blackboard/bb_param/bb_array.h similarity index 100% rename from bb_param/bb_array.h rename to blackboard/bb_param/bb_array.h diff --git a/bb_param/bb_basis.h b/blackboard/bb_param/bb_basis.h similarity index 100% rename from bb_param/bb_basis.h rename to blackboard/bb_param/bb_basis.h diff --git a/bb_param/bb_bool.h b/blackboard/bb_param/bb_bool.h similarity index 100% rename from bb_param/bb_bool.h rename to blackboard/bb_param/bb_bool.h diff --git a/bb_param/bb_byte_array.h b/blackboard/bb_param/bb_byte_array.h similarity index 100% rename from bb_param/bb_byte_array.h rename to blackboard/bb_param/bb_byte_array.h diff --git a/bb_param/bb_color.h b/blackboard/bb_param/bb_color.h similarity index 100% rename from bb_param/bb_color.h rename to blackboard/bb_param/bb_color.h diff --git a/bb_param/bb_color_array.h b/blackboard/bb_param/bb_color_array.h similarity index 100% rename from bb_param/bb_color_array.h rename to blackboard/bb_param/bb_color_array.h diff --git a/bb_param/bb_dictionary.h b/blackboard/bb_param/bb_dictionary.h similarity index 100% rename from bb_param/bb_dictionary.h rename to blackboard/bb_param/bb_dictionary.h diff --git a/bb_param/bb_float.h b/blackboard/bb_param/bb_float.h similarity index 100% rename from bb_param/bb_float.h rename to blackboard/bb_param/bb_float.h diff --git a/bb_param/bb_float_array.h b/blackboard/bb_param/bb_float_array.h similarity index 100% rename from bb_param/bb_float_array.h rename to blackboard/bb_param/bb_float_array.h diff --git a/bb_param/bb_int.h b/blackboard/bb_param/bb_int.h similarity index 100% rename from bb_param/bb_int.h rename to blackboard/bb_param/bb_int.h diff --git a/bb_param/bb_int_array.h b/blackboard/bb_param/bb_int_array.h similarity index 100% rename from bb_param/bb_int_array.h rename to blackboard/bb_param/bb_int_array.h diff --git a/bb_param/bb_node.cpp b/blackboard/bb_param/bb_node.cpp similarity index 100% rename from bb_param/bb_node.cpp rename to blackboard/bb_param/bb_node.cpp diff --git a/bb_param/bb_node.h b/blackboard/bb_param/bb_node.h similarity index 100% rename from bb_param/bb_node.h rename to blackboard/bb_param/bb_node.h diff --git a/bb_param/bb_param.cpp b/blackboard/bb_param/bb_param.cpp similarity index 98% rename from bb_param/bb_param.cpp rename to blackboard/bb_param/bb_param.cpp index de8f23c..aeb566d 100644 --- a/bb_param/bb_param.cpp +++ b/blackboard/bb_param/bb_param.cpp @@ -1,12 +1,14 @@ /* bb_param.cpp */ #include "bb_param.h" + +#include "modules/limboai/util/limbo_utility.h" + #include "core/core_bind.h" #include "core/error/error_macros.h" #include "core/object/class_db.h" #include "core/object/object.h" #include "core/variant/variant.h" -#include "modules/limboai/limbo_utility.h" VARIANT_ENUM_CAST(BBParam::ValueSource); diff --git a/bb_param/bb_param.h b/blackboard/bb_param/bb_param.h similarity index 90% rename from bb_param/bb_param.h rename to blackboard/bb_param/bb_param.h index 7719ea0..3839fd8 100644 --- a/bb_param/bb_param.h +++ b/blackboard/bb_param/bb_param.h @@ -3,12 +3,13 @@ #ifndef BB_PARAM_H #define BB_PARAM_H +#include "modules/limboai/blackboard/blackboard.h" +#include "modules/limboai/util/limbo_utility.h" + #include "core/io/resource.h" #include "core/object/object.h" #include "core/typedefs.h" #include "core/variant/variant.h" -#include "modules/limboai/blackboard.h" -#include "modules/limboai/limbo_utility.h" class BBParam : public Resource { GDCLASS(BBParam, Resource); diff --git a/bb_param/bb_plane.h b/blackboard/bb_param/bb_plane.h similarity index 100% rename from bb_param/bb_plane.h rename to blackboard/bb_param/bb_plane.h diff --git a/bb_param/bb_quaternion.h b/blackboard/bb_param/bb_quaternion.h similarity index 100% rename from bb_param/bb_quaternion.h rename to blackboard/bb_param/bb_quaternion.h diff --git a/bb_param/bb_rect2.h b/blackboard/bb_param/bb_rect2.h similarity index 100% rename from bb_param/bb_rect2.h rename to blackboard/bb_param/bb_rect2.h diff --git a/bb_param/bb_rect2i.h b/blackboard/bb_param/bb_rect2i.h similarity index 100% rename from bb_param/bb_rect2i.h rename to blackboard/bb_param/bb_rect2i.h diff --git a/bb_param/bb_string.h b/blackboard/bb_param/bb_string.h similarity index 100% rename from bb_param/bb_string.h rename to blackboard/bb_param/bb_string.h diff --git a/bb_param/bb_string_array.h b/blackboard/bb_param/bb_string_array.h similarity index 100% rename from bb_param/bb_string_array.h rename to blackboard/bb_param/bb_string_array.h diff --git a/bb_param/bb_string_name.h b/blackboard/bb_param/bb_string_name.h similarity index 100% rename from bb_param/bb_string_name.h rename to blackboard/bb_param/bb_string_name.h diff --git a/bb_param/bb_transform2d.h b/blackboard/bb_param/bb_transform2d.h similarity index 100% rename from bb_param/bb_transform2d.h rename to blackboard/bb_param/bb_transform2d.h diff --git a/bb_param/bb_transform3d.h b/blackboard/bb_param/bb_transform3d.h similarity index 100% rename from bb_param/bb_transform3d.h rename to blackboard/bb_param/bb_transform3d.h diff --git a/bb_param/bb_variant.cpp b/blackboard/bb_param/bb_variant.cpp similarity index 100% rename from bb_param/bb_variant.cpp rename to blackboard/bb_param/bb_variant.cpp diff --git a/bb_param/bb_variant.h b/blackboard/bb_param/bb_variant.h similarity index 100% rename from bb_param/bb_variant.h rename to blackboard/bb_param/bb_variant.h diff --git a/bb_param/bb_vector2.h b/blackboard/bb_param/bb_vector2.h similarity index 100% rename from bb_param/bb_vector2.h rename to blackboard/bb_param/bb_vector2.h diff --git a/bb_param/bb_vector2_array.h b/blackboard/bb_param/bb_vector2_array.h similarity index 100% rename from bb_param/bb_vector2_array.h rename to blackboard/bb_param/bb_vector2_array.h diff --git a/bb_param/bb_vector2i.h b/blackboard/bb_param/bb_vector2i.h similarity index 100% rename from bb_param/bb_vector2i.h rename to blackboard/bb_param/bb_vector2i.h diff --git a/bb_param/bb_vector3.h b/blackboard/bb_param/bb_vector3.h similarity index 100% rename from bb_param/bb_vector3.h rename to blackboard/bb_param/bb_vector3.h diff --git a/bb_param/bb_vector3_array.h b/blackboard/bb_param/bb_vector3_array.h similarity index 100% rename from bb_param/bb_vector3_array.h rename to blackboard/bb_param/bb_vector3_array.h diff --git a/bb_param/bb_vector3i.h b/blackboard/bb_param/bb_vector3i.h similarity index 100% rename from bb_param/bb_vector3i.h rename to blackboard/bb_param/bb_vector3i.h diff --git a/bb_param/bb_vector4.h b/blackboard/bb_param/bb_vector4.h similarity index 100% rename from bb_param/bb_vector4.h rename to blackboard/bb_param/bb_vector4.h diff --git a/bb_param/bb_vector4i.h b/blackboard/bb_param/bb_vector4i.h similarity index 100% rename from bb_param/bb_vector4i.h rename to blackboard/bb_param/bb_vector4i.h diff --git a/blackboard.cpp b/blackboard/blackboard.cpp similarity index 99% rename from blackboard.cpp rename to blackboard/blackboard.cpp index 0eea85c..7c605ef 100644 --- a/blackboard.cpp +++ b/blackboard/blackboard.cpp @@ -1,6 +1,7 @@ /* blackboard.cpp */ #include "blackboard.h" + #include "core/error/error_macros.h" #include "core/variant/variant.h" #include "scene/main/node.h" diff --git a/blackboard.h b/blackboard/blackboard.h similarity index 100% rename from blackboard.h rename to blackboard/blackboard.h diff --git a/bt/actions/bt_action.h b/bt/actions/bt_action.h index 3004ee6..1a456da 100644 --- a/bt/actions/bt_action.h +++ b/bt/actions/bt_action.h @@ -4,6 +4,7 @@ #define BT_ACTION_H #include "../bt_task.h" + #include "core/object/object.h" class BTAction : public BTTask { diff --git a/bt/actions/bt_console_print.cpp b/bt/actions/bt_console_print.cpp index d7d0943..d341f20 100644 --- a/bt/actions/bt_console_print.cpp +++ b/bt/actions/bt_console_print.cpp @@ -1,9 +1,11 @@ /* bt_console_print.cpp */ #include "bt_console_print.h" + +#include "modules/limboai/bt/actions/bt_action.h" + #include "core/object/object.h" #include "core/string/print_string.h" -#include "modules/limboai/bt/actions/bt_action.h" String BTConsolePrint::_generate_name() const { String tx = text; diff --git a/bt/actions/bt_console_print.h b/bt/actions/bt_console_print.h index e1f22a3..91642ec 100644 --- a/bt/actions/bt_console_print.h +++ b/bt/actions/bt_console_print.h @@ -4,6 +4,7 @@ #define BT_CONSOLE_PRINT_H #include "bt_action.h" + #include "core/object/object.h" #include "core/variant/variant.h" diff --git a/bt/actions/bt_fail.h b/bt/actions/bt_fail.h index 3f51db9..0a472b4 100644 --- a/bt/actions/bt_fail.h +++ b/bt/actions/bt_fail.h @@ -4,6 +4,7 @@ #define BT_FAIL_H #include "bt_action.h" + #include "core/object/object.h" class BTFail : public BTAction { diff --git a/bt/actions/bt_random_wait.cpp b/bt/actions/bt_random_wait.cpp index d7a28c5..97524b8 100644 --- a/bt/actions/bt_random_wait.cpp +++ b/bt/actions/bt_random_wait.cpp @@ -1,6 +1,7 @@ /* bt_random_wait.cpp */ #include "bt_random_wait.h" + #include "core/math/math_funcs.h" String BTRandomWait::_generate_name() const { diff --git a/bt/actions/bt_random_wait.h b/bt/actions/bt_random_wait.h index 99559de..897477c 100644 --- a/bt/actions/bt_random_wait.h +++ b/bt/actions/bt_random_wait.h @@ -4,6 +4,7 @@ #define BT_RANDOM_WAIT_H #include "bt_action.h" + #include "core/object/object.h" class BTRandomWait : public BTAction { diff --git a/bt/actions/bt_wait.cpp b/bt/actions/bt_wait.cpp index cba28c0..285d4c2 100644 --- a/bt/actions/bt_wait.cpp +++ b/bt/actions/bt_wait.cpp @@ -1,6 +1,7 @@ /* bt_wait.cpp */ #include "bt_wait.h" + #include "core/math/math_funcs.h" #include "core/object/class_db.h" #include "core/object/object.h" diff --git a/bt/actions/bt_wait.h b/bt/actions/bt_wait.h index 9793b39..bc86fb8 100644 --- a/bt/actions/bt_wait.h +++ b/bt/actions/bt_wait.h @@ -4,6 +4,7 @@ #define BT_WAIT_H #include "bt_action.h" + #include "core/object/object.h" class BTWait : public BTAction { diff --git a/bt/actions/bt_wait_ticks.cpp b/bt/actions/bt_wait_ticks.cpp index 02ae53b..3b3200b 100644 --- a/bt/actions/bt_wait_ticks.cpp +++ b/bt/actions/bt_wait_ticks.cpp @@ -1,6 +1,7 @@ /* bt_wait_ticks.cpp */ #include "bt_wait_ticks.h" + #include "core/object/class_db.h" #include "core/object/object.h" #include "core/variant/variant.h" diff --git a/bt/actions/bt_wait_ticks.h b/bt/actions/bt_wait_ticks.h index 0b47fb0..822e46e 100644 --- a/bt/actions/bt_wait_ticks.h +++ b/bt/actions/bt_wait_ticks.h @@ -4,6 +4,7 @@ #define BT_WAIT_TICKS_H #include "bt_action.h" + #include "core/object/object.h" class BTWaitTicks : public BTAction { diff --git a/bt/behavior_tree.cpp b/bt/behavior_tree.cpp index 52dea44..3163fa3 100644 --- a/bt/behavior_tree.cpp +++ b/bt/behavior_tree.cpp @@ -1,28 +1,13 @@ /* behavior_tree.cpp */ #include "behavior_tree.h" + #include "core/error/error_macros.h" #include "core/object/class_db.h" #include "core/object/object.h" #include "core/templates/list.h" #include "core/variant/variant.h" -// void BehaviorTree::init() { -// List stack; -// BTTask *task = root_task.ptr(); -// while (task != nullptr) { -// for (int i = 0; i < task->get_child_count(); i++) { -// task->get_child(i)->parent = task; -// stack.push_back(task->get_child(i).ptr()); -// } -// task = nullptr; -// if (!stack.is_empty()) { -// task = stack.front()->get(); -// stack.pop_front(); -// } -// } -// } - Ref BehaviorTree::clone() const { Ref copy = duplicate(false); copy->set_path(""); diff --git a/bt/behavior_tree.h b/bt/behavior_tree.h index 3dcdbc0..2091649 100644 --- a/bt/behavior_tree.h +++ b/bt/behavior_tree.h @@ -4,9 +4,11 @@ #define BEHAVIOR_TREE_H #include "bt_task.h" + +#include "modules/limboai/blackboard/blackboard.h" + #include "core/io/resource.h" #include "core/object/object.h" -#include "modules/limboai/blackboard.h" class BehaviorTree : public Resource { GDCLASS(BehaviorTree, Resource); diff --git a/bt/bt_player.cpp b/bt/bt_player.cpp index c4d7098..51bc1f2 100644 --- a/bt/bt_player.cpp +++ b/bt/bt_player.cpp @@ -2,8 +2,11 @@ #include "bt_player.h" -#include "../limbo_string_names.h" #include "bt_task.h" +#include "modules/limboai/blackboard/blackboard.h" +#include "modules/limboai/editor/debugger/limbo_debugger.h" +#include "modules/limboai/util/limbo_string_names.h" + #include "core/config/engine.h" #include "core/error/error_macros.h" #include "core/io/resource_loader.h" @@ -13,8 +16,6 @@ #include "core/string/string_name.h" #include "core/variant/variant.h" #include "main/performance.h" -#include "modules/limboai/blackboard.h" -#include "modules/limboai/debugger/limbo_debugger.h" VARIANT_ENUM_CAST(BTPlayer::UpdateMode); diff --git a/bt/bt_player.h b/bt/bt_player.h index 6ec4884..ed875f5 100644 --- a/bt/bt_player.h +++ b/bt/bt_player.h @@ -5,8 +5,9 @@ #include "behavior_tree.h" #include "bt_task.h" +#include "modules/limboai/blackboard/blackboard.h" + #include "core/object/object.h" -#include "modules/limboai/blackboard.h" #include "scene/main/node.h" class BTPlayer : public Node { diff --git a/bt/bt_state.cpp b/bt/bt_state.cpp index b03f6f2..98416de 100644 --- a/bt/bt_state.cpp +++ b/bt/bt_state.cpp @@ -1,13 +1,15 @@ /* bt_state.cpp */ #include "bt_state.h" + +#include "modules/limboai/bt/bt_task.h" +#include "modules/limboai/editor/debugger/limbo_debugger.h" +#include "modules/limboai/hsm/limbo_state.h" +#include "modules/limboai/util/limbo_string_names.h" + #include "core/error/error_macros.h" #include "core/object/class_db.h" #include "core/variant/variant.h" -#include "modules/limboai/bt/bt_task.h" -#include "modules/limboai/debugger/limbo_debugger.h" -#include "modules/limboai/limbo_state.h" -#include "modules/limboai/limbo_string_names.h" void BTState::_setup() { ERR_FAIL_COND_MSG(behavior_tree.is_null(), "BTState: BehaviorTree is not assigned."); diff --git a/bt/bt_state.h b/bt/bt_state.h index 39067d3..52139e7 100644 --- a/bt/bt_state.h +++ b/bt/bt_state.h @@ -3,10 +3,11 @@ #ifndef BT_STATE_H #define BT_STATE_H -#include "core/object/object.h" #include "modules/limboai/bt/behavior_tree.h" #include "modules/limboai/bt/bt_task.h" -#include "modules/limboai/limbo_state.h" +#include "modules/limboai/hsm/limbo_state.h" + +#include "core/object/object.h" class BTState : public LimboState { GDCLASS(BTState, LimboState); diff --git a/bt/bt_task.cpp b/bt/bt_task.cpp index 76f0e62..1299fc2 100644 --- a/bt/bt_task.cpp +++ b/bt/bt_task.cpp @@ -2,6 +2,10 @@ #include "bt_task.h" +#include "modules/limboai/blackboard/blackboard.h" +#include "modules/limboai/util/limbo_string_names.h" +#include "modules/limboai/util/limbo_utility.h" + #include "core/error/error_macros.h" #include "core/io/resource.h" #include "core/object/class_db.h" @@ -11,9 +15,6 @@ #include "core/string/ustring.h" #include "core/templates/hash_map.h" #include "core/variant/variant.h" -#include "modules/limboai/blackboard.h" -#include "modules/limboai/limbo_string_names.h" -#include "modules/limboai/limbo_utility.h" String BTTask::_generate_name() const { if (get_script_instance()) { diff --git a/bt/bt_task.h b/bt/bt_task.h index 5ee40a8..e62afd4 100644 --- a/bt/bt_task.h +++ b/bt/bt_task.h @@ -3,6 +3,8 @@ #ifndef BTTASK_H #define BTTASK_H +#include "modules/limboai/blackboard/blackboard.h" + #include "core/io/resource.h" #include "core/object/object.h" #include "core/object/ref_counted.h" @@ -10,7 +12,6 @@ #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/dictionary.h" -#include "modules/limboai/blackboard.h" #include "scene/resources/texture.h" class BTTask : public Resource { diff --git a/bt/composites/bt_composite.h b/bt/composites/bt_composite.h index 3628cf3..3a5c57f 100644 --- a/bt/composites/bt_composite.h +++ b/bt/composites/bt_composite.h @@ -4,6 +4,7 @@ #define BT_COMPOSITE_H #include "../bt_task.h" + #include "core/object/object.h" class BTComposite : public BTTask { diff --git a/bt/composites/bt_dynamic_selector.h b/bt/composites/bt_dynamic_selector.h index ac3a332..b4c7628 100644 --- a/bt/composites/bt_dynamic_selector.h +++ b/bt/composites/bt_dynamic_selector.h @@ -4,6 +4,7 @@ #define BT_DYNAMIC_SELECTOR_H #include "bt_composite.h" + #include "core/object/object.h" class BTDynamicSelector : public BTComposite { diff --git a/bt/composites/bt_dynamic_sequence.h b/bt/composites/bt_dynamic_sequence.h index a02772a..fb4ad7f 100644 --- a/bt/composites/bt_dynamic_sequence.h +++ b/bt/composites/bt_dynamic_sequence.h @@ -4,6 +4,7 @@ #define BT_DYNAMIC_SEQUENCE_H #include "bt_composite.h" + #include "core/object/object.h" class BTDynamicSequence : public BTComposite { diff --git a/bt/composites/bt_parallel.cpp b/bt/composites/bt_parallel.cpp index 970e4c6..1407848 100644 --- a/bt/composites/bt_parallel.cpp +++ b/bt/composites/bt_parallel.cpp @@ -1,6 +1,7 @@ /* bt_parallel.cpp */ #include "bt_parallel.h" + #include "core/object/class_db.h" void BTParallel::_enter() { diff --git a/bt/composites/bt_parallel.h b/bt/composites/bt_parallel.h index c83d8e0..8325c99 100644 --- a/bt/composites/bt_parallel.h +++ b/bt/composites/bt_parallel.h @@ -4,6 +4,7 @@ #define BT_PARALLEL_H #include "bt_composite.h" + #include "core/object/object.h" class BTParallel : public BTComposite { diff --git a/bt/composites/bt_random_selector.h b/bt/composites/bt_random_selector.h index c27c733..98db1d6 100644 --- a/bt/composites/bt_random_selector.h +++ b/bt/composites/bt_random_selector.h @@ -4,6 +4,7 @@ #define BT_RANDOM_SELECTOR_H #include "bt_composite.h" + #include "core/templates/vector.h" class BTRandomSelector : public BTComposite { diff --git a/bt/composites/bt_random_sequence.h b/bt/composites/bt_random_sequence.h index d32cf10..290f866 100644 --- a/bt/composites/bt_random_sequence.h +++ b/bt/composites/bt_random_sequence.h @@ -4,6 +4,7 @@ #define BT_RANDOM_SEQUENCE_H #include "bt_composite.h" + #include "core/templates/vector.h" class BTRandomSequence : public BTComposite { diff --git a/bt/composites/bt_sequence.h b/bt/composites/bt_sequence.h index 1883e54..1e2fd32 100644 --- a/bt/composites/bt_sequence.h +++ b/bt/composites/bt_sequence.h @@ -4,6 +4,7 @@ #define BT_SEQUENCE_H #include "bt_composite.h" + #include "core/object/object.h" class BTSequence : public BTComposite { diff --git a/bt/conditions/bt_condition.h b/bt/conditions/bt_condition.h index 1158d72..c397ab5 100644 --- a/bt/conditions/bt_condition.h +++ b/bt/conditions/bt_condition.h @@ -4,6 +4,7 @@ #define BT_CONDITION_H #include "../bt_task.h" + #include "core/object/object.h" class BTCondition : public BTTask { diff --git a/bt/decorators/bt_always_fail.h b/bt/decorators/bt_always_fail.h index 58ed1ec..0bbf8d9 100644 --- a/bt/decorators/bt_always_fail.h +++ b/bt/decorators/bt_always_fail.h @@ -4,6 +4,7 @@ #define BT_ALWAYS_FAIL_H #include "bt_decorator.h" + #include "core/object/object.h" class BTAlwaysFail : public BTDecorator { diff --git a/bt/decorators/bt_always_succeed.h b/bt/decorators/bt_always_succeed.h index 77e8f6b..a427a79 100644 --- a/bt/decorators/bt_always_succeed.h +++ b/bt/decorators/bt_always_succeed.h @@ -4,6 +4,7 @@ #define BT_ALWAYS_SUCCEED_H #include "bt_decorator.h" + #include "core/object/object.h" class BTAlwaysSucceed : public BTDecorator { diff --git a/bt/decorators/bt_cooldown.cpp b/bt/decorators/bt_cooldown.cpp index d5e475d..0e918f3 100644 --- a/bt/decorators/bt_cooldown.cpp +++ b/bt/decorators/bt_cooldown.cpp @@ -1,6 +1,7 @@ /* bt_cooldown.cpp */ #include "bt_cooldown.h" + #include "core/math/math_funcs.h" #include "core/object/class_db.h" #include "core/variant/array.h" diff --git a/bt/decorators/bt_cooldown.h b/bt/decorators/bt_cooldown.h index 6490edc..c4d1eb5 100644 --- a/bt/decorators/bt_cooldown.h +++ b/bt/decorators/bt_cooldown.h @@ -4,6 +4,7 @@ #define BT_COOLDOWN_H #include "bt_decorator.h" + #include "core/object/object.h" #include "scene/main/scene_tree.h" diff --git a/bt/decorators/bt_decorator.h b/bt/decorators/bt_decorator.h index 93af2ec..45e3e21 100644 --- a/bt/decorators/bt_decorator.h +++ b/bt/decorators/bt_decorator.h @@ -4,6 +4,7 @@ #define BT_DECORATOR_H #include "../bt_task.h" + #include "core/object/object.h" class BTDecorator : public BTTask { diff --git a/bt/decorators/bt_delay.cpp b/bt/decorators/bt_delay.cpp index b909aff..6b313cb 100644 --- a/bt/decorators/bt_delay.cpp +++ b/bt/decorators/bt_delay.cpp @@ -1,6 +1,7 @@ /* bt_delay.cpp */ #include "bt_delay.h" + #include "core/error/error_macros.h" #include "core/math/math_funcs.h" #include "core/object/class_db.h" diff --git a/bt/decorators/bt_delay.h b/bt/decorators/bt_delay.h index 86d76c3..7f67462 100644 --- a/bt/decorators/bt_delay.h +++ b/bt/decorators/bt_delay.h @@ -4,6 +4,7 @@ #define BT_DELAY_H #include "bt_decorator.h" + #include "core/object/object.h" class BTDelay : public BTDecorator { diff --git a/bt/decorators/bt_for_each.cpp b/bt/decorators/bt_for_each.cpp index ba1037f..14b4d7e 100644 --- a/bt/decorators/bt_for_each.cpp +++ b/bt/decorators/bt_for_each.cpp @@ -1,11 +1,13 @@ /* bt_for_each.cpp */ #include "bt_for_each.h" + +#include "modules/limboai/blackboard/blackboard.h" +#include "modules/limboai/util/limbo_utility.h" + #include "core/error/error_list.h" #include "core/error/error_macros.h" #include "core/variant/variant.h" -#include "modules/limboai/blackboard.h" -#include "modules/limboai/limbo_utility.h" String BTForEach::_generate_name() const { return vformat("ForEach %s in %s", diff --git a/bt/decorators/bt_for_each.h b/bt/decorators/bt_for_each.h index 9f8e40f..62c1235 100644 --- a/bt/decorators/bt_for_each.h +++ b/bt/decorators/bt_for_each.h @@ -4,6 +4,7 @@ #define BT_FOR_EACH_H #include "bt_decorator.h" + #include "core/object/object.h" class BTForEach : public BTDecorator { diff --git a/bt/decorators/bt_invert.h b/bt/decorators/bt_invert.h index 60d14f7..17f6237 100644 --- a/bt/decorators/bt_invert.h +++ b/bt/decorators/bt_invert.h @@ -4,6 +4,7 @@ #define BT_INVERT_H #include "bt_decorator.h" + #include "core/object/object.h" class BTInvert : public BTDecorator { diff --git a/bt/decorators/bt_new_scope.cpp b/bt/decorators/bt_new_scope.cpp index cae651b..be93d1c 100644 --- a/bt/decorators/bt_new_scope.cpp +++ b/bt/decorators/bt_new_scope.cpp @@ -1,10 +1,12 @@ /* bt_new_scope.cpp */ #include "bt_new_scope.h" + +#include "modules/limboai/blackboard/blackboard.h" + #include "core/error/error_macros.h" #include "core/os/memory.h" #include "core/string/ustring.h" -#include "modules/limboai/blackboard.h" void BTNewScope::initialize(Node *p_agent, const Ref &p_blackboard) { ERR_FAIL_COND(p_agent == nullptr); diff --git a/bt/decorators/bt_new_scope.h b/bt/decorators/bt_new_scope.h index 6afeac8..fe67737 100644 --- a/bt/decorators/bt_new_scope.h +++ b/bt/decorators/bt_new_scope.h @@ -4,9 +4,9 @@ #define BT_NEW_SCOPE_H #include "bt_decorator.h" + #include "core/object/object.h" -#include "bt_decorator.h" class BTNewScope : public BTDecorator { GDCLASS(BTNewScope, BTDecorator); diff --git a/bt/decorators/bt_probability.cpp b/bt/decorators/bt_probability.cpp index 54db6cc..b728763 100644 --- a/bt/decorators/bt_probability.cpp +++ b/bt/decorators/bt_probability.cpp @@ -1,6 +1,7 @@ /* bt_probability.cpp */ #include "bt_probability.h" + #include "core/object/object.h" String BTProbability::_generate_name() const { diff --git a/bt/decorators/bt_probability.h b/bt/decorators/bt_probability.h index dcb7e80..54a1993 100644 --- a/bt/decorators/bt_probability.h +++ b/bt/decorators/bt_probability.h @@ -4,6 +4,7 @@ #define BT_PROBABILITY_H #include "bt_decorator.h" + #include "core/object/object.h" class BTProbability : public BTDecorator { diff --git a/bt/decorators/bt_repeat.cpp b/bt/decorators/bt_repeat.cpp index fc6ccfc..13f49a4 100644 --- a/bt/decorators/bt_repeat.cpp +++ b/bt/decorators/bt_repeat.cpp @@ -1,6 +1,7 @@ /* bt_repeat.cpp */ #include "bt_repeat.h" + #include "core/object/object.h" #include "core/variant/variant.h" diff --git a/bt/decorators/bt_repeat.h b/bt/decorators/bt_repeat.h index 3cc954a..72fe4ff 100644 --- a/bt/decorators/bt_repeat.h +++ b/bt/decorators/bt_repeat.h @@ -4,6 +4,7 @@ #define BT_REPEAT_H #include "bt_decorator.h" + #include "core/object/object.h" class BTRepeat : public BTDecorator { diff --git a/bt/decorators/bt_repeat_until_failure.h b/bt/decorators/bt_repeat_until_failure.h index 13d15c1..4a2806f 100644 --- a/bt/decorators/bt_repeat_until_failure.h +++ b/bt/decorators/bt_repeat_until_failure.h @@ -4,6 +4,7 @@ #define BT_REPEAT_UNTIL_FAILURE_H #include "bt_decorator.h" + #include "core/object/object.h" class BTRepeatUntilFailure : public BTDecorator { diff --git a/bt/decorators/bt_repeat_until_success.h b/bt/decorators/bt_repeat_until_success.h index 1acca99..885659e 100644 --- a/bt/decorators/bt_repeat_until_success.h +++ b/bt/decorators/bt_repeat_until_success.h @@ -4,6 +4,7 @@ #define BT_REPEAT_UNTIL_SUCCESS_H #include "bt_decorator.h" + #include "core/object/object.h" class BTRepeatUntilSuccess : public BTDecorator { diff --git a/bt/decorators/bt_run_limit.h b/bt/decorators/bt_run_limit.h index b9c579c..141c1f5 100644 --- a/bt/decorators/bt_run_limit.h +++ b/bt/decorators/bt_run_limit.h @@ -4,6 +4,7 @@ #define BT_RUN_LIMIT_H #include "bt_decorator.h" + #include "core/object/object.h" class BTRunLimit : public BTDecorator { diff --git a/bt/decorators/bt_subtree.cpp b/bt/decorators/bt_subtree.cpp index 8fa0200..1ed7558 100644 --- a/bt/decorators/bt_subtree.cpp +++ b/bt/decorators/bt_subtree.cpp @@ -1,18 +1,20 @@ /* bt_subtree.cpp */ #include "bt_subtree.h" -#include "core/config/engine.h" -#include "core/error/error_macros.h" -#include "core/object/object.h" -#include "core/typedefs.h" -#include "core/variant/variant.h" -#include "modules/limboai/blackboard.h" + +#include "modules/limboai/blackboard/blackboard.h" #include "modules/limboai/bt/actions/bt_action.h" #include "modules/limboai/bt/actions/bt_fail.h" #include "modules/limboai/bt/bt_task.h" #include "modules/limboai/bt/decorators/bt_decorator.h" #include "modules/limboai/bt/decorators/bt_new_scope.h" +#include "core/config/engine.h" +#include "core/error/error_macros.h" +#include "core/object/object.h" +#include "core/typedefs.h" +#include "core/variant/variant.h" + String BTSubtree::_generate_name() const { String s; if (subtree.is_null()) { diff --git a/bt/decorators/bt_subtree.h b/bt/decorators/bt_subtree.h index 8d978eb..1fbe0e7 100644 --- a/bt/decorators/bt_subtree.h +++ b/bt/decorators/bt_subtree.h @@ -4,9 +4,10 @@ #define BT_SUBTREE_H #include "bt_new_scope.h" -#include "core/object/object.h" #include "modules/limboai/bt/behavior_tree.h" +#include "core/object/object.h" + class BTSubtree : public BTNewScope { GDCLASS(BTSubtree, BTNewScope); diff --git a/bt/decorators/bt_time_limit.cpp b/bt/decorators/bt_time_limit.cpp index 42531a2..bdf31a4 100644 --- a/bt/decorators/bt_time_limit.cpp +++ b/bt/decorators/bt_time_limit.cpp @@ -1,6 +1,7 @@ /* bt_time_limit.cpp */ #include "bt_time_limit.h" + #include "core/math/math_funcs.h" String BTTimeLimit::_generate_name() const { diff --git a/bt/decorators/bt_time_limit.h b/bt/decorators/bt_time_limit.h index 86c1404..c84303e 100644 --- a/bt/decorators/bt_time_limit.h +++ b/bt/decorators/bt_time_limit.h @@ -4,6 +4,7 @@ #define BT_TIME_LIMIT_H #include "bt_decorator.h" + #include "core/object/object.h" class BTTimeLimit : public BTDecorator { diff --git a/debugger/behavior_tree_data.cpp b/editor/debugger/behavior_tree_data.cpp similarity index 99% rename from debugger/behavior_tree_data.cpp rename to editor/debugger/behavior_tree_data.cpp index 2ba37ac..167d20a 100644 --- a/debugger/behavior_tree_data.cpp +++ b/editor/debugger/behavior_tree_data.cpp @@ -1,6 +1,7 @@ /* behavior_tree_data.cpp */ #include "behavior_tree_data.h" + #include "core/templates/list.h" //// BehaviorTreeData diff --git a/debugger/behavior_tree_data.h b/editor/debugger/behavior_tree_data.h similarity index 97% rename from debugger/behavior_tree_data.h rename to editor/debugger/behavior_tree_data.h index 3fa5ad4..e922d61 100644 --- a/debugger/behavior_tree_data.h +++ b/editor/debugger/behavior_tree_data.h @@ -3,9 +3,10 @@ #ifndef BEHAVIOR_TREE_DATA_H #define BEHAVIOR_TREE_DATA_H -#include "core/object/object.h" #include "modules/limboai/bt/bt_task.h" +#include "core/object/object.h" + class BehaviorTreeData { public: struct TaskData { diff --git a/debugger/behavior_tree_view.cpp b/editor/debugger/behavior_tree_view.cpp similarity index 98% rename from debugger/behavior_tree_view.cpp rename to editor/debugger/behavior_tree_view.cpp index 9067eeb..2c87b19 100644 --- a/debugger/behavior_tree_view.cpp +++ b/editor/debugger/behavior_tree_view.cpp @@ -4,13 +4,14 @@ #include "behavior_tree_view.h" #include "behavior_tree_data.h" +#include "modules/limboai/bt/bt_task.h" +#include "modules/limboai/util/limbo_utility.h" + #include "core/math/color.h" #include "core/math/math_defs.h" #include "core/object/callable_method_pointer.h" #include "core/typedefs.h" #include "editor/editor_scale.h" -#include "modules/limboai/bt/bt_task.h" -#include "modules/limboai/limbo_utility.h" #include "scene/resources/style_box.h" void BehaviorTreeView::_draw_running_status(Object *p_obj, Rect2 p_rect) { diff --git a/debugger/behavior_tree_view.h b/editor/debugger/behavior_tree_view.h similarity index 97% rename from debugger/behavior_tree_view.h rename to editor/debugger/behavior_tree_view.h index 876492d..1d6d8a9 100644 --- a/debugger/behavior_tree_view.h +++ b/editor/debugger/behavior_tree_view.h @@ -6,6 +6,7 @@ #define BEHAVIOR_TREE_VIEW_H #include "behavior_tree_data.h" + #include "core/object/class_db.h" #include "core/object/object.h" #include "scene/gui/control.h" diff --git a/debugger/limbo_debugger.cpp b/editor/debugger/limbo_debugger.cpp similarity index 99% rename from debugger/limbo_debugger.cpp rename to editor/debugger/limbo_debugger.cpp index f9d9fe0..d2b4050 100644 --- a/debugger/limbo_debugger.cpp +++ b/editor/debugger/limbo_debugger.cpp @@ -1,11 +1,13 @@ /* limbo_debugger.cpp */ #include "limbo_debugger.h" + #include "behavior_tree_data.h" +#include "modules/limboai/bt/bt_task.h" + #include "core/debugger/engine_debugger.h" #include "core/error/error_macros.h" #include "core/string/node_path.h" -#include "modules/limboai/bt/bt_task.h" #include "scene/main/scene_tree.h" #include "scene/main/window.h" diff --git a/debugger/limbo_debugger.h b/editor/debugger/limbo_debugger.h similarity index 97% rename from debugger/limbo_debugger.h rename to editor/debugger/limbo_debugger.h index 4d77db8..a1647c3 100644 --- a/debugger/limbo_debugger.h +++ b/editor/debugger/limbo_debugger.h @@ -3,10 +3,11 @@ #ifndef LIMBO_DEBUGGER_H #define LIMBO_DEBUGGER_H +#include "modules/limboai/bt/bt_task.h" + #include "core/object/class_db.h" #include "core/object/object.h" #include "core/string/node_path.h" -#include "modules/limboai/bt/bt_task.h" class LimboDebugger : public Object { GDCLASS(LimboDebugger, Object); diff --git a/debugger/limbo_debugger_plugin.cpp b/editor/debugger/limbo_debugger_plugin.cpp similarity index 97% rename from debugger/limbo_debugger_plugin.cpp rename to editor/debugger/limbo_debugger_plugin.cpp index adc3901..e62c00e 100644 --- a/debugger/limbo_debugger_plugin.cpp +++ b/editor/debugger/limbo_debugger_plugin.cpp @@ -3,6 +3,11 @@ #ifdef TOOLS_ENABLED #include "limbo_debugger_plugin.h" + +#include "limbo_debugger.h" +#include "modules/limboai/editor/debugger/behavior_tree_data.h" +#include "modules/limboai/editor/debugger/behavior_tree_view.h" + #include "core/debugger/engine_debugger.h" #include "core/math/math_defs.h" #include "core/object/callable_method_pointer.h" @@ -12,9 +17,6 @@ #include "core/variant/array.h" #include "editor/editor_scale.h" #include "editor/plugins/editor_debugger_plugin.h" -#include "limbo_debugger.h" -#include "modules/limboai/debugger/behavior_tree_data.h" -#include "modules/limboai/debugger/behavior_tree_view.h" #include "scene/gui/box_container.h" #include "scene/gui/control.h" #include "scene/gui/item_list.h" diff --git a/debugger/limbo_debugger_plugin.h b/editor/debugger/limbo_debugger_plugin.h similarity index 92% rename from debugger/limbo_debugger_plugin.h rename to editor/debugger/limbo_debugger_plugin.h index 178f39f..c4afab6 100644 --- a/debugger/limbo_debugger_plugin.h +++ b/editor/debugger/limbo_debugger_plugin.h @@ -5,12 +5,13 @@ #ifndef LIMBO_DEBUGGER_PLUGIN_H #define LIMBO_DEBUGGER_PLUGIN_H +#include "modules/limboai/editor/debugger/behavior_tree_data.h" +#include "modules/limboai/editor/debugger/behavior_tree_view.h" + #include "core/object/class_db.h" #include "core/object/object.h" #include "core/typedefs.h" #include "editor/plugins/editor_debugger_plugin.h" -#include "modules/limboai/debugger/behavior_tree_data.h" -#include "modules/limboai/debugger/behavior_tree_view.h" #include "scene/gui/box_container.h" #include "scene/gui/item_list.h" #include "scene/gui/panel_container.h" diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index 45f704c..0788ff4 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -4,6 +4,15 @@ #include "limbo_ai_editor_plugin.h" +#include "modules/limboai/bt/actions/bt_action.h" +#include "modules/limboai/bt/behavior_tree.h" +#include "modules/limboai/bt/bt_task.h" +#include "modules/limboai/bt/composites/bt_parallel.h" +#include "modules/limboai/bt/composites/bt_selector.h" +#include "modules/limboai/bt/composites/bt_sequence.h" +#include "modules/limboai/editor/debugger/limbo_debugger_plugin.h" +#include "modules/limboai/util/limbo_utility.h" + #include "core/config/project_settings.h" #include "core/error/error_list.h" #include "core/error/error_macros.h" @@ -41,14 +50,6 @@ #include "editor/editor_undo_redo_manager.h" #include "editor/inspector_dock.h" #include "editor/plugins/script_editor_plugin.h" -#include "modules/limboai/bt/actions/bt_action.h" -#include "modules/limboai/bt/behavior_tree.h" -#include "modules/limboai/bt/bt_task.h" -#include "modules/limboai/bt/composites/bt_parallel.h" -#include "modules/limboai/bt/composites/bt_selector.h" -#include "modules/limboai/bt/composites/bt_sequence.h" -#include "modules/limboai/debugger/limbo_debugger_plugin.h" -#include "modules/limboai/limbo_utility.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/control.h" diff --git a/editor/limbo_ai_editor_plugin.h b/editor/limbo_ai_editor_plugin.h index ec76651..ced71c0 100644 --- a/editor/limbo_ai_editor_plugin.h +++ b/editor/limbo_ai_editor_plugin.h @@ -4,13 +4,14 @@ #ifndef LIMBO_AI_EDITOR_PLUGIN_H #define LIMBO_AI_EDITOR_PLUGIN_H +#include "modules/limboai/bt/behavior_tree.h" +#include "modules/limboai/bt/bt_task.h" + #include "core/object/class_db.h" #include "core/object/object.h" #include "core/templates/hash_set.h" #include "editor/editor_node.h" #include "editor/editor_plugin.h" -#include "modules/limboai/bt/behavior_tree.h" -#include "modules/limboai/bt/bt_task.h" #include "scene/gui/box_container.h" #include "scene/gui/control.h" #include "scene/gui/file_dialog.h" diff --git a/limbo_hsm.cpp b/hsm/limbo_hsm.cpp similarity index 98% rename from limbo_hsm.cpp rename to hsm/limbo_hsm.cpp index e390b5b..f70ecbe 100644 --- a/limbo_hsm.cpp +++ b/hsm/limbo_hsm.cpp @@ -2,6 +2,10 @@ #include "limbo_hsm.h" +#include "modules/limboai/blackboard/blackboard.h" +#include "modules/limboai/hsm/limbo_state.h" +#include "modules/limboai/util/limbo_string_names.h" + #include "core/config/engine.h" #include "core/error/error_macros.h" #include "core/object/class_db.h" @@ -9,9 +13,6 @@ #include "core/typedefs.h" #include "core/variant/callable.h" #include "core/variant/variant.h" -#include "modules/limboai/blackboard.h" -#include "modules/limboai/limbo_state.h" -#include "modules/limboai/limbo_string_names.h" VARIANT_ENUM_CAST(LimboHSM::UpdateMode); diff --git a/limbo_hsm.h b/hsm/limbo_hsm.h similarity index 98% rename from limbo_hsm.h rename to hsm/limbo_hsm.h index 99248e1..61f3a77 100644 --- a/limbo_hsm.h +++ b/hsm/limbo_hsm.h @@ -3,9 +3,10 @@ #ifndef LIMBO_HSM_H #define LIMBO_HSM_H +#include "limbo_state.h" + #include "core/object/object.h" #include "core/templates/hash_map.h" -#include "limbo_state.h" class LimboHSM : public LimboState { GDCLASS(LimboHSM, LimboState); diff --git a/limbo_state.cpp b/hsm/limbo_state.cpp similarity index 99% rename from limbo_state.cpp rename to hsm/limbo_state.cpp index 34dd675..2103fbc 100644 --- a/limbo_state.cpp +++ b/hsm/limbo_state.cpp @@ -1,6 +1,9 @@ /* limbo_state.cpp */ #include "limbo_state.h" + +#include "modules/limboai/util/limbo_string_names.h" + #include "core/error/error_macros.h" #include "core/object/class_db.h" #include "core/object/object.h" @@ -8,7 +11,6 @@ #include "core/variant/array.h" #include "core/variant/callable.h" #include "core/variant/variant.h" -#include "limbo_string_names.h" const String LimboState::EVENT_FINISHED = "finished"; diff --git a/limbo_state.h b/hsm/limbo_state.h similarity index 96% rename from limbo_state.h rename to hsm/limbo_state.h index b19d831..2ae64bf 100644 --- a/limbo_state.h +++ b/hsm/limbo_state.h @@ -3,7 +3,8 @@ #ifndef LIMBO_STATE_H #define LIMBO_STATE_H -#include "blackboard.h" +#include "modules/limboai/blackboard/blackboard.h" + #include "core/object/class_db.h" #include "core/object/gdvirtual.gen.inc" #include "core/object/object.h" diff --git a/register_types.cpp b/register_types.cpp index cca0add..95ba46b 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -2,41 +2,39 @@ #include "register_types.h" -#include "core/object/class_db.h" - -#include "bb_param/bb_aabb.h" -#include "bb_param/bb_array.h" -#include "bb_param/bb_basis.h" -#include "bb_param/bb_bool.h" -#include "bb_param/bb_byte_array.h" -#include "bb_param/bb_color.h" -#include "bb_param/bb_color_array.h" -#include "bb_param/bb_dictionary.h" -#include "bb_param/bb_float.h" -#include "bb_param/bb_float_array.h" -#include "bb_param/bb_int.h" -#include "bb_param/bb_int_array.h" -#include "bb_param/bb_node.h" -#include "bb_param/bb_param.h" -#include "bb_param/bb_plane.h" -#include "bb_param/bb_quaternion.h" -#include "bb_param/bb_rect2.h" -#include "bb_param/bb_rect2i.h" -#include "bb_param/bb_string.h" -#include "bb_param/bb_string_array.h" -#include "bb_param/bb_string_name.h" -#include "bb_param/bb_transform2d.h" -#include "bb_param/bb_transform3d.h" -#include "bb_param/bb_variant.h" -#include "bb_param/bb_vector2.h" -#include "bb_param/bb_vector2_array.h" -#include "bb_param/bb_vector2i.h" -#include "bb_param/bb_vector3.h" -#include "bb_param/bb_vector3_array.h" -#include "bb_param/bb_vector3i.h" -#include "bb_param/bb_vector4.h" -#include "bb_param/bb_vector4i.h" -#include "blackboard.h" +#include "blackboard/bb_param/bb_aabb.h" +#include "blackboard/bb_param/bb_array.h" +#include "blackboard/bb_param/bb_basis.h" +#include "blackboard/bb_param/bb_bool.h" +#include "blackboard/bb_param/bb_byte_array.h" +#include "blackboard/bb_param/bb_color.h" +#include "blackboard/bb_param/bb_color_array.h" +#include "blackboard/bb_param/bb_dictionary.h" +#include "blackboard/bb_param/bb_float.h" +#include "blackboard/bb_param/bb_float_array.h" +#include "blackboard/bb_param/bb_int.h" +#include "blackboard/bb_param/bb_int_array.h" +#include "blackboard/bb_param/bb_node.h" +#include "blackboard/bb_param/bb_param.h" +#include "blackboard/bb_param/bb_plane.h" +#include "blackboard/bb_param/bb_quaternion.h" +#include "blackboard/bb_param/bb_rect2.h" +#include "blackboard/bb_param/bb_rect2i.h" +#include "blackboard/bb_param/bb_string.h" +#include "blackboard/bb_param/bb_string_array.h" +#include "blackboard/bb_param/bb_string_name.h" +#include "blackboard/bb_param/bb_transform2d.h" +#include "blackboard/bb_param/bb_transform3d.h" +#include "blackboard/bb_param/bb_variant.h" +#include "blackboard/bb_param/bb_vector2.h" +#include "blackboard/bb_param/bb_vector2_array.h" +#include "blackboard/bb_param/bb_vector2i.h" +#include "blackboard/bb_param/bb_vector3.h" +#include "blackboard/bb_param/bb_vector3_array.h" +#include "blackboard/bb_param/bb_vector3i.h" +#include "blackboard/bb_param/bb_vector4.h" +#include "blackboard/bb_param/bb_vector4i.h" +#include "blackboard/blackboard.h" #include "bt/actions/bt_action.h" #include "bt/actions/bt_console_print.h" #include "bt/actions/bt_fail.h" @@ -71,19 +69,21 @@ #include "bt/decorators/bt_run_limit.h" #include "bt/decorators/bt_subtree.h" #include "bt/decorators/bt_time_limit.h" -#include "core/os/memory.h" -#include "core/string/print_string.h" -#include "debugger/behavior_tree_view.h" -#include "limbo_hsm.h" -#include "limbo_state.h" -#include "limbo_string_names.h" -#include "limbo_utility.h" -#include "modules/limboai/debugger/limbo_debugger.h" +#include "editor/debugger/behavior_tree_view.h" +#include "editor/debugger/limbo_debugger.h" +#include "hsm/limbo_hsm.h" +#include "hsm/limbo_state.h" +#include "util/limbo_string_names.h" +#include "util/limbo_utility.h" #ifdef TOOLS_ENABLED #include "editor/limbo_ai_editor_plugin.h" #endif +#include "core/object/class_db.h" +#include "core/os/memory.h" +#include "core/string/print_string.h" + static LimboUtility *_limbo_utility = nullptr; void initialize_limboai_module(ModuleInitializationLevel p_level) { diff --git a/limbo_string_names.cpp b/util/limbo_string_names.cpp similarity index 99% rename from limbo_string_names.cpp rename to util/limbo_string_names.cpp index acf6b26..a270a32 100644 --- a/limbo_string_names.cpp +++ b/util/limbo_string_names.cpp @@ -1,6 +1,7 @@ /* limbo_string_names.cpp */ #include "limbo_string_names.h" + #include "core/string/string_name.h" LimboStringNames *LimboStringNames::singleton = nullptr; diff --git a/limbo_string_names.h b/util/limbo_string_names.h similarity index 96% rename from limbo_string_names.h rename to util/limbo_string_names.h index 67f3d9b..4c99f4a 100644 --- a/limbo_string_names.h +++ b/util/limbo_string_names.h @@ -3,9 +3,10 @@ #ifndef LIMBO_STRING_NAMES_H #define LIMBO_STRING_NAMES_H +#include "modules/register_module_types.h" + #include "core/string/string_name.h" #include "core/typedefs.h" -#include "modules/register_module_types.h" class LimboStringNames { friend void initialize_limboai_module(ModuleInitializationLevel p_level); diff --git a/limbo_utility.cpp b/util/limbo_utility.cpp similarity index 97% rename from limbo_utility.cpp rename to util/limbo_utility.cpp index f1b50be..3c18195 100644 --- a/limbo_utility.cpp +++ b/util/limbo_utility.cpp @@ -1,7 +1,9 @@ /* limbo_utility.cpp */ #include "limbo_utility.h" -#include "bt/bt_task.h" + +#include "modules/limboai/bt/bt_task.h" + #include "core/variant/variant.h" #include "scene/resources/texture.h" diff --git a/limbo_utility.h b/util/limbo_utility.h similarity index 100% rename from limbo_utility.h rename to util/limbo_utility.h