limboai/doc/source/classes/class_blackboardplan.rst

188 lines
11 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/4.3/modules/limboai/doc_classes/BlackboardPlan.xml.
.. _class_BlackboardPlan:
BlackboardPlan
==============
**Inherits:**
Stores and manages variables that will be used in constructing new :ref:`Blackboard<class_Blackboard>` instances.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+----------+-------------------------------------------------------------------------------------+----------+
| ``bool`` | :ref:`prefetch_nodepath_vars<class_BlackboardPlan_property_prefetch_nodepath_vars>` | ``true`` |
+----------+-------------------------------------------------------------------------------------+----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`create_blackboard<class_BlackboardPlan_method_create_blackboard>`\ (\ prefetch_root\: ``Node``, parent_scope\: :ref:`Blackboard<class_Blackboard>` = null, prefetch_root_for_base_plan\: ``Node`` = null\ ) |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BlackboardPlan<class_BlackboardPlan>` | :ref:`get_base_plan<class_BlackboardPlan_method_get_base_plan>`\ (\ ) |const| |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Callable`` | :ref:`get_parent_scope_plan_provider<class_BlackboardPlan_method_get_parent_scope_plan_provider>`\ (\ ) |const| |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``bool`` | :ref:`is_derived<class_BlackboardPlan_method_is_derived>`\ (\ ) |const| |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`populate_blackboard<class_BlackboardPlan_method_populate_blackboard>`\ (\ blackboard\: :ref:`Blackboard<class_Blackboard>`, overwrite\: ``bool``, prefetch_root\: ``Node``, prefetch_root_for_base_plan\: ``Node`` = null\ ) |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_base_plan<class_BlackboardPlan_method_set_base_plan>`\ (\ blackboard_plan\: :ref:`BlackboardPlan<class_BlackboardPlan>`\ ) |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_parent_scope_plan_provider<class_BlackboardPlan_method_set_parent_scope_plan_provider>`\ (\ callable\: ``Callable``\ ) |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`sync_with_base_plan<class_BlackboardPlan_method_sync_with_base_plan>`\ (\ ) |
+---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BlackboardPlan_property_prefetch_nodepath_vars:
.. rst-class:: classref-property
``bool`` **prefetch_nodepath_vars** = ``true`` :ref:`🔗<class_BlackboardPlan_property_prefetch_nodepath_vars>`
.. rst-class:: classref-property-setget
- |void| **set_prefetch_nodepath_vars**\ (\ value\: ``bool``\ )
- ``bool`` **is_prefetching_nodepath_vars**\ (\ )
Enables or disables ``NodePath`` variable prefetching. If ``true``, ``NodePath`` values will be replaced with node instances when the :ref:`Blackboard<class_Blackboard>` is created.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_BlackboardPlan_method_create_blackboard:
.. rst-class:: classref-method
:ref:`Blackboard<class_Blackboard>` **create_blackboard**\ (\ prefetch_root\: ``Node``, parent_scope\: :ref:`Blackboard<class_Blackboard>` = null, prefetch_root_for_base_plan\: ``Node`` = null\ ) :ref:`🔗<class_BlackboardPlan_method_create_blackboard>`
Constructs a new instance of a :ref:`Blackboard<class_Blackboard>` using this plan. If ``NodePath`` prefetching is enabled, ``prefetch_root`` will be used to retrieve node instances for ``NodePath`` variables and substitute their values.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_get_base_plan:
.. rst-class:: classref-method
:ref:`BlackboardPlan<class_BlackboardPlan>` **get_base_plan**\ (\ ) |const| :ref:`🔗<class_BlackboardPlan_method_get_base_plan>`
Returns the base plan. See :ref:`is_derived<class_BlackboardPlan_method_is_derived>`.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_get_parent_scope_plan_provider:
.. rst-class:: classref-method
``Callable`` **get_parent_scope_plan_provider**\ (\ ) |const| :ref:`🔗<class_BlackboardPlan_method_get_parent_scope_plan_provider>`
Returns the parent scope plan provider - a callable that returns a **BlackboardPlan**.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_is_derived:
.. rst-class:: classref-method
``bool`` **is_derived**\ (\ ) |const| :ref:`🔗<class_BlackboardPlan_method_is_derived>`
Returns ``true`` if this plan is derived from another, i.e., the base plan is not ``null``. A derived plan can only contain variables that are present in the base plan, and only variable values can be different.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_populate_blackboard:
.. rst-class:: classref-method
|void| **populate_blackboard**\ (\ blackboard\: :ref:`Blackboard<class_Blackboard>`, overwrite\: ``bool``, prefetch_root\: ``Node``, prefetch_root_for_base_plan\: ``Node`` = null\ ) :ref:`🔗<class_BlackboardPlan_method_populate_blackboard>`
Populates ``blackboard`` with the variables from this plan. If ``overwrite`` is ``true``, existing variables with the same names will be overwritten. If ``NodePath`` prefetching is enabled, ``prefetch_root`` will be used to retrieve node instances for ``NodePath`` variables and substitute their values.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_set_base_plan:
.. rst-class:: classref-method
|void| **set_base_plan**\ (\ blackboard_plan\: :ref:`BlackboardPlan<class_BlackboardPlan>`\ ) :ref:`🔗<class_BlackboardPlan_method_set_base_plan>`
Sets the base plan. If assigned, this plan will be derived from the base plan.
Use with caution, as it will remove variables not present in the base plan. Only use this for custom tooling.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_set_parent_scope_plan_provider:
.. rst-class:: classref-method
|void| **set_parent_scope_plan_provider**\ (\ callable\: ``Callable``\ ) :ref:`🔗<class_BlackboardPlan_method_set_parent_scope_plan_provider>`
Sets the parent scope plan provider - a callable that returns a **BlackboardPlan**. Used to provide hints in the inspector. When set, mapping feature becomes available.
.. rst-class:: classref-item-separator
----
.. _class_BlackboardPlan_method_sync_with_base_plan:
.. rst-class:: classref-method
|void| **sync_with_base_plan**\ (\ ) :ref:`🔗<class_BlackboardPlan_method_sync_with_base_plan>`
Synchronizes this plan with the base plan: removes variables not present in the base plan, and updates type information. Only use this for custom tooling.
.. |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.)`
.. |void| replace:: :abbr:`void (No return value.)`