classref: Sync with current master branch (13a0d6e)

This commit is contained in:
Godot Organization
2023-12-23 03:19:28 +00:00
parent 4a944b2020
commit dce008340a
36 changed files with 1271 additions and 197 deletions

View File

@@ -237,6 +237,8 @@ Methods
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get<class_Dictionary_method_get>` **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get_or_add<class_Dictionary_method_get_or_add>` **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)** |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has<class_Dictionary_method_has>` **(** :ref:`Variant<class_Variant>` key **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_all<class_Dictionary_method_has_all>` **(** :ref:`Array<class_Array>` keys **)** |const| |
@@ -374,6 +376,18 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the
----
.. _class_Dictionary_method_get_or_add:
.. rst-class:: classref-method
:ref:`Variant<class_Variant>` **get_or_add** **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)**
Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get<class_Dictionary_method_get>`. Otherwise, the ``default`` value is inserted into the dictionary and returned.
.. rst-class:: classref-item-separator
----
.. _class_Dictionary_method_has:
.. rst-class:: classref-method