Doc: Clarify `Blackboard.get_var()` and `set_var()`

This commit is contained in:
Serhii Snitsaruk 2024-10-13 21:04:59 +02:00
parent ece17d68d9
commit b5b1ac7289
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ Returns a Blackboard that serves as the parent scope for this instance.
``Variant`` **get_var**\ (\ var_name\: ``StringName``, default\: ``Variant`` = null, complain\: ``bool`` = true\ ) |const| :ref:`🔗<class_Blackboard_method_get_var>` ``Variant`` **get_var**\ (\ var_name\: ``StringName``, default\: ``Variant`` = null, complain\: ``bool`` = true\ ) |const| :ref:`🔗<class_Blackboard_method_get_var>`
Returns variable value or ``default`` if variable doesn't exist. If ``complain`` is ``true``, an error will be printed if variable doesn't exist. Returns variable value or ``default`` if variable doesn't exist. If ``complain`` is ``true``, an error will be printed if variable doesn't exist. If the variable doesn't exist in the current **Blackboard** scope, it will look in the parent scope **Blackboard** to find it.
.. rst-class:: classref-item-separator .. rst-class:: classref-item-separator
@ -212,7 +212,7 @@ Assigns the parent scope. If a value isn't in the current Blackboard scope, it w
|void| **set_var**\ (\ var_name\: ``StringName``, value\: ``Variant``\ ) :ref:`🔗<class_Blackboard_method_set_var>` |void| **set_var**\ (\ var_name\: ``StringName``, value\: ``Variant``\ ) :ref:`🔗<class_Blackboard_method_set_var>`
Assigns a value to a Blackboard variable. Assigns a value to a variable in the current Blackboard scope. If the variable doesn't exist, it will be created. If the variable already exists in the parent scope, the parent scope value will NOT be changed.
.. rst-class:: classref-item-separator .. rst-class:: classref-item-separator

View File

@ -46,7 +46,7 @@
<param index="1" name="default" type="Variant" default="null" /> <param index="1" name="default" type="Variant" default="null" />
<param index="2" name="complain" type="bool" default="true" /> <param index="2" name="complain" type="bool" default="true" />
<description> <description>
Returns variable value or [param default] if variable doesn't exist. If [param complain] is [code]true[/code], an error will be printed if variable doesn't exist. Returns variable value or [param default] if variable doesn't exist. If [param complain] is [code]true[/code], an error will be printed if variable doesn't exist. If the variable doesn't exist in the current [Blackboard] scope, it will look in the parent scope [Blackboard] to find it.
</description> </description>
</method> </method>
<method name="get_vars_as_dict" qualifiers="const"> <method name="get_vars_as_dict" qualifiers="const">
@ -98,7 +98,7 @@
<param index="0" name="var_name" type="StringName" /> <param index="0" name="var_name" type="StringName" />
<param index="1" name="value" type="Variant" /> <param index="1" name="value" type="Variant" />
<description> <description>
Assigns a value to a Blackboard variable. Assigns a value to a variable in the current Blackboard scope. If the variable doesn't exist, it will be created. If the variable already exists in the parent scope, the parent scope value will NOT be changed.
</description> </description>
</method> </method>
<method name="top" qualifiers="const"> <method name="top" qualifiers="const">