From c4931ae420652e92866d8ea3694057d000be9f1f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sat, 2 Mar 2024 15:43:55 +0100 Subject: [PATCH] Fix Blackboard.{set,get}_parent_scope should be {set,get}_parent in the API --- blackboard/blackboard.cpp | 4 ++-- doc/source/classes/class_blackboard.rst | 12 ++++++------ doc_classes/Blackboard.xml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/blackboard/blackboard.cpp b/blackboard/blackboard.cpp index 00075bf..5826866 100644 --- a/blackboard/blackboard.cpp +++ b/blackboard/blackboard.cpp @@ -96,8 +96,8 @@ 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_scope", "p_blackboard"), &Blackboard::set_parent); - ClassDB::bind_method(D_METHOD("get_parent_scope"), &Blackboard::get_parent); + ClassDB::bind_method(D_METHOD("set_parent", "p_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("top"), &Blackboard::top); diff --git a/doc/source/classes/class_blackboard.rst b/doc/source/classes/class_blackboard.rst index 5495e7f..c9c2358 100644 --- a/doc/source/classes/class_blackboard.rst +++ b/doc/source/classes/class_blackboard.rst @@ -38,7 +38,7 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase_var` **(** String p_name **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Blackboard` | :ref:`get_parent_scope` **(** **)** |const| | + | :ref:`Blackboard` | :ref:`get_parent` **(** **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | Variant | :ref:`get_var` **(** String p_name, Variant p_default=null, bool p_complain=true **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ @@ -46,7 +46,7 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`prefetch_nodepath_vars` **(** Node p_node **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_parent_scope` **(** :ref:`Blackboard` p_blackboard **)** | + | void | :ref:`set_parent` **(** :ref:`Blackboard` p_blackboard **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_var` **(** String p_name, Variant p_value **)** | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ @@ -88,11 +88,11 @@ Removes a variable by its name. ---- -.. _class_Blackboard_method_get_parent_scope: +.. _class_Blackboard_method_get_parent: .. rst-class:: classref-method -:ref:`Blackboard` **get_parent_scope** **(** **)** |const| +:ref:`Blackboard` **get_parent** **(** **)** |const| Returns a Blackboard that serves as the parent scope for this instance. @@ -136,11 +136,11 @@ If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with ---- -.. _class_Blackboard_method_set_parent_scope: +.. _class_Blackboard_method_set_parent: .. rst-class:: classref-method -void **set_parent_scope** **(** :ref:`Blackboard` p_blackboard **)** +void **set_parent** **(** :ref:`Blackboard` p_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. diff --git a/doc_classes/Blackboard.xml b/doc_classes/Blackboard.xml index 126e656..e6748a0 100644 --- a/doc_classes/Blackboard.xml +++ b/doc_classes/Blackboard.xml @@ -27,7 +27,7 @@ Removes a variable by its name. - + Returns a Blackboard that serves as the parent scope for this instance. @@ -56,7 +56,7 @@ 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. - +