Skip to content

Commit a5cf10a

Browse files
authored
Merge pull request #11085 from godotengine/classref/sync-53be3b7
classref: Sync with current master branch (53be3b7)
2 parents d438b93 + 5e15d0f commit a5cf10a

10 files changed

+62
-31
lines changed

classes/class_editorimportplugin.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,19 +272,19 @@ Gets whether the import option specified by ``option_name`` should be visible in
272272

273273
.. code-tab:: gdscript
274274

275-
func _get_option_visibility(option, options):
275+
func _get_option_visibility(path, option_name, options):
276276
# Only show the lossy quality setting if the compression mode is set to "Lossy".
277-
if option == "compress/lossy_quality" and options.has("compress/mode"):
277+
if option_name == "compress/lossy_quality" and options.has("compress/mode"):
278278
return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set
279279

280280
return true
281281

282282
.. code-tab:: csharp
283283

284-
public void _GetOptionVisibility(string option, Godot.Collections.Dictionary options)
284+
public override bool _GetOptionVisibility(string path, StringName optionName, Godot.Collections.Dictionary options)
285285
{
286286
// Only show the lossy quality setting if the compression mode is set to "Lossy".
287-
if (option == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
287+
if (optionName == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
288288
{
289289
return (int)options["compress/mode"] == CompressLossy; // This is a constant you set
290290
}

classes/class_editorsettings.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5492,7 +5492,15 @@ If ``true``, uses :ref:`StringName<class_StringName>` instead of :ref:`String<cl
54925492

54935493
:ref:`bool<class_bool>` **text_editor/completion/add_type_hints** :ref:`🔗<class_EditorSettings_property_text_editor/completion/add_type_hints>`
54945494

5495-
If ``true``, adds :doc:`GDScript static typing <../tutorials/scripting/gdscript/static_typing>` hints such as ``-> void`` and ``: int`` when using code autocompletion or when creating onready variables by drag and dropping nodes into the script editor while pressing the :kbd:`Ctrl` key. If ``true``, newly created scripts will also automatically have type hints added to their method parameters and return types.
5495+
If ``true``, automatically adds :doc:`GDScript static typing <../tutorials/scripting/gdscript/static_typing>` (such as ``-> void`` and ``: int``) in many situations where it's possible to, including when:
5496+
5497+
- Accepting a suggestion from code autocompletion;
5498+
5499+
- Creating a new script from a template;
5500+
5501+
- Connecting signals from the Node dock;
5502+
5503+
- Creating variables prefixed with :ref:`@GDScript.@onready<class_@GDScript_annotation_@onready>`, by dropping nodes from the Scene dock into the script editor while holding :kbd:`Ctrl`.
54965504

54975505
.. rst-class:: classref-item-separator
54985506

classes/class_fileaccess.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ Sets file UNIX permissions.
11041104

11051105
:ref:`bool<class_bool>` **store_8**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_8>`
11061106

1107-
Stores an integer as 8 bits in the file. This advances the file cursor by 1 byte.
1107+
Stores an integer as 8 bits in the file. This advances the file cursor by 1 byte. Returns ``true`` if the operation is successful.
11081108

11091109
\ **Note:** The ``value`` should lie in the interval ``[0, 255]``. Any other value will overflow and wrap around.
11101110

@@ -1122,7 +1122,7 @@ To store a signed integer, use :ref:`store_64()<class_FileAccess_method_store_64
11221122

11231123
:ref:`bool<class_bool>` **store_16**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_16>`
11241124

1125-
Stores an integer as 16 bits in the file. This advances the file cursor by 2 bytes.
1125+
Stores an integer as 16 bits in the file. This advances the file cursor by 2 bytes. Returns ``true`` if the operation is successful.
11261126

11271127
\ **Note:** The ``value`` should lie in the interval ``[0, 2^16 - 1]``. Any other value will overflow and wrap around.
11281128

@@ -1177,7 +1177,7 @@ To store a signed integer, use :ref:`store_64()<class_FileAccess_method_store_64
11771177

11781178
:ref:`bool<class_bool>` **store_32**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_32>`
11791179

1180-
Stores an integer as 32 bits in the file. This advances the file cursor by 4 bytes.
1180+
Stores an integer as 32 bits in the file. This advances the file cursor by 4 bytes. Returns ``true`` if the operation is successful.
11811181

11821182
\ **Note:** The ``value`` should lie in the interval ``[0, 2^32 - 1]``. Any other value will overflow and wrap around.
11831183

@@ -1195,7 +1195,7 @@ To store a signed integer, use :ref:`store_64()<class_FileAccess_method_store_64
11951195

11961196
:ref:`bool<class_bool>` **store_64**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_64>`
11971197

1198-
Stores an integer as 64 bits in the file. This advances the file cursor by 8 bytes.
1198+
Stores an integer as 64 bits in the file. This advances the file cursor by 8 bytes. Returns ``true`` if the operation is successful.
11991199

12001200
\ **Note:** The ``value`` must lie in the interval ``[-2^63, 2^63 - 1]`` (i.e. be a valid :ref:`int<class_int>` value).
12011201

@@ -1211,7 +1211,7 @@ Stores an integer as 64 bits in the file. This advances the file cursor by 8 byt
12111211

12121212
:ref:`bool<class_bool>` **store_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_FileAccess_method_store_buffer>`
12131213

1214-
Stores the given array of bytes in the file. This advances the file cursor by the number of bytes written.
1214+
Stores the given array of bytes in the file. This advances the file cursor by the number of bytes written. Returns ``true`` if the operation is successful.
12151215

12161216
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12171217

@@ -1227,7 +1227,7 @@ Stores the given array of bytes in the file. This advances the file cursor by th
12271227

12281228
Store the given :ref:`PackedStringArray<class_PackedStringArray>` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long.
12291229

1230-
Text will be encoded as UTF-8.
1230+
Text will be encoded as UTF-8. Returns ``true`` if the operation is successful.
12311231

12321232
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12331233

@@ -1241,7 +1241,7 @@ Text will be encoded as UTF-8.
12411241

12421242
:ref:`bool<class_bool>` **store_double**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_double>`
12431243

1244-
Stores a floating-point number as 64 bits in the file. This advances the file cursor by 8 bytes.
1244+
Stores a floating-point number as 64 bits in the file. This advances the file cursor by 8 bytes. Returns ``true`` if the operation is successful.
12451245

12461246
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12471247

@@ -1255,7 +1255,7 @@ Stores a floating-point number as 64 bits in the file. This advances the file cu
12551255

12561256
:ref:`bool<class_bool>` **store_float**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_float>`
12571257

1258-
Stores a floating-point number as 32 bits in the file. This advances the file cursor by 4 bytes.
1258+
Stores a floating-point number as 32 bits in the file. This advances the file cursor by 4 bytes. Returns ``true`` if the operation is successful.
12591259

12601260
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12611261

@@ -1269,7 +1269,7 @@ Stores a floating-point number as 32 bits in the file. This advances the file cu
12691269

12701270
:ref:`bool<class_bool>` **store_half**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_half>`
12711271

1272-
Stores a half-precision floating-point number as 16 bits in the file. This advances the file cursor by 2 bytes.
1272+
Stores a half-precision floating-point number as 16 bits in the file. This advances the file cursor by 2 bytes. Returns ``true`` if the operation is successful.
12731273

12741274
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12751275

@@ -1283,7 +1283,7 @@ Stores a half-precision floating-point number as 16 bits in the file. This advan
12831283

12841284
:ref:`bool<class_bool>` **store_line**\ (\ line\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_line>`
12851285

1286-
Stores ``line`` in the file followed by a newline character (``\n``), encoding the text as UTF-8. This advances the file cursor by the length of the line, after the newline character. The amount of bytes written depends on the UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints.
1286+
Stores ``line`` in the file followed by a newline character (``\n``), encoding the text as UTF-8. This advances the file cursor by the length of the line, after the newline character. The amount of bytes written depends on the UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints. Returns ``true`` if the operation is successful.
12871287

12881288
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
12891289

@@ -1297,7 +1297,7 @@ Stores ``line`` in the file followed by a newline character (``\n``), encoding t
12971297

12981298
:ref:`bool<class_bool>` **store_pascal_string**\ (\ string\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_pascal_string>`
12991299

1300-
Stores the given :ref:`String<class_String>` as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. This advances the file cursor by the number of bytes written depending on the UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints.
1300+
Stores the given :ref:`String<class_String>` as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. This advances the file cursor by the number of bytes written depending on the UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints. Returns ``true`` if the operation is successful.
13011301

13021302
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
13031303

@@ -1313,7 +1313,7 @@ Stores the given :ref:`String<class_String>` as a line in the file in Pascal for
13131313

13141314
Stores a floating-point number in the file. This advances the file cursor by either 4 or 8 bytes, depending on the precision used by the current Godot build.
13151315

1316-
If using a Godot build compiled with the ``precision=single`` option (the default), this method will save a 32-bit float. Otherwise, if compiled with the ``precision=double`` option, this will save a 64-bit float.
1316+
If using a Godot build compiled with the ``precision=single`` option (the default), this method will save a 32-bit float. Otherwise, if compiled with the ``precision=double`` option, this will save a 64-bit float. Returns ``true`` if the operation is successful.
13171317

13181318
\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
13191319

@@ -1327,7 +1327,7 @@ If using a Godot build compiled with the ``precision=single`` option (the defaul
13271327

13281328
:ref:`bool<class_bool>` **store_string**\ (\ string\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_string>`
13291329

1330-
Stores ``string`` in the file without a newline character (``\n``), encoding the text as UTF-8. This advances the file cursor by the length of the string in UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints.
1330+
Stores ``string`` in the file without a newline character (``\n``), encoding the text as UTF-8. This advances the file cursor by the length of the string in UTF-8 encoded bytes, which may be different from :ref:`String.length()<class_String_method_length>` which counts the number of UTF-32 codepoints. Returns ``true`` if the operation is successful.
13311331

13321332
\ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string()<class_FileAccess_method_store_pascal_string>` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text()<class_FileAccess_method_get_as_text>`.
13331333

@@ -1343,7 +1343,7 @@ Stores ``string`` in the file without a newline character (``\n``), encoding the
13431343

13441344
:ref:`bool<class_bool>` **store_var**\ (\ value\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_FileAccess_method_store_var>`
13451345

1346-
Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). This advances the file cursor by the number of bytes written.
1346+
Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). This advances the file cursor by the number of bytes written. Returns ``true`` if the operation is successful.
13471347

13481348
Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes()<class_@GlobalScope_method_var_to_bytes>` method, as described in the :doc:`Binary serialization API <../tutorials/io/binary_serialization_api>` documentation.
13491349

classes/class_graphedit.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,27 @@ A connection is represented as a :ref:`Dictionary<class_Dictionary>` in the form
12721272
keep_alive: bool
12731273
}
12741274

1275+
\ **Example:** Get all connections on a specific port:
1276+
1277+
::
1278+
1279+
func get_connection_list_from_port(node, port):
1280+
var connections = get_connection_list_from_node(node)
1281+
var result = []
1282+
for connection in connections:
1283+
var dict = {}
1284+
if connection["from_node"] == node and connection["from_port"] == port:
1285+
dict["node"] = connection["to_node"]
1286+
dict["port"] = connection["to_port"]
1287+
dict["type"] = "left"
1288+
result.push_back(dict)
1289+
elif connection["to_node"] == node and connection["to_port"] == port:
1290+
dict["node"] = connection["from_node"]
1291+
dict["port"] = connection["from_port"]
1292+
dict["type"] = "right"
1293+
result.push_back(dict)
1294+
return result
1295+
12751296
.. rst-class:: classref-item-separator
12761297

12771298
----

classes/class_navigationmesh.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ The distance to erode/shrink the walkable area of the heightfield away from obst
330330

331331
\ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_size<class_NavigationMesh_property_cell_size>`.
332332

333+
\ **Note:** The radius must be equal or higher than ``0.0``. If the radius is ``0.0``, it won't be possible to fix invalid outline overlaps and other precision errors during the baking process. As a result, some obstacles may be excluded incorrectly from the final navigation mesh, or may delete the navigation mesh's polygons.
334+
333335
.. rst-class:: classref-item-separator
334336

335337
----
@@ -349,7 +351,7 @@ The size of the non-navigable border around the bake bounding area.
349351

350352
In conjunction with the :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` and a :ref:`edge_max_error<class_NavigationMesh_property_edge_max_error>` value at ``1.0`` or below the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by :ref:`agent_radius<class_NavigationMesh_property_agent_radius>`.
351353

352-
\ **Note:** While baking and not zero, this value will be rounded up to the nearest multiple of :ref:`cell_size<class_NavigationMesh_property_cell_size>`.
354+
\ **Note:** If this value is not ``0.0``, it will be rounded up to the nearest multiple of :ref:`cell_size<class_NavigationMesh_property_cell_size>` during baking.
353355

354356
.. rst-class:: classref-item-separator
355357

classes/class_navigationpolygon.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ Property Descriptions
303303

304304
The distance to erode/shrink the walkable surface when baking the navigation mesh.
305305

306+
\ **Note:** The radius must be equal or higher than ``0.0``. If the radius is ``0.0``, it won't be possible to fix invalid outline overlaps and other precision errors during the baking process. As a result, some obstacles may be excluded incorrectly from the final navigation mesh, or may delete the navigation mesh's polygons.
307+
306308
.. rst-class:: classref-item-separator
307309

308310
----

classes/class_projectsettings.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,8 +3430,6 @@ Editor-only override for :ref:`debug/settings/crash_handler/message<class_Projec
34303430

34313431
Whether GDScript call stacks will be tracked in release builds, thus allowing :ref:`Engine.capture_script_backtraces()<class_Engine_method_capture_script_backtraces>` to function.
34323432

3433-
Enabling this comes at the cost of roughly 40 KiB for every thread that runs any GDScript code.
3434-
34353433
\ **Note:** This setting has no effect on editor builds or debug builds, where GDScript call stacks are tracked regardless.
34363434

34373435
.. rst-class:: classref-item-separator

0 commit comments

Comments
 (0)