limboai/doc/source/classes/class_blackboardplan.rst

187 lines
9.1 KiB
ReStructuredText
Raw Normal View History

2024-01-25 13:56:59 +00:00
: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<class_Blackboard>` instances.
.. rst-class:: classref-reftable-group
2024-03-06 20:50:35 +00:00
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>` **(** Node node, :ref:`Blackboard<class_Blackboard>` parent_scope=null **)** |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BlackboardPlan<class_BlackboardPlan>` | :ref:`get_base_plan<class_BlackboardPlan_method_get_base_plan>` **(** **)** |const| |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2024-05-15 18:58:38 +00:00
| 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>` **(** :ref:`Blackboard<class_Blackboard>` blackboard, bool overwrite, Node node **)** |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_base_plan<class_BlackboardPlan_method_set_base_plan>` **(** :ref:`BlackboardPlan<class_BlackboardPlan>` blackboard_plan **)** |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2024-05-15 18:58:38 +00:00
| 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>` **(** **)** |
+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2024-03-06 20:50:35 +00:00
.. 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``
.. rst-class:: classref-property-setget
- void **set_prefetch_nodepath_vars** **(** bool value **)**
- 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** **(** Node node, :ref:`Blackboard<class_Blackboard>` parent_scope=null **)**
2024-03-06 20:50:35 +00:00
Constructs a new instance of a :ref:`Blackboard<class_Blackboard>` using this plan. If ``NodePath`` prefetching is enabled, ``node`` 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|
Returns the base plan. See :ref:`is_derived<class_BlackboardPlan_method_is_derived>`.
.. rst-class:: classref-item-separator
----
2024-05-15 18:58:38 +00:00
.. _class_BlackboardPlan_method_get_parent_scope_plan_provider:
.. rst-class:: classref-method
Callable **get_parent_scope_plan_provider** **(** **)** |const|
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|
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
2024-03-06 20:50:35 +00:00
void **populate_blackboard** **(** :ref:`Blackboard<class_Blackboard>` blackboard, bool overwrite, Node node **)**
2024-03-06 20:50:35 +00:00
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, ``node`` 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** **(** :ref:`BlackboardPlan<class_BlackboardPlan>` blackboard_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
----
2024-05-15 18:58:38 +00:00
.. _class_BlackboardPlan_method_set_parent_scope_plan_provider:
.. rst-class:: classref-method
void **set_parent_scope_plan_provider** **(** Callable callable **)**
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** **(** **)**
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.
2024-01-25 13:56:59 +00:00
.. |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.)`