From 4c26583007d868e57a7c516a389b4d66326e06a7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 4 Mar 2024 21:36:16 +0100 Subject: [PATCH] Remove "p_" from the argument names in the `ClassDB` bindings --- blackboard/bb_param/bb_param.cpp | 8 +- blackboard/bb_param/bb_variant.cpp | 4 +- blackboard/bb_param/bb_variant.h | 4 +- blackboard/blackboard.cpp | 16 +- blackboard/blackboard_plan.cpp | 2 +- bt/behavior_tree.cpp | 12 +- bt/behavior_tree.h | 2 +- bt/bt_player.cpp | 22 +-- bt/bt_player.h | 2 +- bt/bt_state.cpp | 6 +- bt/tasks/blackboard/bt_check_trigger.cpp | 2 +- bt/tasks/blackboard/bt_check_var.cpp | 6 +- bt/tasks/blackboard/bt_set_var.cpp | 6 +- bt/tasks/bt_task.cpp | 30 ++-- bt/tasks/bt_task.h | 2 +- bt/tasks/composites/bt_parallel.cpp | 8 +- bt/tasks/composites/bt_parallel.h | 2 +- .../composites/bt_probability_selector.cpp | 14 +- bt/tasks/composites/bt_probability_selector.h | 2 +- bt/tasks/decorators/bt_cooldown.cpp | 10 +- bt/tasks/decorators/bt_delay.cpp | 4 +- bt/tasks/decorators/bt_delay.h | 2 +- bt/tasks/decorators/bt_for_each.cpp | 4 +- bt/tasks/decorators/bt_new_scope.cpp | 4 +- bt/tasks/decorators/bt_new_scope.h | 2 +- bt/tasks/decorators/bt_probability.cpp | 4 +- bt/tasks/decorators/bt_probability.h | 2 +- bt/tasks/decorators/bt_repeat.cpp | 8 +- bt/tasks/decorators/bt_run_limit.cpp | 6 +- bt/tasks/decorators/bt_subtree.cpp | 4 +- bt/tasks/decorators/bt_subtree.h | 2 +- bt/tasks/decorators/bt_time_limit.cpp | 4 +- bt/tasks/decorators/bt_time_limit.h | 2 +- bt/tasks/scene/bt_await_animation.cpp | 8 +- bt/tasks/scene/bt_await_animation.h | 2 +- bt/tasks/scene/bt_check_agent_property.cpp | 8 +- bt/tasks/scene/bt_check_agent_property.h | 2 +- bt/tasks/scene/bt_pause_animation.cpp | 4 +- bt/tasks/scene/bt_pause_animation.h | 2 +- bt/tasks/scene/bt_play_animation.cpp | 14 +- bt/tasks/scene/bt_play_animation.h | 2 +- bt/tasks/scene/bt_set_agent_property.cpp | 8 +- bt/tasks/scene/bt_set_agent_property.h | 2 +- bt/tasks/scene/bt_stop_animation.cpp | 8 +- bt/tasks/scene/bt_stop_animation.h | 2 +- bt/tasks/utility/bt_call_method.cpp | 12 +- bt/tasks/utility/bt_console_print.cpp | 6 +- bt/tasks/utility/bt_console_print.h | 2 +- bt/tasks/utility/bt_evaluate_expression.cpp | 12 +- bt/tasks/utility/bt_random_wait.cpp | 6 +- bt/tasks/utility/bt_random_wait.h | 2 +- bt/tasks/utility/bt_wait.cpp | 4 +- bt/tasks/utility/bt_wait_ticks.cpp | 4 +- bt/tasks/utility/bt_wait_ticks.h | 2 +- doc/source/classes/class_bbparam.rst | 12 +- doc/source/classes/class_behaviortree.rst | 28 ++-- doc/source/classes/class_behaviortreedata.rst | 10 +- doc/source/classes/class_behaviortreeview.rst | 10 +- doc/source/classes/class_blackboard.rst | 64 ++++---- doc/source/classes/class_blackboardplan.rst | 14 +- doc/source/classes/class_btplayer.rst | 12 +- .../classes/class_btprobabilityselector.rst | 22 +-- doc/source/classes/class_bttask.rst | 138 +++++++++--------- doc/source/classes/class_limbohsm.rst | 38 ++--- doc/source/classes/class_limbostate.rst | 86 +++++------ doc/source/classes/class_limboutility.rst | 26 ++-- doc_classes/BBParam.xml | 6 +- doc_classes/BTPlayer.xml | 10 +- doc_classes/BTProbabilitySelector.xml | 16 +- doc_classes/BTTask.xml | 36 ++--- doc_classes/BehaviorTree.xml | 8 +- doc_classes/BehaviorTreeData.xml | 4 +- doc_classes/BehaviorTreeView.xml | 6 +- doc_classes/Blackboard.xml | 32 ++-- doc_classes/BlackboardPlan.xml | 6 +- doc_classes/LimboHSM.xml | 18 +-- doc_classes/LimboState.xml | 32 ++-- doc_classes/LimboUtility.xml | 8 +- editor/action_banner.cpp | 2 +- editor/debugger/behavior_tree_data.cpp | 2 +- editor/debugger/behavior_tree_view.cpp | 6 +- editor/debugger/limbo_debugger.cpp | 4 +- editor/limbo_ai_editor_plugin.cpp | 14 +- editor/mode_switch_button.cpp | 4 +- editor/task_tree.cpp | 10 +- hsm/limbo_hsm.cpp | 14 +- hsm/limbo_state.cpp | 24 +-- util/limbo_utility.cpp | 8 +- 88 files changed, 524 insertions(+), 526 deletions(-) diff --git a/blackboard/bb_param/bb_param.cpp b/blackboard/bb_param/bb_param.cpp index 340e89b..fbc4ad9 100644 --- a/blackboard/bb_param/bb_param.cpp +++ b/blackboard/bb_param/bb_param.cpp @@ -101,14 +101,14 @@ void BBParam::_get_property_list(List *p_list) const { } void BBParam::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_value_source", "p_value_source"), &BBParam::set_value_source); + ClassDB::bind_method(D_METHOD("set_value_source", "value_source"), &BBParam::set_value_source); ClassDB::bind_method(D_METHOD("get_value_source"), &BBParam::get_value_source); - ClassDB::bind_method(D_METHOD("set_saved_value", "p_value"), &BBParam::set_saved_value); + ClassDB::bind_method(D_METHOD("set_saved_value", "value"), &BBParam::set_saved_value); ClassDB::bind_method(D_METHOD("get_saved_value"), &BBParam::get_saved_value); - ClassDB::bind_method(D_METHOD("set_variable", "p_variable_name"), &BBParam::set_variable); + ClassDB::bind_method(D_METHOD("set_variable", "variable_name"), &BBParam::set_variable); ClassDB::bind_method(D_METHOD("get_variable"), &BBParam::get_variable); ClassDB::bind_method(D_METHOD("get_type"), &BBParam::get_type); - ClassDB::bind_method(D_METHOD("get_value", "p_agent", "p_blackboard", "p_default"), &BBParam::get_value, Variant()); + ClassDB::bind_method(D_METHOD("get_value", "agent", "blackboard", "default"), &BBParam::get_value, Variant()); ADD_PROPERTY(PropertyInfo(Variant::INT, "value_source", PROPERTY_HINT_ENUM, "Saved Value,Blackboard Var"), "set_value_source", "get_value_source"); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable", PROPERTY_HINT_NONE, "", 0), "set_variable", "get_variable"); diff --git a/blackboard/bb_param/bb_variant.cpp b/blackboard/bb_param/bb_variant.cpp index 75379f8..460ae1a 100644 --- a/blackboard/bb_param/bb_variant.cpp +++ b/blackboard/bb_param/bb_variant.cpp @@ -1,7 +1,7 @@ /** * bb_variant.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -27,7 +27,7 @@ Variant::Type BBVariant::get_type() const { } void BBVariant::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_type", "p_type"), &BBVariant::set_type); + ClassDB::bind_method(D_METHOD("set_type", "type"), &BBVariant::set_type); String vtypes; for (int i = 0; i < Variant::VARIANT_MAX; i++) { diff --git a/blackboard/bb_param/bb_variant.h b/blackboard/bb_param/bb_variant.h index 8021a39..f996987 100644 --- a/blackboard/bb_param/bb_variant.h +++ b/blackboard/bb_param/bb_variant.h @@ -1,7 +1,7 @@ /** * bb_variant.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -31,4 +31,4 @@ public: BBVariant(); }; -#endif // BB_VARIANT \ No newline at end of file +#endif // BB_VARIANT diff --git a/blackboard/blackboard.cpp b/blackboard/blackboard.cpp index 78159fd..7e13c2d 100644 --- a/blackboard/blackboard.cpp +++ b/blackboard/blackboard.cpp @@ -93,14 +93,14 @@ void Blackboard::prefetch_nodepath_vars(Node *p_node) { } void Blackboard::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_var", "p_name", "p_default", "p_complain"), &Blackboard::get_var, Variant(), true); - ClassDB::bind_method(D_METHOD("set_var", "p_name", "p_value"), &Blackboard::set_var); - ClassDB::bind_method(D_METHOD("has_var", "p_name"), &Blackboard::has_var); - ClassDB::bind_method(D_METHOD("set_parent", "p_blackboard"), &Blackboard::set_parent); + ClassDB::bind_method(D_METHOD("get_var", "var_name", "default", "complain"), &Blackboard::get_var, Variant(), true); + ClassDB::bind_method(D_METHOD("set_var", "var_name", "value"), &Blackboard::set_var); + ClassDB::bind_method(D_METHOD("has_var", "var_name"), &Blackboard::has_var); + ClassDB::bind_method(D_METHOD("set_parent", "blackboard"), &Blackboard::set_parent); ClassDB::bind_method(D_METHOD("get_parent"), &Blackboard::get_parent); - ClassDB::bind_method(D_METHOD("erase_var", "p_name"), &Blackboard::erase_var); - ClassDB::bind_method(D_METHOD("prefetch_nodepath_vars", "p_node"), &Blackboard::prefetch_nodepath_vars); + ClassDB::bind_method(D_METHOD("erase_var", "var_name"), &Blackboard::erase_var); + ClassDB::bind_method(D_METHOD("prefetch_nodepath_vars", "node"), &Blackboard::prefetch_nodepath_vars); ClassDB::bind_method(D_METHOD("top"), &Blackboard::top); - ClassDB::bind_method(D_METHOD("bind_var_to_property", "p_name", "p_object", "p_property"), &Blackboard::bind_var_to_property); - ClassDB::bind_method(D_METHOD("unbind_var", "p_name"), &Blackboard::unbind_var); + ClassDB::bind_method(D_METHOD("bind_var_to_property", "var_name", "object", "property"), &Blackboard::bind_var_to_property); + ClassDB::bind_method(D_METHOD("unbind_var", "var_name"), &Blackboard::unbind_var); } diff --git a/blackboard/blackboard_plan.cpp b/blackboard/blackboard_plan.cpp index 87dcf99..9030265 100644 --- a/blackboard/blackboard_plan.cpp +++ b/blackboard/blackboard_plan.cpp @@ -286,7 +286,7 @@ void BlackboardPlan::populate_blackboard(const Ref &p_blackboard, bo void BlackboardPlan::_bind_methods() { ClassDB::bind_method(D_METHOD("create_blackboard"), &BlackboardPlan::create_blackboard); - ClassDB::bind_method(D_METHOD("populate_blackboard", "p_blackboard", "p_overwrite"), &BlackboardPlan::populate_blackboard); + ClassDB::bind_method(D_METHOD("populate_blackboard", "blackboard", "overwrite"), &BlackboardPlan::populate_blackboard); } BlackboardPlan::BlackboardPlan() { diff --git a/bt/behavior_tree.cpp b/bt/behavior_tree.cpp index c6ac3a0..f5bfc1d 100644 --- a/bt/behavior_tree.cpp +++ b/bt/behavior_tree.cpp @@ -1,7 +1,7 @@ /** * behavior_tree.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -83,15 +83,15 @@ void BehaviorTree::_plan_changed() { } void BehaviorTree::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_description", "p_value"), &BehaviorTree::set_description); + ClassDB::bind_method(D_METHOD("set_description", "description"), &BehaviorTree::set_description); ClassDB::bind_method(D_METHOD("get_description"), &BehaviorTree::get_description); - ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BehaviorTree::set_blackboard_plan); + ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BehaviorTree::set_blackboard_plan); ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BehaviorTree::get_blackboard_plan); - ClassDB::bind_method(D_METHOD("set_root_task", "p_value"), &BehaviorTree::set_root_task); + ClassDB::bind_method(D_METHOD("set_root_task", "task"), &BehaviorTree::set_root_task); ClassDB::bind_method(D_METHOD("get_root_task"), &BehaviorTree::get_root_task); ClassDB::bind_method(D_METHOD("clone"), &BehaviorTree::clone); - ClassDB::bind_method(D_METHOD("copy_other", "p_other"), &BehaviorTree::copy_other); - ClassDB::bind_method(D_METHOD("instantiate", "p_agent", "p_blackboard"), &BehaviorTree::instantiate); + ClassDB::bind_method(D_METHOD("copy_other", "other"), &BehaviorTree::copy_other); + ClassDB::bind_method(D_METHOD("instantiate", "agent", "blackboard"), &BehaviorTree::instantiate); ADD_PROPERTY(PropertyInfo(Variant::STRING, "description", PROPERTY_HINT_MULTILINE_TEXT), "set_description", "get_description"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT), "set_blackboard_plan", "get_blackboard_plan"); diff --git a/bt/behavior_tree.h b/bt/behavior_tree.h index 1b4c82c..8935bd6 100644 --- a/bt/behavior_tree.h +++ b/bt/behavior_tree.h @@ -1,7 +1,7 @@ /** * behavior_tree.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/bt_player.cpp b/bt/bt_player.cpp index f01f3f2..bb9b6bf 100644 --- a/bt/bt_player.cpp +++ b/bt/bt_player.cpp @@ -1,7 +1,7 @@ /** * bt_player.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -223,21 +223,21 @@ void BTPlayer::_notification(int p_notification) { } void BTPlayer::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_behavior_tree", "p_path"), &BTPlayer::set_behavior_tree); + ClassDB::bind_method(D_METHOD("set_behavior_tree", "behavior_tree"), &BTPlayer::set_behavior_tree); ClassDB::bind_method(D_METHOD("get_behavior_tree"), &BTPlayer::get_behavior_tree); - ClassDB::bind_method(D_METHOD("set_update_mode", "p_mode"), &BTPlayer::set_update_mode); + ClassDB::bind_method(D_METHOD("set_update_mode", "update_mode"), &BTPlayer::set_update_mode); ClassDB::bind_method(D_METHOD("get_update_mode"), &BTPlayer::get_update_mode); - ClassDB::bind_method(D_METHOD("set_active", "p_active"), &BTPlayer::set_active); + ClassDB::bind_method(D_METHOD("set_active", "active"), &BTPlayer::set_active); ClassDB::bind_method(D_METHOD("get_active"), &BTPlayer::get_active); - ClassDB::bind_method(D_METHOD("set_blackboard", "p_blackboard"), &BTPlayer::set_blackboard); + ClassDB::bind_method(D_METHOD("set_blackboard", "blackboard"), &BTPlayer::set_blackboard); ClassDB::bind_method(D_METHOD("get_blackboard"), &BTPlayer::get_blackboard); - ClassDB::bind_method(D_METHOD("set_prefetch_nodepath_vars", "p_value"), &BTPlayer::set_prefetch_nodepath_vars); + ClassDB::bind_method(D_METHOD("set_prefetch_nodepath_vars", "enable"), &BTPlayer::set_prefetch_nodepath_vars); ClassDB::bind_method(D_METHOD("get_prefetch_nodepath_vars"), &BTPlayer::get_prefetch_nodepath_vars); - ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BTPlayer::set_blackboard_plan); + ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BTPlayer::set_blackboard_plan); ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BTPlayer::get_blackboard_plan); - ClassDB::bind_method(D_METHOD("update", "p_delta"), &BTPlayer::update); + ClassDB::bind_method(D_METHOD("update", "delta"), &BTPlayer::update); ClassDB::bind_method(D_METHOD("restart"), &BTPlayer::restart); ClassDB::bind_method(D_METHOD("get_last_status"), &BTPlayer::get_last_status); @@ -254,11 +254,11 @@ void BTPlayer::_bind_methods() { BIND_ENUM_CONSTANT(PHYSICS); BIND_ENUM_CONSTANT(MANUAL); - ADD_SIGNAL(MethodInfo("behavior_tree_finished", PropertyInfo(Variant::INT, "p_status"))); - ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::INT, "p_status"))); + ADD_SIGNAL(MethodInfo("behavior_tree_finished", PropertyInfo(Variant::INT, "status"))); + ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::INT, "status"))); #ifdef DEBUG_ENABLED - ClassDB::bind_method(D_METHOD("_set_monitor_performance", "p_value"), &BTPlayer::_set_monitor_performance); + ClassDB::bind_method(D_METHOD("_set_monitor_performance", "enable"), &BTPlayer::_set_monitor_performance); ClassDB::bind_method(D_METHOD("_get_monitor_performance"), &BTPlayer::_get_monitor_performance); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitor_performance"), "_set_monitor_performance", "_get_monitor_performance"); #endif // DEBUG_ENABLED diff --git a/bt/bt_player.h b/bt/bt_player.h index d0cbc86..f58e17b 100644 --- a/bt/bt_player.h +++ b/bt/bt_player.h @@ -1,7 +1,7 @@ /** * bt_player.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/bt_state.cpp b/bt/bt_state.cpp index 0c379e7..b73e96c 100644 --- a/bt/bt_state.cpp +++ b/bt/bt_state.cpp @@ -101,15 +101,15 @@ void BTState::_notification(int p_notification) { } void BTState::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_behavior_tree", "p_value"), &BTState::set_behavior_tree); + ClassDB::bind_method(D_METHOD("set_behavior_tree", "behavior_tree"), &BTState::set_behavior_tree); ClassDB::bind_method(D_METHOD("get_behavior_tree"), &BTState::get_behavior_tree); ClassDB::bind_method(D_METHOD("get_tree_instance"), &BTState::get_tree_instance); - ClassDB::bind_method(D_METHOD("set_success_event", "p_event_name"), &BTState::set_success_event); + ClassDB::bind_method(D_METHOD("set_success_event", "event"), &BTState::set_success_event); ClassDB::bind_method(D_METHOD("get_success_event"), &BTState::get_success_event); - ClassDB::bind_method(D_METHOD("set_failure_event", "p_event_name"), &BTState::set_failure_event); + ClassDB::bind_method(D_METHOD("set_failure_event", "event"), &BTState::set_failure_event); ClassDB::bind_method(D_METHOD("get_failure_event"), &BTState::get_failure_event); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "behavior_tree", PROPERTY_HINT_RESOURCE_TYPE, "BehaviorTree"), "set_behavior_tree", "get_behavior_tree"); diff --git a/bt/tasks/blackboard/bt_check_trigger.cpp b/bt/tasks/blackboard/bt_check_trigger.cpp index 991e92f..e891603 100644 --- a/bt/tasks/blackboard/bt_check_trigger.cpp +++ b/bt/tasks/blackboard/bt_check_trigger.cpp @@ -44,7 +44,7 @@ BT::Status BTCheckTrigger::_tick(double p_delta) { } void BTCheckTrigger::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTCheckTrigger::set_variable); + ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTCheckTrigger::set_variable); ClassDB::bind_method(D_METHOD("get_variable"), &BTCheckTrigger::get_variable); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable"); diff --git a/bt/tasks/blackboard/bt_check_var.cpp b/bt/tasks/blackboard/bt_check_var.cpp index 99b027b..96ea05e 100644 --- a/bt/tasks/blackboard/bt_check_var.cpp +++ b/bt/tasks/blackboard/bt_check_var.cpp @@ -63,11 +63,11 @@ BT::Status BTCheckVar::_tick(double p_delta) { } void BTCheckVar::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTCheckVar::set_variable); + ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTCheckVar::set_variable); ClassDB::bind_method(D_METHOD("get_variable"), &BTCheckVar::get_variable); - ClassDB::bind_method(D_METHOD("set_check_type", "p_check_type"), &BTCheckVar::set_check_type); + ClassDB::bind_method(D_METHOD("set_check_type", "check_type"), &BTCheckVar::set_check_type); ClassDB::bind_method(D_METHOD("get_check_type"), &BTCheckVar::get_check_type); - ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTCheckVar::set_value); + ClassDB::bind_method(D_METHOD("set_value", "value"), &BTCheckVar::set_value); ClassDB::bind_method(D_METHOD("get_value"), &BTCheckVar::get_value); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable"); diff --git a/bt/tasks/blackboard/bt_set_var.cpp b/bt/tasks/blackboard/bt_set_var.cpp index c74ac9a..67adef5 100644 --- a/bt/tasks/blackboard/bt_set_var.cpp +++ b/bt/tasks/blackboard/bt_set_var.cpp @@ -70,12 +70,12 @@ PackedStringArray BTSetVar::get_configuration_warnings() { } void BTSetVar::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTSetVar::set_variable); + ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTSetVar::set_variable); ClassDB::bind_method(D_METHOD("get_variable"), &BTSetVar::get_variable); - ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTSetVar::set_value); + ClassDB::bind_method(D_METHOD("set_value", "value"), &BTSetVar::set_value); ClassDB::bind_method(D_METHOD("get_value"), &BTSetVar::get_value); ClassDB::bind_method(D_METHOD("get_operation"), &BTSetVar::get_operation); - ClassDB::bind_method(D_METHOD("set_operation", "p_operation"), &BTSetVar::set_operation); + ClassDB::bind_method(D_METHOD("set_operation", "operation"), &BTSetVar::set_operation); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "value", PROPERTY_HINT_RESOURCE_TYPE, "BBVariant"), "set_value", "get_value"); diff --git a/bt/tasks/bt_task.cpp b/bt/tasks/bt_task.cpp index 4031d22..66ee145 100644 --- a/bt/tasks/bt_task.cpp +++ b/bt/tasks/bt_task.cpp @@ -1,7 +1,7 @@ /** * bt_task.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -378,35 +378,35 @@ void BTTask::_bind_methods() { // Public Methods. ClassDB::bind_method(D_METHOD("is_root"), &BTTask::is_root); ClassDB::bind_method(D_METHOD("get_root"), &BTTask::get_root); - ClassDB::bind_method(D_METHOD("initialize", "p_agent", "p_blackboard"), &BTTask::initialize); + ClassDB::bind_method(D_METHOD("initialize", "agent", "blackboard"), &BTTask::initialize); ClassDB::bind_method(D_METHOD("clone"), &BTTask::clone); - ClassDB::bind_method(D_METHOD("execute", "p_delta"), &BTTask::execute); - ClassDB::bind_method(D_METHOD("get_child", "p_idx"), &BTTask::get_child); + ClassDB::bind_method(D_METHOD("execute", "delta"), &BTTask::execute); + ClassDB::bind_method(D_METHOD("get_child", "idx"), &BTTask::get_child); ClassDB::bind_method(D_METHOD("get_child_count"), &BTTask::get_child_count); ClassDB::bind_method(D_METHOD("get_child_count_excluding_comments"), &BTTask::get_child_count_excluding_comments); - ClassDB::bind_method(D_METHOD("add_child", "p_child"), &BTTask::add_child); - ClassDB::bind_method(D_METHOD("add_child_at_index", "p_child", "p_idx"), &BTTask::add_child_at_index); - ClassDB::bind_method(D_METHOD("remove_child", "p_child"), &BTTask::remove_child); - ClassDB::bind_method(D_METHOD("remove_child_at_index", "p_idx"), &BTTask::remove_child_at_index); - ClassDB::bind_method(D_METHOD("has_child", "p_child"), &BTTask::has_child); - ClassDB::bind_method(D_METHOD("is_descendant_of", "p_task"), &BTTask::is_descendant_of); + ClassDB::bind_method(D_METHOD("add_child", "task"), &BTTask::add_child); + ClassDB::bind_method(D_METHOD("add_child_at_index", "task", "idx"), &BTTask::add_child_at_index); + ClassDB::bind_method(D_METHOD("remove_child", "task"), &BTTask::remove_child); + ClassDB::bind_method(D_METHOD("remove_child_at_index", "idx"), &BTTask::remove_child_at_index); + ClassDB::bind_method(D_METHOD("has_child", "task"), &BTTask::has_child); + ClassDB::bind_method(D_METHOD("is_descendant_of", "task"), &BTTask::is_descendant_of); ClassDB::bind_method(D_METHOD("get_index"), &BTTask::get_index); ClassDB::bind_method(D_METHOD("next_sibling"), &BTTask::next_sibling); - ClassDB::bind_method(D_METHOD("print_tree", "p_initial_tabs"), &BTTask::print_tree, Variant(0)); + ClassDB::bind_method(D_METHOD("print_tree", "initial_tabs"), &BTTask::print_tree, Variant(0)); ClassDB::bind_method(D_METHOD("get_task_name"), &BTTask::get_task_name); ClassDB::bind_method(D_METHOD("abort"), &BTTask::abort); // Properties, setters and getters. ClassDB::bind_method(D_METHOD("get_agent"), &BTTask::get_agent); - ClassDB::bind_method(D_METHOD("set_agent", "p_agent"), &BTTask::set_agent); + ClassDB::bind_method(D_METHOD("set_agent", "agent"), &BTTask::set_agent); ClassDB::bind_method(D_METHOD("_get_children"), &BTTask::_get_children); - ClassDB::bind_method(D_METHOD("_set_children", "p_children"), &BTTask::_set_children); + ClassDB::bind_method(D_METHOD("_set_children", "children"), &BTTask::_set_children); ClassDB::bind_method(D_METHOD("get_blackboard"), &BTTask::get_blackboard); ClassDB::bind_method(D_METHOD("get_parent"), &BTTask::get_parent); ClassDB::bind_method(D_METHOD("get_status"), &BTTask::get_status); ClassDB::bind_method(D_METHOD("get_elapsed_time"), &BTTask::get_elapsed_time); ClassDB::bind_method(D_METHOD("get_custom_name"), &BTTask::get_custom_name); - ClassDB::bind_method(D_METHOD("set_custom_name", "p_name"), &BTTask::set_custom_name); + ClassDB::bind_method(D_METHOD("set_custom_name", "name"), &BTTask::set_custom_name); ADD_PROPERTY(PropertyInfo(Variant::STRING, "custom_name"), "set_custom_name", "get_custom_name"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "agent", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_agent", "get_agent"); @@ -419,7 +419,7 @@ void BTTask::_bind_methods() { GDVIRTUAL_BIND(_setup); GDVIRTUAL_BIND(_enter); GDVIRTUAL_BIND(_exit); - GDVIRTUAL_BIND(_tick, "p_delta"); + GDVIRTUAL_BIND(_tick, "delta"); GDVIRTUAL_BIND(_generate_name); GDVIRTUAL_BIND(_get_configuration_warnings); #elif LIMBOAI_GDEXTENSION diff --git a/bt/tasks/bt_task.h b/bt/tasks/bt_task.h index 720e650..5b7a4ac 100644 --- a/bt/tasks/bt_task.h +++ b/bt/tasks/bt_task.h @@ -1,7 +1,7 @@ /** * bt_task.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/composites/bt_parallel.cpp b/bt/tasks/composites/bt_parallel.cpp index 6e3a50e..3739c2a 100644 --- a/bt/tasks/composites/bt_parallel.cpp +++ b/bt/tasks/composites/bt_parallel.cpp @@ -1,7 +1,7 @@ /** * bt_parallel.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -49,11 +49,11 @@ BT::Status BTParallel::_tick(double p_delta) { void BTParallel::_bind_methods() { ClassDB::bind_method(D_METHOD("get_num_successes_required"), &BTParallel::get_num_successes_required); - ClassDB::bind_method(D_METHOD("set_num_successes_required", "p_value"), &BTParallel::set_num_successes_required); + ClassDB::bind_method(D_METHOD("set_num_successes_required", "value"), &BTParallel::set_num_successes_required); ClassDB::bind_method(D_METHOD("get_num_failures_required"), &BTParallel::get_num_failures_required); - ClassDB::bind_method(D_METHOD("set_num_failures_required", "p_value"), &BTParallel::set_num_failures_required); + ClassDB::bind_method(D_METHOD("set_num_failures_required", "value"), &BTParallel::set_num_failures_required); ClassDB::bind_method(D_METHOD("get_repeat"), &BTParallel::get_repeat); - ClassDB::bind_method(D_METHOD("set_repeat", "p_value"), &BTParallel::set_repeat); + ClassDB::bind_method(D_METHOD("set_repeat", "enable"), &BTParallel::set_repeat); ADD_PROPERTY(PropertyInfo(Variant::INT, "num_successes_required"), "set_num_successes_required", "get_num_successes_required"); ADD_PROPERTY(PropertyInfo(Variant::INT, "num_failures_required"), "set_num_failures_required", "get_num_failures_required"); diff --git a/bt/tasks/composites/bt_parallel.h b/bt/tasks/composites/bt_parallel.h index 9e5624c..b05098a 100644 --- a/bt/tasks/composites/bt_parallel.h +++ b/bt/tasks/composites/bt_parallel.h @@ -1,7 +1,7 @@ /** * bt_parallel.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/composites/bt_probability_selector.cpp b/bt/tasks/composites/bt_probability_selector.cpp index 4b8eb14..54e0808 100644 --- a/bt/tasks/composites/bt_probability_selector.cpp +++ b/bt/tasks/composites/bt_probability_selector.cpp @@ -1,7 +1,7 @@ /** * bt_probability_selector.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -119,14 +119,14 @@ void BTProbabilitySelector::_select_task() { //***** Godot void BTProbabilitySelector::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_weight", "p_index"), &BTProbabilitySelector::get_weight); - ClassDB::bind_method(D_METHOD("set_weight", "p_index", "p_weight"), &BTProbabilitySelector::set_weight); + ClassDB::bind_method(D_METHOD("get_weight", "child_idx"), &BTProbabilitySelector::get_weight); + ClassDB::bind_method(D_METHOD("set_weight", "child_idx", "weight"), &BTProbabilitySelector::set_weight); ClassDB::bind_method(D_METHOD("get_total_weight"), &BTProbabilitySelector::get_total_weight); - ClassDB::bind_method(D_METHOD("get_probability", "p_index"), &BTProbabilitySelector::get_probability); - ClassDB::bind_method(D_METHOD("set_probability", "p_index", "p_probability"), &BTProbabilitySelector::set_probability); - ClassDB::bind_method(D_METHOD("has_probability", "p_index"), &BTProbabilitySelector::has_probability); + ClassDB::bind_method(D_METHOD("get_probability", "child_idx"), &BTProbabilitySelector::get_probability); + ClassDB::bind_method(D_METHOD("set_probability", "child_idx", "probability"), &BTProbabilitySelector::set_probability); + ClassDB::bind_method(D_METHOD("has_probability", "child_idx"), &BTProbabilitySelector::has_probability); ClassDB::bind_method(D_METHOD("get_abort_on_failure"), &BTProbabilitySelector::get_abort_on_failure); - ClassDB::bind_method(D_METHOD("set_abort_on_failure", "p_value"), &BTProbabilitySelector::set_abort_on_failure); + ClassDB::bind_method(D_METHOD("set_abort_on_failure", "enable"), &BTProbabilitySelector::set_abort_on_failure); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "abort_on_failure"), "set_abort_on_failure", "get_abort_on_failure"); } diff --git a/bt/tasks/composites/bt_probability_selector.h b/bt/tasks/composites/bt_probability_selector.h index 2cf3272..85ed1b2 100644 --- a/bt/tasks/composites/bt_probability_selector.h +++ b/bt/tasks/composites/bt_probability_selector.h @@ -1,7 +1,7 @@ /** * bt_probability_selector.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/decorators/bt_cooldown.cpp b/bt/tasks/decorators/bt_cooldown.cpp index ae3ed4f..98708a2 100644 --- a/bt/tasks/decorators/bt_cooldown.cpp +++ b/bt/tasks/decorators/bt_cooldown.cpp @@ -93,15 +93,15 @@ void BTCooldown::_on_timeout() { //**** Godot void BTCooldown::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_duration", "p_value"), &BTCooldown::set_duration); + ClassDB::bind_method(D_METHOD("set_duration", "duration"), &BTCooldown::set_duration); ClassDB::bind_method(D_METHOD("get_duration"), &BTCooldown::get_duration); - ClassDB::bind_method(D_METHOD("set_process_pause", "p_value"), &BTCooldown::set_process_pause); + ClassDB::bind_method(D_METHOD("set_process_pause", "enable"), &BTCooldown::set_process_pause); ClassDB::bind_method(D_METHOD("get_process_pause"), &BTCooldown::get_process_pause); - ClassDB::bind_method(D_METHOD("set_start_cooled", "p_value"), &BTCooldown::set_start_cooled); + ClassDB::bind_method(D_METHOD("set_start_cooled", "enable"), &BTCooldown::set_start_cooled); ClassDB::bind_method(D_METHOD("get_start_cooled"), &BTCooldown::get_start_cooled); - ClassDB::bind_method(D_METHOD("set_trigger_on_failure", "p_value"), &BTCooldown::set_trigger_on_failure); + ClassDB::bind_method(D_METHOD("set_trigger_on_failure", "enable"), &BTCooldown::set_trigger_on_failure); ClassDB::bind_method(D_METHOD("get_trigger_on_failure"), &BTCooldown::get_trigger_on_failure); - ClassDB::bind_method(D_METHOD("set_cooldown_state_var", "p_value"), &BTCooldown::set_cooldown_state_var); + ClassDB::bind_method(D_METHOD("set_cooldown_state_var", "variable"), &BTCooldown::set_cooldown_state_var); ClassDB::bind_method(D_METHOD("get_cooldown_state_var"), &BTCooldown::get_cooldown_state_var); ClassDB::bind_method(D_METHOD("_on_timeout"), &BTCooldown::_on_timeout); diff --git a/bt/tasks/decorators/bt_delay.cpp b/bt/tasks/decorators/bt_delay.cpp index 4f127e2..61223da 100644 --- a/bt/tasks/decorators/bt_delay.cpp +++ b/bt/tasks/decorators/bt_delay.cpp @@ -1,7 +1,7 @@ /** * bt_delay.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -29,7 +29,7 @@ BT::Status BTDelay::_tick(double p_delta) { } void BTDelay::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_seconds", "p_value"), &BTDelay::set_seconds); + ClassDB::bind_method(D_METHOD("set_seconds", "value"), &BTDelay::set_seconds); ClassDB::bind_method(D_METHOD("get_seconds"), &BTDelay::get_seconds); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "seconds"), "set_seconds", "get_seconds"); } diff --git a/bt/tasks/decorators/bt_delay.h b/bt/tasks/decorators/bt_delay.h index 10c02ff..fdb60e4 100644 --- a/bt/tasks/decorators/bt_delay.h +++ b/bt/tasks/decorators/bt_delay.h @@ -1,7 +1,7 @@ /** * bt_delay.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/decorators/bt_for_each.cpp b/bt/tasks/decorators/bt_for_each.cpp index 7ec3f0f..0390586 100644 --- a/bt/tasks/decorators/bt_for_each.cpp +++ b/bt/tasks/decorators/bt_for_each.cpp @@ -70,9 +70,9 @@ BT::Status BTForEach::_tick(double p_delta) { //**** Godot void BTForEach::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_array_var", "p_variable"), &BTForEach::set_array_var); + ClassDB::bind_method(D_METHOD("set_array_var", "variable"), &BTForEach::set_array_var); ClassDB::bind_method(D_METHOD("get_array_var"), &BTForEach::get_array_var); - ClassDB::bind_method(D_METHOD("set_save_var", "p_variable"), &BTForEach::set_save_var); + ClassDB::bind_method(D_METHOD("set_save_var", "variable"), &BTForEach::set_save_var); ClassDB::bind_method(D_METHOD("get_save_var"), &BTForEach::get_save_var); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "array_var"), "set_array_var", "get_array_var"); diff --git a/bt/tasks/decorators/bt_new_scope.cpp b/bt/tasks/decorators/bt_new_scope.cpp index dd462f1..e1bb51c 100644 --- a/bt/tasks/decorators/bt_new_scope.cpp +++ b/bt/tasks/decorators/bt_new_scope.cpp @@ -1,7 +1,7 @@ /** * bt_new_scope.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -33,7 +33,7 @@ BT::Status BTNewScope::_tick(double p_delta) { } void BTNewScope::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BTNewScope::set_blackboard_plan); + ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BTNewScope::set_blackboard_plan); ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BTNewScope::get_blackboard_plan); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT), "set_blackboard_plan", "get_blackboard_plan"); diff --git a/bt/tasks/decorators/bt_new_scope.h b/bt/tasks/decorators/bt_new_scope.h index c5644a1..4630759 100644 --- a/bt/tasks/decorators/bt_new_scope.h +++ b/bt/tasks/decorators/bt_new_scope.h @@ -1,7 +1,7 @@ /** * bt_new_scope.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/decorators/bt_probability.cpp b/bt/tasks/decorators/bt_probability.cpp index 29f3b5d..f8d978c 100644 --- a/bt/tasks/decorators/bt_probability.cpp +++ b/bt/tasks/decorators/bt_probability.cpp @@ -1,7 +1,7 @@ /** * bt_probability.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -31,7 +31,7 @@ BT::Status BTProbability::_tick(double p_delta) { } void BTProbability::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_run_chance", "p_value"), &BTProbability::set_run_chance); + ClassDB::bind_method(D_METHOD("set_run_chance", "probability"), &BTProbability::set_run_chance); ClassDB::bind_method(D_METHOD("get_run_chance"), &BTProbability::get_run_chance); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "run_chance", PROPERTY_HINT_RANGE, "0.0,1.0"), "set_run_chance", "get_run_chance"); } diff --git a/bt/tasks/decorators/bt_probability.h b/bt/tasks/decorators/bt_probability.h index 1f1d2af..849d4df 100644 --- a/bt/tasks/decorators/bt_probability.h +++ b/bt/tasks/decorators/bt_probability.h @@ -1,7 +1,7 @@ /** * bt_probability.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/decorators/bt_repeat.cpp b/bt/tasks/decorators/bt_repeat.cpp index 8872e8a..fb4073f 100644 --- a/bt/tasks/decorators/bt_repeat.cpp +++ b/bt/tasks/decorators/bt_repeat.cpp @@ -1,7 +1,7 @@ /** * bt_repeat.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -61,11 +61,11 @@ void BTRepeat::_get_property_list(List *p_list) const { } void BTRepeat::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_forever", "p_value"), &BTRepeat::set_forever); + ClassDB::bind_method(D_METHOD("set_forever", "value"), &BTRepeat::set_forever); ClassDB::bind_method(D_METHOD("get_forever"), &BTRepeat::get_forever); - ClassDB::bind_method(D_METHOD("set_times", "p_value"), &BTRepeat::set_times); + ClassDB::bind_method(D_METHOD("set_times", "value"), &BTRepeat::set_times); ClassDB::bind_method(D_METHOD("get_times"), &BTRepeat::get_times); - ClassDB::bind_method(D_METHOD("set_abort_on_failure", "p_value"), &BTRepeat::set_abort_on_failure); + ClassDB::bind_method(D_METHOD("set_abort_on_failure", "enable"), &BTRepeat::set_abort_on_failure); ClassDB::bind_method(D_METHOD("get_abort_on_failure"), &BTRepeat::get_abort_on_failure); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "forever"), "set_forever", "get_forever"); diff --git a/bt/tasks/decorators/bt_run_limit.cpp b/bt/tasks/decorators/bt_run_limit.cpp index d26a923..34bfe5f 100644 --- a/bt/tasks/decorators/bt_run_limit.cpp +++ b/bt/tasks/decorators/bt_run_limit.cpp @@ -1,7 +1,7 @@ /** * bt_run_limit.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -40,9 +40,9 @@ BT::Status BTRunLimit::_tick(double p_delta) { } void BTRunLimit::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_run_limit", "p_value"), &BTRunLimit::set_run_limit); + ClassDB::bind_method(D_METHOD("set_run_limit", "max_runs"), &BTRunLimit::set_run_limit); ClassDB::bind_method(D_METHOD("get_run_limit"), &BTRunLimit::get_run_limit); - ClassDB::bind_method(D_METHOD("set_count_policy", "p_policy"), &BTRunLimit::set_count_policy); + ClassDB::bind_method(D_METHOD("set_count_policy", "count_policy"), &BTRunLimit::set_count_policy); ClassDB::bind_method(D_METHOD("get_count_policy"), &BTRunLimit::get_count_policy); ADD_PROPERTY(PropertyInfo(Variant::INT, "run_limit"), "set_run_limit", "get_run_limit"); diff --git a/bt/tasks/decorators/bt_subtree.cpp b/bt/tasks/decorators/bt_subtree.cpp index 0510920..c5a4b66 100644 --- a/bt/tasks/decorators/bt_subtree.cpp +++ b/bt/tasks/decorators/bt_subtree.cpp @@ -1,7 +1,7 @@ /** * bt_subtree.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -52,7 +52,7 @@ PackedStringArray BTSubtree::get_configuration_warnings() { } void BTSubtree::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_subtree", "p_value"), &BTSubtree::set_subtree); + ClassDB::bind_method(D_METHOD("set_subtree", "behavior_tree"), &BTSubtree::set_subtree); ClassDB::bind_method(D_METHOD("get_subtree"), &BTSubtree::get_subtree); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "subtree", PROPERTY_HINT_RESOURCE_TYPE, "BehaviorTree"), "set_subtree", "get_subtree"); diff --git a/bt/tasks/decorators/bt_subtree.h b/bt/tasks/decorators/bt_subtree.h index 516a5f9..d7c92cd 100644 --- a/bt/tasks/decorators/bt_subtree.h +++ b/bt/tasks/decorators/bt_subtree.h @@ -1,7 +1,7 @@ /** * bt_subtree.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/decorators/bt_time_limit.cpp b/bt/tasks/decorators/bt_time_limit.cpp index 912695e..d43e6fa 100644 --- a/bt/tasks/decorators/bt_time_limit.cpp +++ b/bt/tasks/decorators/bt_time_limit.cpp @@ -1,7 +1,7 @@ /** * bt_time_limit.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -31,7 +31,7 @@ BT::Status BTTimeLimit::_tick(double p_delta) { } void BTTimeLimit::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_time_limit", "p_value"), &BTTimeLimit::set_time_limit); + ClassDB::bind_method(D_METHOD("set_time_limit", "duration_sec"), &BTTimeLimit::set_time_limit); ClassDB::bind_method(D_METHOD("get_time_limit"), &BTTimeLimit::get_time_limit); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_limit"), "set_time_limit", "get_time_limit"); } diff --git a/bt/tasks/decorators/bt_time_limit.h b/bt/tasks/decorators/bt_time_limit.h index f89383e..fb9e558 100644 --- a/bt/tasks/decorators/bt_time_limit.h +++ b/bt/tasks/decorators/bt_time_limit.h @@ -1,7 +1,7 @@ /** * bt_time_limit.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_await_animation.cpp b/bt/tasks/scene/bt_await_animation.cpp index d36e710..67cee8e 100644 --- a/bt/tasks/scene/bt_await_animation.cpp +++ b/bt/tasks/scene/bt_await_animation.cpp @@ -1,7 +1,7 @@ /** * bt_await_animation.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -86,11 +86,11 @@ BT::Status BTAwaitAnimation::_tick(double p_delta) { //**** Godot void BTAwaitAnimation::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTAwaitAnimation::set_animation_player); + ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTAwaitAnimation::set_animation_player); ClassDB::bind_method(D_METHOD("get_animation_player"), &BTAwaitAnimation::get_animation_player); - ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTAwaitAnimation::set_animation_name); + ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTAwaitAnimation::set_animation_name); ClassDB::bind_method(D_METHOD("get_animation_name"), &BTAwaitAnimation::get_animation_name); - ClassDB::bind_method(D_METHOD("set_max_time", "p_time_sec"), &BTAwaitAnimation::set_max_time); + ClassDB::bind_method(D_METHOD("set_max_time", "time_sec"), &BTAwaitAnimation::set_max_time); ClassDB::bind_method(D_METHOD("get_max_time"), &BTAwaitAnimation::get_max_time); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player"); diff --git a/bt/tasks/scene/bt_await_animation.h b/bt/tasks/scene/bt_await_animation.h index e21291d..4a733dc 100644 --- a/bt/tasks/scene/bt_await_animation.h +++ b/bt/tasks/scene/bt_await_animation.h @@ -1,7 +1,7 @@ /** * bt_await_animation.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_check_agent_property.cpp b/bt/tasks/scene/bt_check_agent_property.cpp index 67b3542..31e4c4b 100644 --- a/bt/tasks/scene/bt_check_agent_property.cpp +++ b/bt/tasks/scene/bt_check_agent_property.cpp @@ -1,7 +1,7 @@ /** * bt_check_agent_property.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -68,11 +68,11 @@ BT::Status BTCheckAgentProperty::_tick(double p_delta) { } void BTCheckAgentProperty::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_property", "p_property"), &BTCheckAgentProperty::set_property); + ClassDB::bind_method(D_METHOD("set_property", "property"), &BTCheckAgentProperty::set_property); ClassDB::bind_method(D_METHOD("get_property"), &BTCheckAgentProperty::get_property); - ClassDB::bind_method(D_METHOD("set_check_type", "p_check_type"), &BTCheckAgentProperty::set_check_type); + ClassDB::bind_method(D_METHOD("set_check_type", "check_type"), &BTCheckAgentProperty::set_check_type); ClassDB::bind_method(D_METHOD("get_check_type"), &BTCheckAgentProperty::get_check_type); - ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTCheckAgentProperty::set_value); + ClassDB::bind_method(D_METHOD("set_value", "value"), &BTCheckAgentProperty::set_value); ClassDB::bind_method(D_METHOD("get_value"), &BTCheckAgentProperty::get_value); ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property"); diff --git a/bt/tasks/scene/bt_check_agent_property.h b/bt/tasks/scene/bt_check_agent_property.h index 16d2c73..a790fbf 100644 --- a/bt/tasks/scene/bt_check_agent_property.h +++ b/bt/tasks/scene/bt_check_agent_property.h @@ -1,7 +1,7 @@ /** * bt_check_agent_property.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_pause_animation.cpp b/bt/tasks/scene/bt_pause_animation.cpp index 66509c0..86e3958 100644 --- a/bt/tasks/scene/bt_pause_animation.cpp +++ b/bt/tasks/scene/bt_pause_animation.cpp @@ -1,7 +1,7 @@ /** * bt_pause_animation.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -58,7 +58,7 @@ BT::Status BTPauseAnimation::_tick(double p_delta) { //**** Godot void BTPauseAnimation::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTPauseAnimation::set_animation_player); + ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTPauseAnimation::set_animation_player); ClassDB::bind_method(D_METHOD("get_animation_player"), &BTPauseAnimation::get_animation_player); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player"); diff --git a/bt/tasks/scene/bt_pause_animation.h b/bt/tasks/scene/bt_pause_animation.h index b58b993..6f73ba8 100644 --- a/bt/tasks/scene/bt_pause_animation.h +++ b/bt/tasks/scene/bt_pause_animation.h @@ -1,7 +1,7 @@ /** * bt_pause_animation.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_play_animation.cpp b/bt/tasks/scene/bt_play_animation.cpp index 3f8961e..e2de77d 100644 --- a/bt/tasks/scene/bt_play_animation.cpp +++ b/bt/tasks/scene/bt_play_animation.cpp @@ -1,7 +1,7 @@ /** * bt_play_animation.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -109,17 +109,17 @@ BT::Status BTPlayAnimation::_tick(double p_delta) { //**** Godot void BTPlayAnimation::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTPlayAnimation::set_animation_player); + ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTPlayAnimation::set_animation_player); ClassDB::bind_method(D_METHOD("get_animation_player"), &BTPlayAnimation::get_animation_player); - ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTPlayAnimation::set_animation_name); + ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTPlayAnimation::set_animation_name); ClassDB::bind_method(D_METHOD("get_animation_name"), &BTPlayAnimation::get_animation_name); - ClassDB::bind_method(D_METHOD("set_await_completion", "p_time_sec"), &BTPlayAnimation::set_await_completion); + ClassDB::bind_method(D_METHOD("set_await_completion", "time_sec"), &BTPlayAnimation::set_await_completion); ClassDB::bind_method(D_METHOD("get_await_completion"), &BTPlayAnimation::get_await_completion); - ClassDB::bind_method(D_METHOD("set_blend", "p_blend"), &BTPlayAnimation::set_blend); + ClassDB::bind_method(D_METHOD("set_blend", "blend"), &BTPlayAnimation::set_blend); ClassDB::bind_method(D_METHOD("get_blend"), &BTPlayAnimation::get_blend); - ClassDB::bind_method(D_METHOD("set_speed", "p_speed"), &BTPlayAnimation::set_speed); + ClassDB::bind_method(D_METHOD("set_speed", "speed"), &BTPlayAnimation::set_speed); ClassDB::bind_method(D_METHOD("get_speed"), &BTPlayAnimation::get_speed); - ClassDB::bind_method(D_METHOD("set_from_end", "p_from_end"), &BTPlayAnimation::set_from_end); + ClassDB::bind_method(D_METHOD("set_from_end", "from_end"), &BTPlayAnimation::set_from_end); ClassDB::bind_method(D_METHOD("get_from_end"), &BTPlayAnimation::get_from_end); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "await_completion", PROPERTY_HINT_RANGE, "0.0,100.0"), "set_await_completion", "get_await_completion"); diff --git a/bt/tasks/scene/bt_play_animation.h b/bt/tasks/scene/bt_play_animation.h index bef4d95..c27fee6 100644 --- a/bt/tasks/scene/bt_play_animation.h +++ b/bt/tasks/scene/bt_play_animation.h @@ -1,7 +1,7 @@ /** * bt_play_animation.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_set_agent_property.cpp b/bt/tasks/scene/bt_set_agent_property.cpp index e6475ad..f104a98 100644 --- a/bt/tasks/scene/bt_set_agent_property.cpp +++ b/bt/tasks/scene/bt_set_agent_property.cpp @@ -1,7 +1,7 @@ /** * bt_set_agent_property.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -81,11 +81,11 @@ BT::Status BTSetAgentProperty::_tick(double p_delta) { } void BTSetAgentProperty::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_property", "p_property"), &BTSetAgentProperty::set_property); + ClassDB::bind_method(D_METHOD("set_property", "property"), &BTSetAgentProperty::set_property); ClassDB::bind_method(D_METHOD("get_property"), &BTSetAgentProperty::get_property); - ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTSetAgentProperty::set_value); + ClassDB::bind_method(D_METHOD("set_value", "value"), &BTSetAgentProperty::set_value); ClassDB::bind_method(D_METHOD("get_value"), &BTSetAgentProperty::get_value); - ClassDB::bind_method(D_METHOD("set_operation", "p_operation"), &BTSetAgentProperty::set_operation); + ClassDB::bind_method(D_METHOD("set_operation", "operation"), &BTSetAgentProperty::set_operation); ClassDB::bind_method(D_METHOD("get_operation"), &BTSetAgentProperty::get_operation); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "property"), "set_property", "get_property"); diff --git a/bt/tasks/scene/bt_set_agent_property.h b/bt/tasks/scene/bt_set_agent_property.h index 1e52230..ca20ff4 100644 --- a/bt/tasks/scene/bt_set_agent_property.h +++ b/bt/tasks/scene/bt_set_agent_property.h @@ -1,7 +1,7 @@ /** * bt_set_agent_property.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/scene/bt_stop_animation.cpp b/bt/tasks/scene/bt_stop_animation.cpp index 8a9dc39..20e7f41 100644 --- a/bt/tasks/scene/bt_stop_animation.cpp +++ b/bt/tasks/scene/bt_stop_animation.cpp @@ -1,7 +1,7 @@ /** * bt_stop_animation.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -75,11 +75,11 @@ BT::Status BTStopAnimation::_tick(double p_delta) { //**** Godot void BTStopAnimation::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTStopAnimation::set_animation_player); + ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTStopAnimation::set_animation_player); ClassDB::bind_method(D_METHOD("get_animation_player"), &BTStopAnimation::get_animation_player); - ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTStopAnimation::set_animation_name); + ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTStopAnimation::set_animation_name); ClassDB::bind_method(D_METHOD("get_animation_name"), &BTStopAnimation::get_animation_name); - ClassDB::bind_method(D_METHOD("set_keep_state", "p_keep_state"), &BTStopAnimation::set_keep_state); + ClassDB::bind_method(D_METHOD("set_keep_state", "keep_state"), &BTStopAnimation::set_keep_state); ClassDB::bind_method(D_METHOD("get_keep_state"), &BTStopAnimation::get_keep_state); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player"); diff --git a/bt/tasks/scene/bt_stop_animation.h b/bt/tasks/scene/bt_stop_animation.h index 4bc66a5..481676a 100644 --- a/bt/tasks/scene/bt_stop_animation.h +++ b/bt/tasks/scene/bt_stop_animation.h @@ -1,7 +1,7 @@ /** * bt_stop_animation.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/utility/bt_call_method.cpp b/bt/tasks/utility/bt_call_method.cpp index 6a59e6c..0d3f36d 100644 --- a/bt/tasks/utility/bt_call_method.cpp +++ b/bt/tasks/utility/bt_call_method.cpp @@ -134,15 +134,15 @@ BT::Status BTCallMethod::_tick(double p_delta) { //**** Godot void BTCallMethod::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_method", "p_method"), &BTCallMethod::set_method); + ClassDB::bind_method(D_METHOD("set_method", "method_name"), &BTCallMethod::set_method); ClassDB::bind_method(D_METHOD("get_method"), &BTCallMethod::get_method); - ClassDB::bind_method(D_METHOD("set_node_param", "p_param"), &BTCallMethod::set_node_param); + ClassDB::bind_method(D_METHOD("set_node_param", "param"), &BTCallMethod::set_node_param); ClassDB::bind_method(D_METHOD("get_node_param"), &BTCallMethod::get_node_param); - ClassDB::bind_method(D_METHOD("set_args", "p_args"), &BTCallMethod::set_args); + ClassDB::bind_method(D_METHOD("set_args", "args"), &BTCallMethod::set_args); ClassDB::bind_method(D_METHOD("get_args"), &BTCallMethod::get_args); - ClassDB::bind_method(D_METHOD("set_include_delta", "p_include_delta"), &BTCallMethod::set_include_delta); + ClassDB::bind_method(D_METHOD("set_include_delta", "include_delta"), &BTCallMethod::set_include_delta); ClassDB::bind_method(D_METHOD("is_delta_included"), &BTCallMethod::is_delta_included); - ClassDB::bind_method(D_METHOD("set_result_var", "p_result_var"), &BTCallMethod::set_result_var); + ClassDB::bind_method(D_METHOD("set_result_var", "variable"), &BTCallMethod::set_result_var); ClassDB::bind_method(D_METHOD("get_result_var"), &BTCallMethod::get_result_var); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_node_param", "get_node_param"); @@ -151,8 +151,6 @@ void BTCallMethod::_bind_methods() { ADD_GROUP("Arguments", "args_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "args_include_delta"), "set_include_delta", "is_delta_included"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "args", PROPERTY_HINT_ARRAY_TYPE, RESOURCE_TYPE_HINT("BBVariant")), "set_args", "get_args"); - - // ADD_PROPERTY_DEFAULT("args_include_delta", false); } BTCallMethod::BTCallMethod() { diff --git a/bt/tasks/utility/bt_console_print.cpp b/bt/tasks/utility/bt_console_print.cpp index 7b3227d..dc64a5c 100644 --- a/bt/tasks/utility/bt_console_print.cpp +++ b/bt/tasks/utility/bt_console_print.cpp @@ -1,7 +1,7 @@ /** * bt_console_print.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -72,9 +72,9 @@ PackedStringArray BTConsolePrint::get_configuration_warnings() { } void BTConsolePrint::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_text", "p_text"), &BTConsolePrint::set_text); + ClassDB::bind_method(D_METHOD("set_text", "text"), &BTConsolePrint::set_text); ClassDB::bind_method(D_METHOD("get_text"), &BTConsolePrint::get_text); - ClassDB::bind_method(D_METHOD("set_bb_format_parameters", "p_variables"), &BTConsolePrint::set_bb_format_parameters); + ClassDB::bind_method(D_METHOD("set_bb_format_parameters", "params"), &BTConsolePrint::set_bb_format_parameters); ClassDB::bind_method(D_METHOD("get_bb_format_parameters"), &BTConsolePrint::get_bb_format_parameters); ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text"); diff --git a/bt/tasks/utility/bt_console_print.h b/bt/tasks/utility/bt_console_print.h index 40cfe06..74f6dcd 100644 --- a/bt/tasks/utility/bt_console_print.h +++ b/bt/tasks/utility/bt_console_print.h @@ -1,7 +1,7 @@ /** * bt_console_print.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/utility/bt_evaluate_expression.cpp b/bt/tasks/utility/bt_evaluate_expression.cpp index 5a7a09c..bea39dc 100644 --- a/bt/tasks/utility/bt_evaluate_expression.cpp +++ b/bt/tasks/utility/bt_evaluate_expression.cpp @@ -133,17 +133,17 @@ BT::Status BTEvaluateExpression::_tick(double p_delta) { void BTEvaluateExpression::_bind_methods() { ClassDB::bind_method(D_METHOD("parse"), &BTEvaluateExpression::parse); - ClassDB::bind_method(D_METHOD("set_expression_string", "p_method"), &BTEvaluateExpression::set_expression_string); + ClassDB::bind_method(D_METHOD("set_expression_string", "expression_string"), &BTEvaluateExpression::set_expression_string); ClassDB::bind_method(D_METHOD("get_expression_string"), &BTEvaluateExpression::get_expression_string); - ClassDB::bind_method(D_METHOD("set_node_param", "p_param"), &BTEvaluateExpression::set_node_param); + ClassDB::bind_method(D_METHOD("set_node_param", "param"), &BTEvaluateExpression::set_node_param); ClassDB::bind_method(D_METHOD("get_node_param"), &BTEvaluateExpression::get_node_param); - ClassDB::bind_method(D_METHOD("set_input_names", "p_input_names"), &BTEvaluateExpression::set_input_names); + ClassDB::bind_method(D_METHOD("set_input_names", "input_names"), &BTEvaluateExpression::set_input_names); ClassDB::bind_method(D_METHOD("get_input_names"), &BTEvaluateExpression::get_input_names); - ClassDB::bind_method(D_METHOD("set_input_values", "p_input_values"), &BTEvaluateExpression::set_input_values); + ClassDB::bind_method(D_METHOD("set_input_values", "input_values"), &BTEvaluateExpression::set_input_values); ClassDB::bind_method(D_METHOD("get_input_values"), &BTEvaluateExpression::get_input_values); - ClassDB::bind_method(D_METHOD("set_input_include_delta", "p_input_include_delta"), &BTEvaluateExpression::set_input_include_delta); + ClassDB::bind_method(D_METHOD("set_input_include_delta", "input_include_delta"), &BTEvaluateExpression::set_input_include_delta); ClassDB::bind_method(D_METHOD("is_input_delta_included"), &BTEvaluateExpression::is_input_delta_included); - ClassDB::bind_method(D_METHOD("set_result_var", "p_result_var"), &BTEvaluateExpression::set_result_var); + ClassDB::bind_method(D_METHOD("set_result_var", "variable"), &BTEvaluateExpression::set_result_var); ClassDB::bind_method(D_METHOD("get_result_var"), &BTEvaluateExpression::get_result_var); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_node_param", "get_node_param"); diff --git a/bt/tasks/utility/bt_random_wait.cpp b/bt/tasks/utility/bt_random_wait.cpp index c2bf74b..b03b7c0 100644 --- a/bt/tasks/utility/bt_random_wait.cpp +++ b/bt/tasks/utility/bt_random_wait.cpp @@ -1,7 +1,7 @@ /** * bt_random_wait.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -48,9 +48,9 @@ void BTRandomWait::set_max_duration(double p_max_duration) { } void BTRandomWait::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_min_duration", "p_value"), &BTRandomWait::set_min_duration); + ClassDB::bind_method(D_METHOD("set_min_duration", "duration_sec"), &BTRandomWait::set_min_duration); ClassDB::bind_method(D_METHOD("get_min_duration"), &BTRandomWait::get_min_duration); - ClassDB::bind_method(D_METHOD("set_max_duration", "p_value"), &BTRandomWait::set_max_duration); + ClassDB::bind_method(D_METHOD("set_max_duration", "duration_sec"), &BTRandomWait::set_max_duration); ClassDB::bind_method(D_METHOD("get_max_duration"), &BTRandomWait::get_max_duration); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_duration"), "set_min_duration", "get_min_duration"); diff --git a/bt/tasks/utility/bt_random_wait.h b/bt/tasks/utility/bt_random_wait.h index 4e041e0..c1474b1 100644 --- a/bt/tasks/utility/bt_random_wait.h +++ b/bt/tasks/utility/bt_random_wait.h @@ -1,7 +1,7 @@ /** * bt_random_wait.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/bt/tasks/utility/bt_wait.cpp b/bt/tasks/utility/bt_wait.cpp index 585b584..f2623ba 100644 --- a/bt/tasks/utility/bt_wait.cpp +++ b/bt/tasks/utility/bt_wait.cpp @@ -1,7 +1,7 @@ /** * bt_wait.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -24,7 +24,7 @@ BT::Status BTWait::_tick(double p_delta) { } void BTWait::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_duration", "p_value"), &BTWait::set_duration); + ClassDB::bind_method(D_METHOD("set_duration", "duration_sec"), &BTWait::set_duration); ClassDB::bind_method(D_METHOD("get_duration"), &BTWait::get_duration); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "duration"), "set_duration", "get_duration"); diff --git a/bt/tasks/utility/bt_wait_ticks.cpp b/bt/tasks/utility/bt_wait_ticks.cpp index 3ff04a2..8094d06 100644 --- a/bt/tasks/utility/bt_wait_ticks.cpp +++ b/bt/tasks/utility/bt_wait_ticks.cpp @@ -1,7 +1,7 @@ /** * bt_wait_ticks.cpp * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at @@ -29,7 +29,7 @@ BT::Status BTWaitTicks::_tick(double p_delta) { } void BTWaitTicks::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_num_ticks", "p_value"), &BTWaitTicks::set_num_ticks); + ClassDB::bind_method(D_METHOD("set_num_ticks", "num_ticks"), &BTWaitTicks::set_num_ticks); ClassDB::bind_method(D_METHOD("get_num_ticks"), &BTWaitTicks::get_num_ticks); ADD_PROPERTY(PropertyInfo(Variant::INT, "num_ticks"), "set_num_ticks", "get_num_ticks"); diff --git a/bt/tasks/utility/bt_wait_ticks.h b/bt/tasks/utility/bt_wait_ticks.h index 376ed84..ee10931 100644 --- a/bt/tasks/utility/bt_wait_ticks.h +++ b/bt/tasks/utility/bt_wait_ticks.h @@ -1,7 +1,7 @@ /** * bt_wait_ticks.h * ============================================================================= - * Copyright 2021-2023 Serhii Snitsaruk + * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at diff --git a/doc/source/classes/class_bbparam.rst b/doc/source/classes/class_bbparam.rst index b9c3f04..af4eef6 100644 --- a/doc/source/classes/class_bbparam.rst +++ b/doc/source/classes/class_bbparam.rst @@ -49,11 +49,11 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant.Type` | :ref:`get_type` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Variant | :ref:`get_value` **(** Object p_agent, :ref:`Blackboard` p_blackboard, Variant p_default=null **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant.Type` | :ref:`get_type` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | Variant | :ref:`get_value` **(** Object agent, :ref:`Blackboard` blackboard, Variant default=null **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -167,7 +167,7 @@ Returns the expected data type of the parameter. .. rst-class:: classref-method -Variant **get_value** **(** Object p_agent, :ref:`Blackboard` p_blackboard, Variant p_default=null **)** +Variant **get_value** **(** Object agent, :ref:`Blackboard` blackboard, Variant default=null **)** Returns the value of the parameter. diff --git a/doc/source/classes/class_behaviortree.rst b/doc/source/classes/class_behaviortree.rst index a1ba8e9..a5b153f 100644 --- a/doc/source/classes/class_behaviortree.rst +++ b/doc/source/classes/class_behaviortree.rst @@ -55,17 +55,17 @@ Methods .. table:: :widths: auto - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BehaviorTree` | :ref:`clone` **(** **)** |const| | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`copy_other` **(** :ref:`BehaviorTree` p_other **)** | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`get_root_task` **(** **)** |const| | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`instantiate` **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** |const| | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_root_task` **(** :ref:`BTTask` p_value **)** | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BehaviorTree` | :ref:`clone` **(** **)** |const| | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`copy_other` **(** :ref:`BehaviorTree` other **)** | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_root_task` **(** **)** |const| | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`instantiate` **(** Node agent, :ref:`Blackboard` blackboard **)** |const| | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_root_task` **(** :ref:`BTTask` task **)** | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,7 +131,7 @@ Makes a copy of the BehaviorTree resource. .. rst-class:: classref-method -void **copy_other** **(** :ref:`BehaviorTree` p_other **)** +void **copy_other** **(** :ref:`BehaviorTree` other **)** Become a copy of another behavior tree. @@ -155,7 +155,7 @@ Returns the root task of the BehaviorTree resource. .. rst-class:: classref-method -:ref:`BTTask` **instantiate** **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** |const| +:ref:`BTTask` **instantiate** **(** Node agent, :ref:`Blackboard` blackboard **)** |const| Instantiates the Behavior Tree and returns the root :ref:`BTTask`. @@ -167,7 +167,7 @@ Instantiates the Behavior Tree and returns the root :ref:`BTTask`. .. rst-class:: classref-method -void **set_root_task** **(** :ref:`BTTask` p_value **)** +void **set_root_task** **(** :ref:`BTTask` task **)** Assigns a new root task to the **BehaviorTree** resource. diff --git a/doc/source/classes/class_behaviortreedata.rst b/doc/source/classes/class_behaviortreedata.rst index abac5a2..cd02d0f 100644 --- a/doc/source/classes/class_behaviortreedata.rst +++ b/doc/source/classes/class_behaviortreedata.rst @@ -31,9 +31,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BehaviorTreeData` | :ref:`create_from_tree_instance` **(** :ref:`BTTask` p_tree_instance **)** |static| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BehaviorTreeData` | :ref:`create_from_tree_instance` **(** :ref:`BTTask` tree_instance **)** |static| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,9 +48,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`BehaviorTreeData` **create_from_tree_instance** **(** :ref:`BTTask` p_tree_instance **)** |static| +:ref:`BehaviorTreeData` **create_from_tree_instance** **(** :ref:`BTTask` tree_instance **)** |static| -Returns current state of the ``p_tree_instance`` encoded as a **BehaviorTreeData**, suitable for use with :ref:`BehaviorTreeView`. +Returns current state of the ``tree_instance`` encoded as a **BehaviorTreeData**, suitable for use with :ref:`BehaviorTreeView`. Behavior tree instance can be acquired with :ref:`BTPlayer.get_tree_instance`. diff --git a/doc/source/classes/class_behaviortreeview.rst b/doc/source/classes/class_behaviortreeview.rst index 0225c5a..13f2e60 100644 --- a/doc/source/classes/class_behaviortreeview.rst +++ b/doc/source/classes/class_behaviortreeview.rst @@ -41,9 +41,9 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_tree` **(** :ref:`BehaviorTreeData` p_behavior_tree_data **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_tree` **(** :ref:`BehaviorTreeData` behavior_tree_data **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,7 @@ Signals .. rst-class:: classref-signal -**task_selected** **(** String p_type_name, String p_script_path **)** +**task_selected** **(** String type_name, String script_path **)** Emitted when a task item is selected in **BehaviorTreeView**. @@ -97,7 +97,7 @@ Method Descriptions .. rst-class:: classref-method -void **update_tree** **(** :ref:`BehaviorTreeData` p_behavior_tree_data **)** +void **update_tree** **(** :ref:`BehaviorTreeData` behavior_tree_data **)** Updates the representation of a :ref:`BehaviorTree` instance. See also :ref:`BehaviorTreeData`. diff --git a/doc/source/classes/class_blackboard.rst b/doc/source/classes/class_blackboard.rst index c026a54..330d15b 100644 --- a/doc/source/classes/class_blackboard.rst +++ b/doc/source/classes/class_blackboard.rst @@ -33,27 +33,27 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bind_var_to_property` **(** StringName p_name, Object p_object, StringName p_property **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_var` **(** StringName p_name **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Blackboard` | :ref:`get_parent` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | Variant | :ref:`get_var` **(** StringName p_name, Variant p_default=null, bool p_complain=true **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`has_var` **(** StringName p_name **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`prefetch_nodepath_vars` **(** Node p_node **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_parent` **(** :ref:`Blackboard` p_blackboard **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_var` **(** StringName p_name, Variant p_value **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Blackboard` | :ref:`top` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unbind_var` **(** StringName p_name **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bind_var_to_property` **(** StringName var_name, Object object, StringName property **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_var` **(** StringName var_name **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`get_parent` **(** **)** |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | Variant | :ref:`get_var` **(** StringName var_name, Variant default=null, bool complain=true **)** |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`has_var` **(** StringName var_name **)** |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`prefetch_nodepath_vars` **(** Node node **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_parent` **(** :ref:`Blackboard` blackboard **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_var` **(** StringName var_name, Variant value **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`top` **(** **)** |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unbind_var` **(** StringName var_name **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,9 +68,9 @@ Method Descriptions .. rst-class:: classref-method -void **bind_var_to_property** **(** StringName p_name, Object p_object, StringName p_property **)** +void **bind_var_to_property** **(** StringName var_name, Object object, StringName property **)** -Establish a binding between a variable and the object's property specified by ``p_property`` and ``p_object``. Changes to the variable update the property, and vice versa. +Establish a binding between a variable and the object's property specified by ``property`` and ``object``. Changes to the variable update the property, and vice versa. .. rst-class:: classref-item-separator @@ -80,7 +80,7 @@ Establish a binding between a variable and the object's property specified by `` .. rst-class:: classref-method -void **erase_var** **(** StringName p_name **)** +void **erase_var** **(** StringName var_name **)** Removes a variable by its name. @@ -104,9 +104,9 @@ Returns a Blackboard that serves as the parent scope for this instance. .. rst-class:: classref-method -Variant **get_var** **(** StringName p_name, Variant p_default=null, bool p_complain=true **)** |const| +Variant **get_var** **(** StringName var_name, Variant default=null, bool complain=true **)** |const| -Returns variable value or ``p_default`` if variable doesn't exist. If ``p_complain`` is ``true``, an error will be printed if variable doesn't exist. +Returns variable value or ``default`` if variable doesn't exist. If ``complain`` is ``true``, an error will be printed if variable doesn't exist. .. rst-class:: classref-item-separator @@ -116,9 +116,9 @@ Returns variable value or ``p_default`` if variable doesn't exist. If ``p_compla .. rst-class:: classref-method -bool **has_var** **(** StringName p_name **)** |const| +bool **has_var** **(** StringName var_name **)** |const| -Returns ``true`` if the Blackboard contains the ``p_name`` variable, including the parent scopes. +Returns ``true`` if the Blackboard contains the ``var_name`` variable, including the parent scopes. .. rst-class:: classref-item-separator @@ -128,7 +128,7 @@ Returns ``true`` if the Blackboard contains the ``p_name`` variable, including t .. rst-class:: classref-method -void **prefetch_nodepath_vars** **(** Node p_node **)** +void **prefetch_nodepath_vars** **(** Node node **)** If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with ``Node`` references when the tree is instantiated. References are retrieved by calling :ref:`Node.get_node` on the agent instance. @@ -140,7 +140,7 @@ If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with .. rst-class:: classref-method -void **set_parent** **(** :ref:`Blackboard` p_blackboard **)** +void **set_parent** **(** :ref:`Blackboard` blackboard **)** Assigns the parent scope. If a value isn't in the current Blackboard scope, it will look in the parent scope Blackboard to find it. @@ -152,7 +152,7 @@ Assigns the parent scope. If a value isn't in the current Blackboard scope, it w .. rst-class:: classref-method -void **set_var** **(** StringName p_name, Variant p_value **)** +void **set_var** **(** StringName var_name, Variant value **)** Assigns a value to a Blackboard variable. @@ -176,7 +176,7 @@ Returns the topmost **Blackboard** in the scope chain. .. rst-class:: classref-method -void **unbind_var** **(** StringName p_name **)** +void **unbind_var** **(** StringName var_name **)** Remove binding from a variable. diff --git a/doc/source/classes/class_blackboardplan.rst b/doc/source/classes/class_blackboardplan.rst index 2c967d6..016269e 100644 --- a/doc/source/classes/class_blackboardplan.rst +++ b/doc/source/classes/class_blackboardplan.rst @@ -22,11 +22,11 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Blackboard` | :ref:`create_blackboard` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`populate_blackboard` **(** :ref:`Blackboard` p_blackboard, bool p_overwrite **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`create_blackboard` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`populate_blackboard` **(** :ref:`Blackboard` blackboard, bool overwrite **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -53,9 +53,9 @@ Constructs a new instance of a :ref:`Blackboard` using this pl .. rst-class:: classref-method -void **populate_blackboard** **(** :ref:`Blackboard` p_blackboard, bool p_overwrite **)** +void **populate_blackboard** **(** :ref:`Blackboard` blackboard, bool overwrite **)** -Populates ``p_blackboard`` with the variables from this plan. If ``p_overwrite`` is ``true``, existing variables with the same names will be overwritten. +Populates ``blackboard`` with the variables from this plan. If ``overwrite`` is ``true``, existing variables with the same names will be overwritten. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/doc/source/classes/class_btplayer.rst b/doc/source/classes/class_btplayer.rst index 9fa4aa9..e5a3e0b 100644 --- a/doc/source/classes/class_btplayer.rst +++ b/doc/source/classes/class_btplayer.rst @@ -62,7 +62,7 @@ Methods +-----------------------------+-----------------------------------------------------------------------------------+ | void | :ref:`restart` **(** **)** | +-----------------------------+-----------------------------------------------------------------------------------+ - | void | :ref:`update` **(** float p_delta **)** | + | void | :ref:`update` **(** float delta **)** | +-----------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,11 +78,11 @@ Signals .. rst-class:: classref-signal -**behavior_tree_finished** **(** int p_status **)** +**behavior_tree_finished** **(** int status **)** Emitted when the behavior tree has finished executing and returned ``SUCCESS`` or ``FAILURE``. -Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status`. +Argument ``status`` holds the status returned by the behavior tree. See :ref:`Status`. .. rst-class:: classref-item-separator @@ -92,11 +92,11 @@ Argument ``p_status`` holds the status returned by the behavior tree. See :ref:` .. rst-class:: classref-signal -**updated** **(** int p_status **)** +**updated** **(** int status **)** Emitted when BTPlayer has finished the behavior tree update. -Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status`. +Argument ``status`` holds the status returned by the behavior tree. See :ref:`Status`. .. rst-class:: classref-section-separator @@ -305,7 +305,7 @@ Resets the behavior tree's execution. Each running task will be aborted and the .. rst-class:: classref-method -void **update** **(** float p_delta **)** +void **update** **(** float delta **)** Executes the root task of the behavior tree instance if :ref:`active` is ``true``. Call this method when :ref:`update_mode` is set to :ref:`MANUAL`. When :ref:`update_mode` is not :ref:`MANUAL`, the :ref:`update` will be called automatically. See :ref:`UpdateMode`. diff --git a/doc/source/classes/class_btprobabilityselector.rst b/doc/source/classes/class_btprobabilityselector.rst index 306920e..8b2ee24 100644 --- a/doc/source/classes/class_btprobabilityselector.rst +++ b/doc/source/classes/class_btprobabilityselector.rst @@ -52,17 +52,17 @@ Methods :widths: auto +-------+-------------------------------------------------------------------------------------------------------------------------+ - | float | :ref:`get_probability` **(** int p_index **)** |const| | + | float | :ref:`get_probability` **(** int child_idx **)** |const| | +-------+-------------------------------------------------------------------------------------------------------------------------+ | float | :ref:`get_total_weight` **(** **)** |const| | +-------+-------------------------------------------------------------------------------------------------------------------------+ - | float | :ref:`get_weight` **(** int p_index **)** |const| | + | float | :ref:`get_weight` **(** int child_idx **)** |const| | +-------+-------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`has_probability` **(** int p_index **)** |const| | + | bool | :ref:`has_probability` **(** int child_idx **)** |const| | +-------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_probability` **(** int p_index, float p_probability **)** | + | void | :ref:`set_probability` **(** int child_idx, float probability **)** | +-------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_weight` **(** int p_index, float p_weight **)** | + | void | :ref:`set_weight` **(** int child_idx, float weight **)** | +-------+-------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -100,7 +100,7 @@ Method Descriptions .. rst-class:: classref-method -float **get_probability** **(** int p_index **)** |const| +float **get_probability** **(** int child_idx **)** |const| Returns the child task's selection probability. @@ -124,7 +124,7 @@ Returns the total weight of all child tasks. .. rst-class:: classref-method -float **get_weight** **(** int p_index **)** |const| +float **get_weight** **(** int child_idx **)** |const| Returns the child task's weight within the weighted probability selection algorithm. @@ -136,9 +136,9 @@ Returns the child task's weight within the weighted probability selection algori .. rst-class:: classref-method -bool **has_probability** **(** int p_index **)** |const| +bool **has_probability** **(** int child_idx **)** |const| -Returns whether the child task at index ``p_index`` participates within the weighted probability selection algorithm and has a probability assigned to it. Returns ``false`` for :ref:`BTComment` tasks. +Returns whether the child task at index ``child_idx`` participates within the weighted probability selection algorithm and has a probability assigned to it. Returns ``false`` for :ref:`BTComment` tasks. .. rst-class:: classref-item-separator @@ -148,7 +148,7 @@ Returns whether the child task at index ``p_index`` participates within the weig .. rst-class:: classref-method -void **set_probability** **(** int p_index, float p_probability **)** +void **set_probability** **(** int child_idx, float probability **)** Sets the child task's weight calculated based on the desired probability. @@ -160,7 +160,7 @@ Sets the child task's weight calculated based on the desired probability. .. rst-class:: classref-method -void **set_weight** **(** int p_index, float p_weight **)** +void **set_weight** **(** int child_idx, float weight **)** Sets the child task's weight for the weighted probability selection algorithm. diff --git a/doc/source/classes/class_bttask.rst b/doc/source/classes/class_bttask.rst index ecd8bf6..b448e87 100644 --- a/doc/source/classes/class_bttask.rst +++ b/doc/source/classes/class_bttask.rst @@ -57,59 +57,59 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enter` **(** **)** |virtual| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_exit` **(** **)** |virtual| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | String | :ref:`_generate_name` **(** **)** |virtual| |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | PackedStringArray | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup` **(** **)** |virtual| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status` | :ref:`_tick` **(** float p_delta **)** |virtual| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`abort` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_child` **(** :ref:`BTTask` p_child **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_child_at_index` **(** :ref:`BTTask` p_child, int p_idx **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`clone` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status` | :ref:`execute` **(** float p_delta **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`get_child` **(** int p_idx **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | int | :ref:`get_child_count` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | int | :ref:`get_child_count_excluding_comments` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | int | :ref:`get_index` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`get_parent` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`get_root` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | String | :ref:`get_task_name` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`has_child` **(** :ref:`BTTask` p_child **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`initialize` **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`is_descendant_of` **(** :ref:`BTTask` p_task **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`is_root` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BTTask` | :ref:`next_sibling` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_tree` **(** int p_initial_tabs=0 **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_child` **(** :ref:`BTTask` p_child **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_child_at_index` **(** int p_idx **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enter` **(** **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_exit` **(** **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | String | :ref:`_generate_name` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | PackedStringArray | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup` **(** **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`_tick` **(** float delta **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`abort` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child` **(** :ref:`BTTask` task **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child_at_index` **(** :ref:`BTTask` task, int idx **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`clone` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`execute` **(** float delta **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_child` **(** int idx **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_child_count` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_child_count_excluding_comments` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_parent` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_root` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | String | :ref:`get_task_name` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`has_child` **(** :ref:`BTTask` task **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize` **(** Node agent, :ref:`Blackboard` blackboard **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_descendant_of` **(** :ref:`BTTask` task **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_root` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`next_sibling` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`print_tree` **(** int initial_tabs=0 **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child` **(** :ref:`BTTask` task **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child_at_index` **(** int idx **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -277,7 +277,7 @@ Called to initialize a task during initialization step. It is called only once b .. rst-class:: classref-method -:ref:`Status` **_tick** **(** float p_delta **)** |virtual| +:ref:`Status` **_tick** **(** float delta **)** |virtual| Called when task is "ticked", i.e. executed by :ref:`BTPlayer` or :ref:`BTState` during an update. @@ -305,9 +305,9 @@ Resets the task and its children recursively. If a task is in the ``RUNNING`` st .. rst-class:: classref-method -void **add_child** **(** :ref:`BTTask` p_child **)** +void **add_child** **(** :ref:`BTTask` task **)** -Adds a child task. The ``p_child`` is placed at the end of the children list. +Adds a child task. The ``task`` is placed at the end of the children list. .. rst-class:: classref-item-separator @@ -317,9 +317,9 @@ Adds a child task. The ``p_child`` is placed at the end of the children list. .. rst-class:: classref-method -void **add_child_at_index** **(** :ref:`BTTask` p_child, int p_idx **)** +void **add_child_at_index** **(** :ref:`BTTask` task, int idx **)** -Adds a child task. The ``p_child`` is placed at ``p_idx`` position in the children list. +Adds a child task. The ``task`` is placed at ``idx`` position in the children list. .. rst-class:: classref-item-separator @@ -341,7 +341,7 @@ Duplicates the task and its children, copying the exported members. Sub-resource .. rst-class:: classref-method -:ref:`Status` **execute** **(** float p_delta **)** +:ref:`Status` **execute** **(** float delta **)** Performs task's execution. The execution follows a specific sequence: @@ -359,7 +359,7 @@ Performs task's execution. The execution follows a specific sequence: .. rst-class:: classref-method -:ref:`BTTask` **get_child** **(** int p_idx **)** |const| +:ref:`BTTask` **get_child** **(** int idx **)** |const| Returns a child task by specifying its index. @@ -445,9 +445,9 @@ Method :ref:`_generate_name` is call .. rst-class:: classref-method -bool **has_child** **(** :ref:`BTTask` p_child **)** |const| +bool **has_child** **(** :ref:`BTTask` task **)** |const| -Returns ``true`` if ``p_child`` is a child of this task. +Returns ``true`` if ``task`` is a child of this task. .. rst-class:: classref-item-separator @@ -457,7 +457,7 @@ Returns ``true`` if ``p_child`` is a child of this task. .. rst-class:: classref-method -void **initialize** **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** +void **initialize** **(** Node agent, :ref:`Blackboard` blackboard **)** Initilizes the task. Assigns :ref:`agent` and :ref:`blackboard`, and calls :ref:`_setup` for the task and its children. @@ -471,9 +471,9 @@ The method is called recursively for each child task. .. rst-class:: classref-method -bool **is_descendant_of** **(** :ref:`BTTask` p_task **)** |const| +bool **is_descendant_of** **(** :ref:`BTTask` task **)** |const| -Returns ``true`` if this task is a descendant of ``p_task``. In other words, this task must be a child of ``p_task`` or one of its children or grandchildren. +Returns ``true`` if this task is a descendant of ``task``. In other words, this task must be a child of ``task`` or one of its children or grandchildren. .. rst-class:: classref-item-separator @@ -509,7 +509,7 @@ Returns ``null`` if this task has no parent or it is the last child in the paren .. rst-class:: classref-method -void **print_tree** **(** int p_initial_tabs=0 **)** +void **print_tree** **(** int initial_tabs=0 **)** Prints the subtree that starts with this task to the console. @@ -521,9 +521,9 @@ Prints the subtree that starts with this task to the console. .. rst-class:: classref-method -void **remove_child** **(** :ref:`BTTask` p_child **)** +void **remove_child** **(** :ref:`BTTask` task **)** -Removes ``p_child`` task from children. +Removes ``task`` from children. .. rst-class:: classref-item-separator @@ -533,7 +533,7 @@ Removes ``p_child`` task from children. .. rst-class:: classref-method -void **remove_child_at_index** **(** int p_idx **)** +void **remove_child_at_index** **(** int idx **)** Removes a child task at a specified index from children. diff --git a/doc/source/classes/class_limbohsm.rst b/doc/source/classes/class_limbohsm.rst index 6766ca4..714938d 100644 --- a/doc/source/classes/class_limbohsm.rst +++ b/doc/source/classes/class_limbohsm.rst @@ -45,19 +45,19 @@ Methods .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_transition` **(** :ref:`LimboState` p_from_state, :ref:`LimboState` p_to_state, StringName p_event **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`get_active_state` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`get_leaf_state` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`initialize` **(** Node p_agent, :ref:`Blackboard` p_parent_scope=null **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_active` **(** bool p_active **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update` **(** float p_delta **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_transition` **(** :ref:`LimboState` from_state, :ref:`LimboState` to_state, StringName event **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_active_state` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_leaf_state` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize` **(** Node agent, :ref:`Blackboard` parent_scope=null **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_active` **(** bool active **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** float delta **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +72,7 @@ Signals .. rst-class:: classref-signal -**state_changed** **(** :ref:`LimboState` p_state **)** +**state_changed** **(** :ref:`LimboState` state **)** Emitted when the currently active substate is switched to a different substate. @@ -183,9 +183,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_transition** **(** :ref:`LimboState` p_from_state, :ref:`LimboState` p_to_state, StringName p_event **)** +void **add_transition** **(** :ref:`LimboState` from_state, :ref:`LimboState` to_state, StringName event **)** -Establishes a transition from one state to another when ``p_event`` is dispatched. Both ``p_from_state`` and ``p_to_state`` must be immediate children of this state. +Establishes a transition from one state to another when ``event`` is dispatched. Both ``from_state`` and ``to_state`` must be immediate children of this state. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ Returns the currently active leaf state within the state machine. .. rst-class:: classref-method -void **initialize** **(** Node p_agent, :ref:`Blackboard` p_parent_scope=null **)** +void **initialize** **(** Node agent, :ref:`Blackboard` parent_scope=null **)** Initiates the state and calls :ref:`LimboState._setup` for both itself and all substates. @@ -231,7 +231,7 @@ Initiates the state and calls :ref:`LimboState._setup` and activates state processing according to :ref:`update_mode`. @@ -243,7 +243,7 @@ When set to ``true``, switches the state to :ref:`initial_state` on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if :ref:`update_mode` is not set to :ref:`MANUAL`. diff --git a/doc/source/classes/class_limbostate.rst b/doc/source/classes/class_limbostate.rst index 8b9bdbb..9931f4c 100644 --- a/doc/source/classes/class_limbostate.rst +++ b/doc/source/classes/class_limbostate.rst @@ -53,35 +53,35 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enter` **(** **)** |virtual| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_exit` **(** **)** |virtual| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup` **(** **)** |virtual| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update` **(** float p_delta **)** |virtual| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_event_handler` **(** StringName p_event, Callable p_handler **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`call_on_enter` **(** Callable p_callable **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`call_on_exit` **(** Callable p_callable **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`call_on_update` **(** Callable p_callable **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_guard` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`dispatch` **(** StringName p_event, Variant p_cargo=null **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`get_root` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`is_active` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LimboState` | :ref:`named` **(** String p_name **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_guard` **(** Callable p_guard_callable **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enter` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_exit` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update` **(** float delta **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_event_handler` **(** StringName event, Callable handler **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_enter` **(** Callable callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_exit` **(** Callable callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_update` **(** Callable callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_guard` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`dispatch` **(** StringName event, Variant cargo=null **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_root` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_active` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`named` **(** String name **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_guard` **(** Callable guard_callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -132,7 +132,7 @@ Emitted when the state is initialized. .. rst-class:: classref-signal -**updated** **(** float p_delta **)** +**updated** **(** float delta **)** Emitted when the state is updated. @@ -256,7 +256,7 @@ Called once during initialization. Use this method to initialize your state. .. rst-class:: classref-method -void **_update** **(** float p_delta **)** |virtual| +void **_update** **(** float delta **)** |virtual| Called during the update. Implement your state's behavior with this method. @@ -268,9 +268,9 @@ Called during the update. Implement your state's behavior with this method. .. rst-class:: classref-method -void **add_event_handler** **(** StringName p_event, Callable p_handler **)** +void **add_event_handler** **(** StringName event, Callable handler **)** -Registers a ``p_handler`` to be called when ``p_event`` is dispatched. +Registers a ``handler`` to be called when ``event`` is dispatched. .. rst-class:: classref-item-separator @@ -280,9 +280,9 @@ Registers a ``p_handler`` to be called when ``p_event`` is dispatched. .. rst-class:: classref-method -:ref:`LimboState` **call_on_enter** **(** Callable p_callable **)** +:ref:`LimboState` **call_on_enter** **(** Callable callable **)** -A chained method that connects the :ref:`entered` signal to a ``p_callable``. +A chained method that connects the :ref:`entered` signal to a ``callable``. .. rst-class:: classref-item-separator @@ -292,9 +292,9 @@ A chained method that connects the :ref:`entered` **call_on_exit** **(** Callable p_callable **)** +:ref:`LimboState` **call_on_exit** **(** Callable callable **)** -A chained method that connects the :ref:`exited` signal to a ``p_callable``. +A chained method that connects the :ref:`exited` signal to a ``callable``. .. rst-class:: classref-item-separator @@ -304,9 +304,9 @@ A chained method that connects the :ref:`exited` .. rst-class:: classref-method -:ref:`LimboState` **call_on_update** **(** Callable p_callable **)** +:ref:`LimboState` **call_on_update** **(** Callable callable **)** -A chained method that connects the :ref:`updated` signal to a ``p_callable``. +A chained method that connects the :ref:`updated` signal to a ``callable``. .. rst-class:: classref-item-separator @@ -328,9 +328,9 @@ Clears the guard function, removing the ``Callable`` previously set by :ref:`set .. rst-class:: classref-method -bool **dispatch** **(** StringName p_event, Variant p_cargo=null **)** +bool **dispatch** **(** StringName event, Variant cargo=null **)** -Recursively dispatches a state machine event named ``p_event`` with an optional argument ``p_cargo``. Returns ``true`` if the event was consumed. +Recursively dispatches a state machine event named ``event`` with an optional argument ``cargo``. Returns ``true`` if the event was consumed. Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see :ref:`add_event_handler`. @@ -366,7 +366,7 @@ Returns ``true`` if it is currently active, meaning it is the active substate of .. rst-class:: classref-method -:ref:`LimboState` **named** **(** String p_name **)** +:ref:`LimboState` **named** **(** String name **)** A chained method for setting the name of this state. @@ -378,7 +378,7 @@ A chained method for setting the name of this state. .. rst-class:: classref-method -void **set_guard** **(** Callable p_guard_callable **)** +void **set_guard** **(** Callable guard_callable **)** Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns ``false``, the transition will be disallowed. diff --git a/doc/source/classes/class_limboutility.rst b/doc/source/classes/class_limboutility.rst index 83c9e72..f52fab6 100644 --- a/doc/source/classes/class_limboutility.rst +++ b/doc/source/classes/class_limboutility.rst @@ -22,15 +22,15 @@ Methods .. table:: :widths: auto - +-----------+-----------------------------------------------------------------------------------------------------------------+ - | String | :ref:`decorate_output_var` **(** String p_variable **)** |const| | - +-----------+-----------------------------------------------------------------------------------------------------------------+ - | String | :ref:`decorate_var` **(** String p_variable **)** |const| | - +-----------+-----------------------------------------------------------------------------------------------------------------+ - | String | :ref:`get_status_name` **(** int p_status **)** |const| | - +-----------+-----------------------------------------------------------------------------------------------------------------+ - | Texture2D | :ref:`get_task_icon` **(** String p_class_or_script_path **)** |const| | - +-----------+-----------------------------------------------------------------------------------------------------------------+ + +-----------+---------------------------------------------------------------------------------------------------------------+ + | String | :ref:`decorate_output_var` **(** String variable **)** |const| | + +-----------+---------------------------------------------------------------------------------------------------------------+ + | String | :ref:`decorate_var` **(** String variable **)** |const| | + +-----------+---------------------------------------------------------------------------------------------------------------+ + | String | :ref:`get_status_name` **(** int status **)** |const| | + +-----------+---------------------------------------------------------------------------------------------------------------+ + | Texture2D | :ref:`get_task_icon` **(** String class_or_script_path **)** |const| | + +-----------+---------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -214,7 +214,7 @@ Method Descriptions .. rst-class:: classref-method -String **decorate_output_var** **(** String p_variable **)** |const| +String **decorate_output_var** **(** String variable **)** |const| Just like :ref:`decorate_var`, produces a string with a :ref:`Blackboard` variable name that is formatted for display, and also adds an additional symbol to indicate that the variable is used as an output. @@ -226,7 +226,7 @@ Just like :ref:`decorate_var`, produces .. rst-class:: classref-method -String **decorate_var** **(** String p_variable **)** |const| +String **decorate_var** **(** String variable **)** |const| Produces a string with a :ref:`Blackboard` variable name that is formatted for display or console output. @@ -238,7 +238,7 @@ Produces a string with a :ref:`Blackboard` variable name that .. rst-class:: classref-method -String **get_status_name** **(** int p_status **)** |const| +String **get_status_name** **(** int status **)** |const| Returns a name of a :ref:`BTTask` status code. @@ -250,7 +250,7 @@ Returns a name of a :ref:`BTTask` status code. .. rst-class:: classref-method -Texture2D **get_task_icon** **(** String p_class_or_script_path **)** |const| +Texture2D **get_task_icon** **(** String class_or_script_path **)** |const| Returns the icon texture associated with a task based on its class name or script resource path. diff --git a/doc_classes/BBParam.xml b/doc_classes/BBParam.xml index e96ba7c..85e015a 100644 --- a/doc_classes/BBParam.xml +++ b/doc_classes/BBParam.xml @@ -18,9 +18,9 @@ - - - + + + Returns the value of the parameter. diff --git a/doc_classes/BTPlayer.xml b/doc_classes/BTPlayer.xml index 090712d..1b9e9a6 100644 --- a/doc_classes/BTPlayer.xml +++ b/doc_classes/BTPlayer.xml @@ -30,7 +30,7 @@ - + Executes the root task of the behavior tree instance if [member active] is [code]true[/code]. Call this method when [member update_mode] is set to [constant MANUAL]. When [member update_mode] is not [constant MANUAL], the [method update] will be called automatically. See [enum UpdateMode]. @@ -61,17 +61,17 @@ - + Emitted when the behavior tree has finished executing and returned [code]SUCCESS[/code] or [code]FAILURE[/code]. - Argument [param p_status] holds the status returned by the behavior tree. See [enum BT.Status]. + Argument [param status] holds the status returned by the behavior tree. See [enum BT.Status]. - + Emitted when BTPlayer has finished the behavior tree update. - Argument [param p_status] holds the status returned by the behavior tree. See [enum BT.Status]. + Argument [param status] holds the status returned by the behavior tree. See [enum BT.Status]. diff --git a/doc_classes/BTProbabilitySelector.xml b/doc_classes/BTProbabilitySelector.xml index 4ae41a2..64797fa 100644 --- a/doc_classes/BTProbabilitySelector.xml +++ b/doc_classes/BTProbabilitySelector.xml @@ -16,7 +16,7 @@ - + Returns the child task's selection probability. @@ -29,30 +29,30 @@ - + Returns the child task's weight within the weighted probability selection algorithm. - + - Returns whether the child task at index [param p_index] participates within the weighted probability selection algorithm and has a probability assigned to it. Returns [code]false[/code] for [BTComment] tasks. + Returns whether the child task at index [param child_idx] participates within the weighted probability selection algorithm and has a probability assigned to it. Returns [code]false[/code] for [BTComment] tasks. - - + + Sets the child task's weight calculated based on the desired probability. - - + + Sets the child task's weight for the weighted probability selection algorithm. diff --git a/doc_classes/BTTask.xml b/doc_classes/BTTask.xml index 07543e8..60f1ae9 100644 --- a/doc_classes/BTTask.xml +++ b/doc_classes/BTTask.xml @@ -45,7 +45,7 @@ - + Called when task is "ticked", i.e. executed by [BTPlayer] or [BTState] during an update. Returns execution status as defined in [enum BT.Status]. @@ -60,17 +60,17 @@ - + - Adds a child task. The [param p_child] is placed at the end of the children list. + Adds a child task. The [param task] is placed at the end of the children list. - - + + - Adds a child task. The [param p_child] is placed at [param p_idx] position in the children list. + Adds a child task. The [param task] is placed at [param idx] position in the children list. @@ -81,7 +81,7 @@ - + Performs task's execution. The execution follows a specific sequence: - If task's current [member status] is not [code]RUNNING[/code], the [method _enter] method is called first. @@ -91,7 +91,7 @@ - + Returns a child task by specifying its index. @@ -135,15 +135,15 @@ - + - Returns [code]true[/code] if [param p_child] is a child of this task. + Returns [code]true[/code] if [param task] is a child of this task. - - + + Initilizes the task. Assigns [member agent] and [member blackboard], and calls [method _setup] for the task and its children. The method is called recursively for each child task. @@ -151,9 +151,9 @@ - + - Returns [code]true[/code] if this task is a descendant of [param p_task]. In other words, this task must be a child of [param p_task] or one of its children or grandchildren. + Returns [code]true[/code] if this task is a descendant of [param task]. In other words, this task must be a child of [param task] or one of its children or grandchildren. @@ -171,21 +171,21 @@ - + Prints the subtree that starts with this task to the console. - + - Removes [param p_child] task from children. + Removes [param task] from children. - + Removes a child task at a specified index from children. diff --git a/doc_classes/BehaviorTree.xml b/doc_classes/BehaviorTree.xml index 6f1efb3..d36063f 100644 --- a/doc_classes/BehaviorTree.xml +++ b/doc_classes/BehaviorTree.xml @@ -23,7 +23,7 @@ - + Become a copy of another behavior tree. @@ -36,15 +36,15 @@ - - + + Instantiates the Behavior Tree and returns the root [BTTask]. - + Assigns a new root task to the [BehaviorTree] resource. diff --git a/doc_classes/BehaviorTreeData.xml b/doc_classes/BehaviorTreeData.xml index bd7d065..ae8a1e1 100644 --- a/doc_classes/BehaviorTreeData.xml +++ b/doc_classes/BehaviorTreeData.xml @@ -12,9 +12,9 @@ - + - Returns current state of the [param p_tree_instance] encoded as a [BehaviorTreeData], suitable for use with [BehaviorTreeView]. + Returns current state of the [param tree_instance] encoded as a [BehaviorTreeData], suitable for use with [BehaviorTreeView]. Behavior tree instance can be acquired with [method BTPlayer.get_tree_instance]. diff --git a/doc_classes/BehaviorTreeView.xml b/doc_classes/BehaviorTreeView.xml index 1df9fac..ab5fdc7 100644 --- a/doc_classes/BehaviorTreeView.xml +++ b/doc_classes/BehaviorTreeView.xml @@ -11,7 +11,7 @@ - + Updates the representation of a [BehaviorTree] instance. See also [BehaviorTreeData]. @@ -24,8 +24,8 @@ - - + + Emitted when a task item is selected in [BehaviorTreeView]. diff --git a/doc_classes/Blackboard.xml b/doc_classes/Blackboard.xml index 9ad8bf0..ae2fa1f 100644 --- a/doc_classes/Blackboard.xml +++ b/doc_classes/Blackboard.xml @@ -13,16 +13,16 @@ - - - + + + - Establish a binding between a variable and the object's property specified by [param p_property] and [param p_object]. Changes to the variable update the property, and vice versa. + Establish a binding between a variable and the object's property specified by [param property] and [param object]. Changes to the variable update the property, and vice versa. - + Removes a variable by its name. @@ -35,38 +35,38 @@ - - - + + + - Returns variable value or [param p_default] if variable doesn't exist. If [param p_complain] is [code]true[/code], an error will be printed if variable doesn't exist. + Returns variable value or [param default] if variable doesn't exist. If [param complain] is [code]true[/code], an error will be printed if variable doesn't exist. - + - Returns [code]true[/code] if the Blackboard contains the [param p_name] variable, including the parent scopes. + Returns [code]true[/code] if the Blackboard contains the [param var_name] variable, including the parent scopes. - + If [code]true[/code], any [NodePath] variables in the [Blackboard] are replaced with [Node] references when the tree is instantiated. References are retrieved by calling [method Node.get_node] on the agent instance. - + Assigns the parent scope. If a value isn't in the current Blackboard scope, it will look in the parent scope Blackboard to find it. - - + + Assigns a value to a Blackboard variable. @@ -79,7 +79,7 @@ - + Remove binding from a variable. diff --git a/doc_classes/BlackboardPlan.xml b/doc_classes/BlackboardPlan.xml index 44036d1..c7c0218 100644 --- a/doc_classes/BlackboardPlan.xml +++ b/doc_classes/BlackboardPlan.xml @@ -16,10 +16,10 @@ - - + + - Populates [param p_blackboard] with the variables from this plan. If [param p_overwrite] is [code]true[/code], existing variables with the same names will be overwritten. + Populates [param blackboard] with the variables from this plan. If [param overwrite] is [code]true[/code], existing variables with the same names will be overwritten. diff --git a/doc_classes/LimboHSM.xml b/doc_classes/LimboHSM.xml index 7928f1d..da0df82 100644 --- a/doc_classes/LimboHSM.xml +++ b/doc_classes/LimboHSM.xml @@ -11,11 +11,11 @@ - - - + + + - Establishes a transition from one state to another when [param p_event] is dispatched. Both [param p_from_state] and [param p_to_state] must be immediate children of this state. + Establishes a transition from one state to another when [param event] is dispatched. Both [param from_state] and [param to_state] must be immediate children of this state. @@ -32,22 +32,22 @@ - - + + Initiates the state and calls [method LimboState._setup] for both itself and all substates. - + When set to [code]true[/code], switches the state to [member initial_state] and activates state processing according to [member update_mode]. - + Calls [method LimboState._update] on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if [member update_mode] is not set to [constant MANUAL]. @@ -66,7 +66,7 @@ - + Emitted when the currently active substate is switched to a different substate. diff --git a/doc_classes/LimboState.xml b/doc_classes/LimboState.xml index 1994fe1..80cfa4c 100644 --- a/doc_classes/LimboState.xml +++ b/doc_classes/LimboState.xml @@ -31,38 +31,38 @@ - + Called during the update. Implement your state's behavior with this method. - - + + - Registers a [param p_handler] to be called when [param p_event] is dispatched. + Registers a [param handler] to be called when [param event] is dispatched. - + - A chained method that connects the [signal entered] signal to a [param p_callable]. + A chained method that connects the [signal entered] signal to a [param callable]. - + - A chained method that connects the [signal exited] signal to a [param p_callable]. + A chained method that connects the [signal exited] signal to a [param callable]. - + - A chained method that connects the [signal updated] signal to a [param p_callable]. + A chained method that connects the [signal updated] signal to a [param callable]. @@ -73,10 +73,10 @@ - - + + - Recursively dispatches a state machine event named [param p_event] with an optional argument [param p_cargo]. Returns [code]true[/code] if the event was consumed. + Recursively dispatches a state machine event named [param event] with an optional argument [param cargo]. Returns [code]true[/code] if the event was consumed. Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see [method add_event_handler]. @@ -94,14 +94,14 @@ - + A chained method for setting the name of this state. - + Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns [code]false[/code], the transition will be disallowed. @@ -138,7 +138,7 @@ - + Emitted when the state is updated. diff --git a/doc_classes/LimboUtility.xml b/doc_classes/LimboUtility.xml index cf77945..1393ca3 100644 --- a/doc_classes/LimboUtility.xml +++ b/doc_classes/LimboUtility.xml @@ -10,28 +10,28 @@ - + Just like [method decorate_var], produces a string with a [Blackboard] variable name that is formatted for display, and also adds an additional symbol to indicate that the variable is used as an output. - + Produces a string with a [Blackboard] variable name that is formatted for display or console output. - + Returns a name of a [BTTask] status code. - + Returns the icon texture associated with a task based on its class name or script resource path. diff --git a/editor/action_banner.cpp b/editor/action_banner.cpp index 7eb493b..c5968d3 100644 --- a/editor/action_banner.cpp +++ b/editor/action_banner.cpp @@ -74,7 +74,7 @@ void ActionBanner::_notification(int p_what) { } void ActionBanner::_bind_methods() { - ClassDB::bind_method(D_METHOD("_execute_action", "p_action", "p_auto_close"), &ActionBanner::_execute_action); + ClassDB::bind_method(D_METHOD("_execute_action", "action", "auto_close"), &ActionBanner::_execute_action); } ActionBanner::ActionBanner() { diff --git a/editor/debugger/behavior_tree_data.cpp b/editor/debugger/behavior_tree_data.cpp index 0ec8ef1..e2d2e5a 100644 --- a/editor/debugger/behavior_tree_data.cpp +++ b/editor/debugger/behavior_tree_data.cpp @@ -117,7 +117,7 @@ Ref BehaviorTreeData::create_from_tree_instance(const Ref