diff --git a/doc/source/classes/class_behaviortree.rst b/doc/source/classes/class_behaviortree.rst index acd2ad9..e6fc70f 100644 --- a/doc/source/classes/class_behaviortree.rst +++ b/doc/source/classes/class_behaviortree.rst @@ -114,9 +114,7 @@ Makes a copy of the BehaviorTree resource. void **copy_other** **(** :ref:`BehaviorTree` p_other **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Become a copy of another behavior tree. .. rst-class:: classref-item-separator diff --git a/doc/source/classes/class_btcallmethod.rst b/doc/source/classes/class_btcallmethod.rst index 2ebd334..231f27f 100644 --- a/doc/source/classes/class_btcallmethod.rst +++ b/doc/source/classes/class_btcallmethod.rst @@ -31,15 +31,17 @@ Properties .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------+-----------+ - | Array | :ref:`args` | ``[]`` | - +-----------------------------+---------------------------------------------------------------------------+-----------+ - | bool | :ref:`args_include_delta` | ``false`` | - +-----------------------------+---------------------------------------------------------------------------+-----------+ - | StringName | :ref:`method` | ``&""`` | - +-----------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`BBNode` | :ref:`node` | | - +-----------------------------+---------------------------------------------------------------------------+-----------+ + +-------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`BBVariant[]` | :ref:`args` | ``[]`` | + +-------------------------------------+---------------------------------------------------------------------------+-----------+ + | bool | :ref:`args_include_delta` | ``false`` | + +-------------------------------------+---------------------------------------------------------------------------+-----------+ + | StringName | :ref:`method` | ``&""`` | + +-------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`BBNode` | :ref:`node` | | + +-------------------------------------+---------------------------------------------------------------------------+-----------+ + | String | :ref:`result_var` | ``""`` | + +-------------------------------------+---------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -54,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -Array **args** = ``[]`` +:ref:`BBVariant[]` **args** = ``[]`` .. rst-class:: classref-property-setget -- void **set_args** **(** Array value **)** -- Array **get_args** **(** **)** +- void **set_args** **(** :ref:`BBVariant[]` value **)** +- :ref:`BBVariant[]` **get_args** **(** **)** The arguments to be passed when calling the method. @@ -114,6 +116,23 @@ The name of the method to be called. Specifies the ``Node`` or ``Object`` instance containing the method to be called. +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCallMethod_property_result_var: + +.. rst-class:: classref-property + +String **result_var** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_result_var** **(** String value **)** +- String **get_result_var** **(** **)** + +if non-empty, assign the result of the method call to the blackboard variable specified by this property. + .. |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.)` diff --git a/doc/source/classes/class_bttask.rst b/doc/source/classes/class_bttask.rst index 53c42c7..ecd8bf6 100644 --- a/doc/source/classes/class_bttask.rst +++ b/doc/source/classes/class_bttask.rst @@ -64,7 +64,7 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | String | :ref:`_generate_name` **(** **)** |virtual| |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | PackedStringArray | :ref:`_get_configuration_warning` **(** **)** |virtual| |const| | + | PackedStringArray | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_setup` **(** **)** |virtual| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ @@ -249,11 +249,11 @@ Called to generate a display name for the task unless :ref:`custom_name - + The arguments to be passed when calling the method. @@ -22,5 +22,8 @@ Specifies the [Node] or [Object] instance containing the method to be called. + + if non-empty, assign the result of the method call to the blackboard variable specified by this property. + diff --git a/doc_classes/BTTask.xml b/doc_classes/BTTask.xml index 59dc1e3..07543e8 100644 --- a/doc_classes/BTTask.xml +++ b/doc_classes/BTTask.xml @@ -31,7 +31,7 @@ Called to generate a display name for the task unless [member custom_name] is set. See [method get_task_name]. - + The string returned by this method is shown as a warning message in the behavior tree editor. Any task script that overrides this method must include [code]@tool[/code] annotation at the top of the file. @@ -126,7 +126,7 @@ Returns the root task of the behavior tree. - + The string returned by this method is used to represent the task in the editor. @@ -169,7 +169,7 @@ Returns [code]null[/code] if this task has no parent or it is the last child in the parent's children list. - + diff --git a/doc_classes/BehaviorTree.xml b/doc_classes/BehaviorTree.xml index eb25025..958c4c5 100644 --- a/doc_classes/BehaviorTree.xml +++ b/doc_classes/BehaviorTree.xml @@ -21,6 +21,13 @@ Makes a copy of the BehaviorTree resource. + + + + + Become a copy of another behavior tree. + + diff --git a/gdextension/update_rst.sh b/gdextension/update_rst.sh new file mode 100755 index 0000000..018a552 --- /dev/null +++ b/gdextension/update_rst.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +usage () { echo -e "Usage: Call from the Godot source root to update LimboAI rst class documentation."; } +msg () { echo -e "$@"; } + +set -e + +if [ ! -d "${PWD}/modules/limboai" ]; then + usage + exit 1 +fi + +rm -rf /tmp/rst +./doc/tools/make_rst.py --output /tmp/rst doc/tools doc/classes/@GlobalScope.xml modules/limboai/doc_classes || /bin/true +msg Removing old rst class documentation... +rm ./modules/limboai/doc/source/classes/class_* +msg Copying new rst class documentation... +cp -r -f /tmp/rst/class_* modules/limboai/doc/source/classes/ +msg Cleaning up... +rm modules/limboai/doc/source/classes/class_@globalscope.rst +msg Done!