From 4e393ab4a082560f8434b013f4f5bb551c2a0eaf Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 15 Dec 2021 22:26:54 +0800 Subject: [PATCH] Fix indentations in class reference XMLs --- doc/classes/AnimationNode.xml | 2 +- doc/classes/HMACContext.xml | 84 +++++++++++++++---------------- doc/classes/PacketPeerUDP.xml | 56 ++++++++++----------- doc/classes/PhysicsServer3D.xml | 1 - doc/classes/RDFramebufferPass.xml | 2 +- 5 files changed, 72 insertions(+), 73 deletions(-) diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index c9d8ae99366..08290523f7e 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -5,7 +5,7 @@ Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. - Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. + Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index 69ad194fe02..b29f821da53 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -5,52 +5,52 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once. - [codeblocks] - [gdscript] - extends Node - var ctx = HMACContext.new() + [codeblocks] + [gdscript] + extends Node + var ctx = HMACContext.new() - func _ready(): - var key = "supersecret".to_utf8() - var err = ctx.start(HashingContext.HASH_SHA256, key) - assert(err == OK) - var msg1 = "this is ".to_utf8() - var msg2 = "vewy vewy secret".to_utf8() - err = ctx.update(msg1) - assert(err == OK) - err = ctx.update(msg2) - assert(err == OK) - var hmac = ctx.finish() - print(hmac.hex_encode()) + func _ready(): + var key = "supersecret".to_utf8() + var err = ctx.start(HashingContext.HASH_SHA256, key) + assert(err == OK) + var msg1 = "this is ".to_utf8() + var msg2 = "vewy vewy secret".to_utf8() + err = ctx.update(msg1) + assert(err == OK) + err = ctx.update(msg2) + assert(err == OK) + var hmac = ctx.finish() + print(hmac.hex_encode()) - [/gdscript] - [csharp] - using Godot; - using System; - using System.Diagnostics; + [/gdscript] + [csharp] + using Godot; + using System; + using System.Diagnostics; - public class CryptoNode : Node - { - private HMACContext ctx = new HMACContext(); - public override void _Ready() - { - PackedByteArray key = String("supersecret").to_utf8(); - Error err = ctx.Start(HashingContext.HASH_SHA256, key); - GD.Assert(err == OK); - PackedByteArray msg1 = String("this is ").to_utf8(); - PackedByteArray msg2 = String("vewy vew secret").to_utf8(); - err = ctx.Update(msg1); - GD.Assert(err == OK); - err = ctx.Update(msg2); - GD.Assert(err == OK); - PackedByteArray hmac = ctx.Finish(); - GD.Print(hmac.HexEncode()); - } - } + public class CryptoNode : Node + { + private HMACContext ctx = new HMACContext(); + public override void _Ready() + { + PackedByteArray key = String("supersecret").to_utf8(); + Error err = ctx.Start(HashingContext.HASH_SHA256, key); + GD.Assert(err == OK); + PackedByteArray msg1 = String("this is ").to_utf8(); + PackedByteArray msg2 = String("vewy vew secret").to_utf8(); + err = ctx.Update(msg1); + GD.Assert(err == OK); + err = ctx.Update(msg2); + GD.Assert(err == OK); + PackedByteArray hmac = ctx.Finish(); + GD.Print(hmac.HexEncode()); + } + } - [/csharp] - [/codeblocks] - [b]Note:[/b] Not available in HTML5 exports. + [/csharp] + [/codeblocks] + [b]Note:[/b] Not available in HTML5 exports. diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 31640eb3d86..cefb74191e6 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -107,36 +107,36 @@ Waits for a packet to arrive on the bound address. See [method bind]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: - [codeblocks] - [gdscript] - socket = PacketPeerUDP.new() - # Server - socket.set_dest_address("127.0.0.1", 789) - socket.put_packet("Time to stop".to_ascii()) + [codeblocks] + [gdscript] + socket = PacketPeerUDP.new() + # Server + socket.set_dest_address("127.0.0.1", 789) + socket.put_packet("Time to stop".to_ascii()) - # Client - while socket.wait() == OK: - var data = socket.get_packet().get_string_from_ascii() - if data == "Time to stop": - return - [/gdscript] - [csharp] - var socket = new PacketPeerUDP(); - // Server - socket.SetDestAddress("127.0.0.1", 789); - socket.PutPacket("Time to stop".ToAscii()); + # Client + while socket.wait() == OK: + var data = socket.get_packet().get_string_from_ascii() + if data == "Time to stop": + return + [/gdscript] + [csharp] + var socket = new PacketPeerUDP(); + // Server + socket.SetDestAddress("127.0.0.1", 789); + socket.PutPacket("Time to stop".ToAscii()); - // Client - while (socket.Wait() == OK) - { - string data = socket.GetPacket().GetStringFromASCII(); - if (data == "Time to stop") - { - return; - } - } - [/csharp] - [/codeblocks] + // Client + while (socket.Wait() == OK) + { + string data = socket.GetPacket().GetStringFromASCII(); + if (data == "Time to stop") + { + return; + } + } + [/csharp] + [/codeblocks] diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 16c195c6dcc..cb90d84238c 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -336,7 +336,6 @@ Returns the physics layer or layers a body can collide with. -- diff --git a/doc/classes/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml index 4469a5d447f..33e4248983e 100644 --- a/doc/classes/RDFramebufferPass.xml +++ b/doc/classes/RDFramebufferPass.xml @@ -5,7 +5,7 @@ This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments. - Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage. + Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.