Skip to content

Commit

Permalink
Doc: Clarify Blackboard.get_var() and set_var()
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Oct 13, 2024
1 parent 11abf36 commit 76f7f25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/source/classes/class_blackboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`

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

Expand Down Expand Up @@ -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>`

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

Expand Down
4 changes: 2 additions & 2 deletions doc_classes/Blackboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<param index="1" name="default" type="Variant" default="null" />
<param index="2" name="complain" type="bool" default="true" />
<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>
</method>
<method name="get_vars_as_dict" qualifiers="const">
Expand Down Expand Up @@ -98,7 +98,7 @@
<param index="0" name="var_name" type="StringName" />
<param index="1" name="value" type="Variant" />
<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>
</method>
<method name="top" qualifiers="const">
Expand Down

0 comments on commit 76f7f25

Please sign in to comment.