From 76f7f25bcc310cea726b6c4a68a28bcc8884c129 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 13 Oct 2024 20:26:04 +0200 Subject: [PATCH] Doc: Clarify `Blackboard.get_var()` and `set_var()` --- doc/source/classes/class_blackboard.rst | 4 ++-- doc_classes/Blackboard.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/classes/class_blackboard.rst b/doc/source/classes/class_blackboard.rst index 59963046..05c43886 100644 --- a/doc/source/classes/class_blackboard.rst +++ b/doc/source/classes/class_blackboard.rst @@ -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:`🔗` -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 @@ -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:`🔗` -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 diff --git a/doc_classes/Blackboard.xml b/doc_classes/Blackboard.xml index 32a07208..3f8a9ad5 100644 --- a/doc_classes/Blackboard.xml +++ b/doc_classes/Blackboard.xml @@ -46,7 +46,7 @@ - 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. @@ -98,7 +98,7 @@ - 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.