Skip to content

Commit 8204861

Browse files
authored
Merge pull request #88 from Redot-Engine/classref/sync-20b6554
classref: Sync with current master branch (20b6554)
2 parents 45abaff + 150e07b commit 8204861

File tree

220 files changed

+6876
-1369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+6876
-1369
lines changed

classes/class_@gdscript.rst

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is
787787

788788
\ **Note:** As annotations describe their subject, the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be placed before the class definition and inheritance.
789789

790-
\ **Note:** Unlike other annotations, the argument of the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be a string literal (constant expressions are not supported).
790+
\ **Note:** Unlike most other annotations, the argument of the :ref:`@icon<class_@GDScript_annotation_@icon>` annotation must be a string literal (constant expressions are not supported).
791791

792792
.. rst-class:: classref-item-separator
793793

@@ -803,7 +803,7 @@ Mark the following property as assigned when the :ref:`Node<class_Node>` is read
803803

804804
::
805805

806-
@onready var character_name: Label = $Label
806+
@onready var character_name = $Label
807807

808808
.. rst-class:: classref-item-separator
809809

@@ -893,6 +893,48 @@ Mark the following statement to ignore the specified ``warning``. See :doc:`GDSc
893893
@warning_ignore("unreachable_code")
894894
print("unreachable")
895895

896+
See also :ref:`@warning_ignore_start<class_@GDScript_annotation_@warning_ignore_start>` and :ref:`@warning_ignore_restore<class_@GDScript_annotation_@warning_ignore_restore>`.
897+
898+
.. rst-class:: classref-item-separator
899+
900+
----
901+
902+
.. _class_@GDScript_annotation_@warning_ignore_restore:
903+
904+
.. rst-class:: classref-annotation
905+
906+
**@warning_ignore_restore**\ (\ warning\: :ref:`String<class_String>`, ...\ ) |vararg| :ref:`🔗<class_@GDScript_annotation_@warning_ignore_restore>`
907+
908+
Stops ignoring the listed warning types after :ref:`@warning_ignore_start<class_@GDScript_annotation_@warning_ignore_start>`. Ignoring the specified warning types will be reset to Project Settings. This annotation can be omitted to ignore the warning types until the end of the file.
909+
910+
\ **Note:** Unlike most other annotations, arguments of the :ref:`@warning_ignore_restore<class_@GDScript_annotation_@warning_ignore_restore>` annotation must be string literals (constant expressions are not supported).
911+
912+
.. rst-class:: classref-item-separator
913+
914+
----
915+
916+
.. _class_@GDScript_annotation_@warning_ignore_start:
917+
918+
.. rst-class:: classref-annotation
919+
920+
**@warning_ignore_start**\ (\ warning\: :ref:`String<class_String>`, ...\ ) |vararg| :ref:`🔗<class_@GDScript_annotation_@warning_ignore_start>`
921+
922+
Starts ignoring the listed warning types until the end of the file or the :ref:`@warning_ignore_restore<class_@GDScript_annotation_@warning_ignore_restore>` annotation with the given warning type.
923+
924+
::
925+
926+
func test():
927+
var a = 1 # Warning (if enabled in the Project Settings).
928+
@warning_ignore_start("unused_variable")
929+
var b = 2 # No warning.
930+
var c = 3 # No warning.
931+
@warning_ignore_restore("unused_variable")
932+
var d = 4 # Warning (if enabled in the Project Settings).
933+
934+
\ **Note:** To suppress a single warning, use :ref:`@warning_ignore<class_@GDScript_annotation_@warning_ignore>` instead.
935+
936+
\ **Note:** Unlike most other annotations, arguments of the :ref:`@warning_ignore_start<class_@GDScript_annotation_@warning_ignore_start>` annotation must be string literals (constant expressions are not supported).
937+
896938
.. rst-class:: classref-section-separator
897939

898940
----

0 commit comments

Comments
 (0)