From a251d92aa375dc1cdb794b3f4e5663fc8e8f518f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 25 Jan 2024 14:56:59 +0100 Subject: [PATCH] Update class documentation --- config.py | 1 + doc/source/classes/class_bbfloat32array.rst | 23 +++++++++++ doc/source/classes/class_bbfloat64array.rst | 23 +++++++++++ doc/source/classes/class_bbint32array.rst | 23 +++++++++++ doc/source/classes/class_bbint64array.rst | 23 +++++++++++ doc/source/classes/class_bbparam.rst | 2 +- doc/source/classes/class_bbprojection.rst | 23 +++++++++++ doc/source/classes/class_behaviortree.rst | 25 ++++++++++-- doc/source/classes/class_blackboard.rst | 44 ++++----------------- doc/source/classes/class_blackboardplan.rst | 23 +++++++++++ doc/source/classes/class_btnewscope.rst | 17 +++++--- doc/source/classes/class_btplayer.rst | 19 +++++++++ doc/source/classes/class_limbostate.rst | 33 ++++++++++++---- doc_classes/BTNewScope.xml | 4 +- doc_classes/BTPlayer.xml | 3 ++ doc_classes/BehaviorTree.xml | 3 ++ doc_classes/Blackboard.xml | 21 ++-------- doc_classes/BlackboardPlan.xml | 10 +++++ doc_classes/LimboState.xml | 3 ++ hsm/limbo_state.cpp | 2 +- 20 files changed, 252 insertions(+), 73 deletions(-) create mode 100644 doc/source/classes/class_bbfloat32array.rst create mode 100644 doc/source/classes/class_bbfloat64array.rst create mode 100644 doc/source/classes/class_bbint32array.rst create mode 100644 doc/source/classes/class_bbint64array.rst create mode 100644 doc/source/classes/class_bbprojection.rst create mode 100644 doc/source/classes/class_blackboardplan.rst create mode 100644 doc_classes/BlackboardPlan.xml diff --git a/config.py b/config.py index e5a8134..458072f 100644 --- a/config.py +++ b/config.py @@ -60,6 +60,7 @@ def get_doc_classes(): "BehaviorTree", "BehaviorTreeView", "Blackboard", + "BlackboardPlan", "BT", "BTAction", "BTAlwaysFail", diff --git a/doc/source/classes/class_bbfloat32array.rst b/doc/source/classes/class_bbfloat32array.rst new file mode 100644 index 0000000..8add4a9 --- /dev/null +++ b/doc/source/classes/class_bbfloat32array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBFloat32Array.xml. + +.. _class_BBFloat32Array: + +BBFloat32Array +============== + +**Inherits:** :ref:`BBParam` + +PackedFloat32Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbfloat64array.rst b/doc/source/classes/class_bbfloat64array.rst new file mode 100644 index 0000000..3db474f --- /dev/null +++ b/doc/source/classes/class_bbfloat64array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBFloat64Array.xml. + +.. _class_BBFloat64Array: + +BBFloat64Array +============== + +**Inherits:** :ref:`BBParam` + +PackedFloat64Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbint32array.rst b/doc/source/classes/class_bbint32array.rst new file mode 100644 index 0000000..d4fcaf7 --- /dev/null +++ b/doc/source/classes/class_bbint32array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBInt32Array.xml. + +.. _class_BBInt32Array: + +BBInt32Array +============ + +**Inherits:** :ref:`BBParam` + +PackedInt32Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbint64array.rst b/doc/source/classes/class_bbint64array.rst new file mode 100644 index 0000000..51ebf2a --- /dev/null +++ b/doc/source/classes/class_bbint64array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBInt64Array.xml. + +.. _class_BBInt64Array: + +BBInt64Array +============ + +**Inherits:** :ref:`BBParam` + +PackedInt64Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbparam.rst b/doc/source/classes/class_bbparam.rst index 32c3934..04ba624 100644 --- a/doc/source/classes/class_bbparam.rst +++ b/doc/source/classes/class_bbparam.rst @@ -12,7 +12,7 @@ BBParam **Inherits:** -**Inherited By:** :ref:`BBAabb`, :ref:`BBArray`, :ref:`BBBasis`, :ref:`BBBool`, :ref:`BBByteArray`, :ref:`BBColor`, :ref:`BBColorArray`, :ref:`BBDictionary`, :ref:`BBFloat`, :ref:`BBFloatArray`, :ref:`BBInt`, :ref:`BBIntArray`, :ref:`BBNode`, :ref:`BBPlane`, :ref:`BBQuaternion`, :ref:`BBRect2`, :ref:`BBRect2i`, :ref:`BBString`, :ref:`BBStringArray`, :ref:`BBStringName`, :ref:`BBTransform2D`, :ref:`BBTransform3D`, :ref:`BBVariant`, :ref:`BBVector2`, :ref:`BBVector2Array`, :ref:`BBVector2i`, :ref:`BBVector3`, :ref:`BBVector3Array`, :ref:`BBVector3i`, :ref:`BBVector4`, :ref:`BBVector4i` +**Inherited By:** :ref:`BBAabb`, :ref:`BBArray`, :ref:`BBBasis`, :ref:`BBBool`, :ref:`BBByteArray`, :ref:`BBColor`, :ref:`BBColorArray`, :ref:`BBDictionary`, :ref:`BBFloat`, :ref:`BBFloat32Array`, :ref:`BBFloat64Array`, :ref:`BBInt`, :ref:`BBInt32Array`, :ref:`BBInt64Array`, :ref:`BBNode`, :ref:`BBPlane`, :ref:`BBProjection`, :ref:`BBQuaternion`, :ref:`BBRect2`, :ref:`BBRect2i`, :ref:`BBString`, :ref:`BBStringArray`, :ref:`BBStringName`, :ref:`BBTransform2D`, :ref:`BBTransform3D`, :ref:`BBVariant`, :ref:`BBVector2`, :ref:`BBVector2Array`, :ref:`BBVector2i`, :ref:`BBVector3`, :ref:`BBVector3Array`, :ref:`BBVector3i`, :ref:`BBVector4`, :ref:`BBVector4i` A base class for LimboAI typed parameters. diff --git a/doc/source/classes/class_bbprojection.rst b/doc/source/classes/class_bbprojection.rst new file mode 100644 index 0000000..7a09149 --- /dev/null +++ b/doc/source/classes/class_bbprojection.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBProjection.xml. + +.. _class_BBProjection: + +BBProjection +============ + +**Inherits:** :ref:`BBParam` + +Projection-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_behaviortree.rst b/doc/source/classes/class_behaviortree.rst index e6fc70f..a1ba8e9 100644 --- a/doc/source/classes/class_behaviortree.rst +++ b/doc/source/classes/class_behaviortree.rst @@ -41,9 +41,11 @@ Properties .. table:: :widths: auto - +--------+-------------------------------------------------------------+--------+ - | String | :ref:`description` | ``""`` | - +--------+-------------------------------------------------------------+--------+ + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`BlackboardPlan` | :ref:`blackboard_plan` | | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | String | :ref:`description` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -74,6 +76,23 @@ Methods Property Descriptions --------------------- +.. _class_BehaviorTree_property_blackboard_plan: + +.. rst-class:: classref-property + +:ref:`BlackboardPlan` **blackboard_plan** + +.. rst-class:: classref-property-setget + +- void **set_blackboard_plan** **(** :ref:`BlackboardPlan` value **)** +- :ref:`BlackboardPlan` **get_blackboard_plan** **(** **)** + +Stores and manages variables that will be used in constructing new :ref:`Blackboard` instances. + +.. rst-class:: classref-item-separator + +---- + .. _class_BehaviorTree_property_description: .. rst-class:: classref-property diff --git a/doc/source/classes/class_blackboard.rst b/doc/source/classes/class_blackboard.rst index 7e4672d..c21130b 100644 --- a/doc/source/classes/class_blackboard.rst +++ b/doc/source/classes/class_blackboard.rst @@ -34,23 +34,19 @@ Methods :widths: auto +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_var` **(** Variant p_key **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | Dictionary | :ref:`get_data` **(** **)** |const| | + | void | :ref:`erase_var` **(** String p_name **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Blackboard` | :ref:`get_parent_scope` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | Variant | :ref:`get_var` **(** Variant p_key, Variant p_default=null **)** |const| | + | Variant | :ref:`get_var` **(** String p_name, Variant p_default=null **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | bool | :ref:`has_var` **(** Variant p_key **)** |const| | + | bool | :ref:`has_var` **(** String p_name **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`prefetch_nodepath_vars` **(** Node p_node **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_data` **(** Dictionary p_data **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_parent_scope` **(** :ref:`Blackboard` p_blackboard **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_var` **(** Variant p_key, Variant p_value **)** | + | void | :ref:`set_var` **(** String p_name, Variant p_value **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Blackboard` | :ref:`top` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ @@ -68,7 +64,7 @@ Method Descriptions .. rst-class:: classref-method -void **erase_var** **(** Variant p_key **)** +void **erase_var** **(** String p_name **)** Removes a variable by its name. @@ -76,18 +72,6 @@ Removes a variable by its name. ---- -.. _class_Blackboard_method_get_data: - -.. rst-class:: classref-method - -Dictionary **get_data** **(** **)** |const| - -Returns Blackboard data as a ``Dictionary``. - -.. rst-class:: classref-item-separator - ----- - .. _class_Blackboard_method_get_parent_scope: .. rst-class:: classref-method @@ -104,7 +88,7 @@ Returns a Blackboard that serves as the parent scope for this instance. .. rst-class:: classref-method -Variant **get_var** **(** Variant p_key, Variant p_default=null **)** |const| +Variant **get_var** **(** String p_name, Variant p_default=null **)** |const| Returns variable value. @@ -116,7 +100,7 @@ Returns variable value. .. rst-class:: classref-method -bool **has_var** **(** Variant p_key **)** |const| +bool **has_var** **(** String p_name **)** |const| Returns ``true`` if the Blackboard contains the ``p_key`` variable, including the parent scopes. @@ -136,18 +120,6 @@ If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with ---- -.. _class_Blackboard_method_set_data: - -.. rst-class:: classref-method - -void **set_data** **(** Dictionary p_data **)** - -Overwrites Blackboard data, replacing any previously stored variables within current scope. Use with caution. - -.. rst-class:: classref-item-separator - ----- - .. _class_Blackboard_method_set_parent_scope: .. rst-class:: classref-method @@ -164,7 +136,7 @@ Assigns the parent scope. If a value isn't in the current Blackboard scope, it w .. rst-class:: classref-method -void **set_var** **(** Variant p_key, Variant p_value **)** +void **set_var** **(** String p_name, Variant p_value **)** Assigns a value to a Blackboard variable. diff --git a/doc/source/classes/class_blackboardplan.rst b/doc/source/classes/class_blackboardplan.rst new file mode 100644 index 0000000..251fab3 --- /dev/null +++ b/doc/source/classes/class_blackboardplan.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BlackboardPlan.xml. + +.. _class_BlackboardPlan: + +BlackboardPlan +============== + +**Inherits:** + +Stores and manages variables that will be used in constructing new :ref:`Blackboard` instances. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btnewscope.rst b/doc/source/classes/class_btnewscope.rst index 8fe6a9a..a1f84f6 100644 --- a/doc/source/classes/class_btnewscope.rst +++ b/doc/source/classes/class_btnewscope.rst @@ -33,9 +33,9 @@ Properties .. table:: :widths: auto - +------------+---------------------------------------------------------------------+--------+ - | Dictionary | :ref:`_blackboard_data` | ``{}`` | - +------------+---------------------------------------------------------------------+--------+ + +---------------------------------------------+-------------------------------------------------------------------+ + | :ref:`BlackboardPlan` | :ref:`blackboard_plan` | + +---------------------------------------------+-------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,13 +46,18 @@ Properties Property Descriptions --------------------- -.. _class_BTNewScope_property__blackboard_data: +.. _class_BTNewScope_property_blackboard_plan: .. rst-class:: classref-property -Dictionary **_blackboard_data** = ``{}`` +:ref:`BlackboardPlan` **blackboard_plan** -Data that is used to populate a new scope of the :ref:`Blackboard`. +.. rst-class:: classref-property-setget + +- void **set_blackboard_plan** **(** :ref:`BlackboardPlan` value **)** +- :ref:`BlackboardPlan` **get_blackboard_plan** **(** **)** + +Stores and manages variables that will be used in constructing new :ref:`Blackboard` instances. .. |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 a8eea4c..4bb23ea 100644 --- a/doc/source/classes/class_btplayer.rst +++ b/doc/source/classes/class_btplayer.rst @@ -38,6 +38,8 @@ Properties +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`Blackboard` | :ref:`blackboard` | | +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`BlackboardPlan` | :ref:`blackboard_plan` | | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ | bool | :ref:`monitor_performance` | ``false`` | +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ | bool | :ref:`prefetch_nodepath_vars` | ``true`` | @@ -193,6 +195,23 @@ Holds data shared by the behavior tree tasks. See :ref:`Blackboard` **blackboard_plan** + +.. rst-class:: classref-property-setget + +- void **set_blackboard_plan** **(** :ref:`BlackboardPlan` value **)** +- :ref:`BlackboardPlan` **get_blackboard_plan** **(** **)** + +Stores and manages variables that will be used in constructing new :ref:`Blackboard` instances. + +.. rst-class:: classref-item-separator + +---- + .. _class_BTPlayer_property_monitor_performance: .. rst-class:: classref-property diff --git a/doc/source/classes/class_limbostate.rst b/doc/source/classes/class_limbostate.rst index d289989..4f10e24 100644 --- a/doc/source/classes/class_limbostate.rst +++ b/doc/source/classes/class_limbostate.rst @@ -35,13 +35,15 @@ Properties .. table:: :widths: auto - +-------------------------------------+-----------------------------------------------------------------+ - | String | :ref:`EVENT_FINISHED` | - +-------------------------------------+-----------------------------------------------------------------+ - | Node | :ref:`agent` | - +-------------------------------------+-----------------------------------------------------------------+ - | :ref:`Blackboard` | :ref:`blackboard` | - +-------------------------------------+-----------------------------------------------------------------+ + +---------------------------------------------+-------------------------------------------------------------------+ + | String | :ref:`EVENT_FINISHED` | + +---------------------------------------------+-------------------------------------------------------------------+ + | Node | :ref:`agent` | + +---------------------------------------------+-------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`blackboard` | + +---------------------------------------------+-------------------------------------------------------------------+ + | :ref:`BlackboardPlan` | :ref:`blackboard_plan` | + +---------------------------------------------+-------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -188,6 +190,23 @@ An agent associated with the state, assigned during initialization. A key/value data store shared by states within the state machine to which this state belongs. +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_property_blackboard_plan: + +.. rst-class:: classref-property + +:ref:`BlackboardPlan` **blackboard_plan** + +.. rst-class:: classref-property-setget + +- void **set_blackboard_plan** **(** :ref:`BlackboardPlan` value **)** +- :ref:`BlackboardPlan` **get_blackboard_plan** **(** **)** + +Stores and manages variables that will be used in constructing new :ref:`Blackboard` instances. + .. rst-class:: classref-section-separator ---- diff --git a/doc_classes/BTNewScope.xml b/doc_classes/BTNewScope.xml index 252fa48..ddb1965 100644 --- a/doc_classes/BTNewScope.xml +++ b/doc_classes/BTNewScope.xml @@ -10,8 +10,8 @@ - - Data that is used to populate a new scope of the [Blackboard]. + + Stores and manages variables that will be used in constructing new [Blackboard] instances. diff --git a/doc_classes/BTPlayer.xml b/doc_classes/BTPlayer.xml index 29cbdbf..a284468 100644 --- a/doc_classes/BTPlayer.xml +++ b/doc_classes/BTPlayer.xml @@ -40,6 +40,9 @@ Holds data shared by the behavior tree tasks. See [Blackboard]. + + Stores and manages variables that will be used in constructing new [Blackboard] instances. + If [code]true[/code], adds a performance monitor to "Debugger->Monitors" for each instance of this [BTPlayer] node. diff --git a/doc_classes/BehaviorTree.xml b/doc_classes/BehaviorTree.xml index 958c4c5..6f1efb3 100644 --- a/doc_classes/BehaviorTree.xml +++ b/doc_classes/BehaviorTree.xml @@ -51,6 +51,9 @@ + + Stores and manages variables that will be used in constructing new [Blackboard] instances. + User-provided description of the BehaviorTree. diff --git a/doc_classes/Blackboard.xml b/doc_classes/Blackboard.xml index 6fbfbbf..91f4492 100644 --- a/doc_classes/Blackboard.xml +++ b/doc_classes/Blackboard.xml @@ -13,17 +13,11 @@ - + Removes a variable by its name. - - - - Returns Blackboard data as a [Dictionary]. - - @@ -32,7 +26,7 @@ - + Returns variable value. @@ -40,7 +34,7 @@ - + Returns [code]true[/code] if the Blackboard contains the [param p_key] variable, including the parent scopes. @@ -52,13 +46,6 @@ 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. - - - - - Overwrites Blackboard data, replacing any previously stored variables within current scope. Use with caution. - - @@ -68,7 +55,7 @@ - + Assigns a value to a Blackboard variable. diff --git a/doc_classes/BlackboardPlan.xml b/doc_classes/BlackboardPlan.xml new file mode 100644 index 0000000..6a7a48c --- /dev/null +++ b/doc_classes/BlackboardPlan.xml @@ -0,0 +1,10 @@ + + + + Stores and manages variables that will be used in constructing new [Blackboard] instances. + + + + + + diff --git a/doc_classes/LimboState.xml b/doc_classes/LimboState.xml index f3a3c79..508bf41 100644 --- a/doc_classes/LimboState.xml +++ b/doc_classes/LimboState.xml @@ -117,6 +117,9 @@ A key/value data store shared by states within the state machine to which this state belongs. + + Stores and manages variables that will be used in constructing new [Blackboard] instances. + diff --git a/hsm/limbo_state.cpp b/hsm/limbo_state.cpp index d0e7166..bf75f49 100644 --- a/hsm/limbo_state.cpp +++ b/hsm/limbo_state.cpp @@ -195,7 +195,7 @@ void LimboState::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "EVENT_FINISHED", PROPERTY_HINT_NONE, "", 0), "", "event_finished"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "agent", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_agent", "get_agent"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard", PROPERTY_HINT_RESOURCE_TYPE, "Blackboard", 0), "", "get_blackboard"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_blackboard_plan", "get_blackboard_plan"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT), "set_blackboard_plan", "get_blackboard_plan"); ADD_SIGNAL(MethodInfo("setup")); ADD_SIGNAL(MethodInfo("entered"));