From 0c2296fb1b416d0dedf2bd6afe047746c14d32fa Mon Sep 17 00:00:00 2001 From: Micky Date: Mon, 11 Nov 2024 21:19:34 +0100 Subject: [PATCH] Fix C# boolean "Prints" comments in documentation --- doc/classes/Array.xml | 18 +++++++++--------- doc/classes/Dictionary.xml | 8 ++++---- doc/classes/Engine.xml | 8 ++++---- doc/classes/OS.xml | 8 ++++---- doc/classes/PolygonPathFinder.xml | 4 ++-- doc/classes/String.xml | 4 ++-- doc/classes/StringName.xml | 4 ++-- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 1b7dbf7c41f..983e8fc98f5 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -183,17 +183,17 @@ public override void _Ready() { - // Prints true (3/3 elements evaluate to true). + // Prints True (3/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(GreaterThan5)); - // Prints false (1/3 elements evaluate to true). + // Prints False (1/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 10, 4 }.All(GreaterThan5)); - // Prints false (0/3 elements evaluate to true). + // Prints False (0/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5)); - // Prints true (0/0 elements evaluate to true). + // Prints True (0/0 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5)); // Same as the first line above, but using a lambda function. - GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints true + GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True } [/csharp] [/codeblocks] @@ -462,10 +462,10 @@ [csharp] var arr = new Godot.Collections.Array { "inside", 7 }; // By C# convention, this method is renamed to `Contains`. - GD.Print(arr.Contains("inside")); // Prints true - GD.Print(arr.Contains("outside")); // Prints false - GD.Print(arr.Contains(7)); // Prints true - GD.Print(arr.Contains("7")); // Prints false + GD.Print(arr.Contains("inside")); // Prints True + GD.Print(arr.Contains("outside")); // Prints False + GD.Print(arr.Contains(7)); // Prints True + GD.Print(arr.Contains("7")); // Prints False [/csharp] [/codeblocks] In GDScript, this is equivalent to the [code]in[/code] operator: diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 5c9b22fe4a1..2e02de54a8e 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -281,9 +281,9 @@ { 210, default }, }; - GD.Print(myDict.ContainsKey("Godot")); // Prints true - GD.Print(myDict.ContainsKey(210)); // Prints true - GD.Print(myDict.ContainsKey(4)); // Prints false + GD.Print(myDict.ContainsKey("Godot")); // Prints True + GD.Print(myDict.ContainsKey(210)); // Prints True + GD.Print(myDict.ContainsKey(4)); // Prints False [/csharp] [/codeblocks] In GDScript, this is equivalent to the [code]in[/code] operator: @@ -321,7 +321,7 @@ var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. - GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints true + GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints True [/csharp] [/codeblocks] [b]Note:[/b] Dictionaries with the same entries but in a different order will not have the same hash. diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index bba51570538..34ba5ec6554 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -223,10 +223,10 @@ print(Engine.has_singleton("Unknown")) # Prints false [/gdscript] [csharp] - GD.Print(Engine.HasSingleton("OS")); // Prints true - GD.Print(Engine.HasSingleton("Engine")); // Prints true - GD.Print(Engine.HasSingleton("AudioServer")); // Prints true - GD.Print(Engine.HasSingleton("Unknown")); // Prints false + GD.Print(Engine.HasSingleton("OS")); // Prints True + GD.Print(Engine.HasSingleton("Engine")); // Prints True + GD.Print(Engine.HasSingleton("AudioServer")); // Prints True + GD.Print(Engine.HasSingleton("Unknown")); // Prints False [/csharp] [/codeblocks] [b]Note:[/b] Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 777950c0752..90cf1871cc3 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -605,10 +605,10 @@ print(OS.is_keycode_unicode(KEY_ESCAPE)) # Prints false [/gdscript] [csharp] - GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints true - GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints true - GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints false - GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints false + GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints True + GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints True + GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints False + GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints False [/csharp] [/codeblocks] diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index b70633883c8..98734c3e9b0 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -62,8 +62,8 @@ }; var connections = new int[] { 0, 1, 1, 2, 2, 0 }; polygonPathFinder.Setup(points, connections); - GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints true - GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints false + GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints True + GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints False [/csharp] [/codeblocks] diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 44795af4730..e02b1d76cc0 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -139,8 +139,8 @@ print("I" in "team") # Prints false [/gdscript] [csharp] - GD.Print("Node".Contains("de")); // Prints true - GD.Print("team".Contains("I")); // Prints false + GD.Print("Node".Contains("de")); // Prints True + GD.Print("team".Contains("I")); // Prints False [/csharp] [/codeblocks] If you need to know where [param what] is within the string, use [method find]. See also [method containsn]. diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 3a2b4924961..163a2303af9 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -122,8 +122,8 @@ print("I" in "team") # Prints false [/gdscript] [csharp] - GD.Print("Node".Contains("de")); // Prints true - GD.Print("team".Contains("I")); // Prints false + GD.Print("Node".Contains("de")); // Prints True + GD.Print("team".Contains("I")); // Prints False [/csharp] [/codeblocks] If you need to know where [param what] is within the string, use [method find]. See also [method containsn].