From 7539a3a7cf058c084ae0c0d3ee5111b0fc73c807 Mon Sep 17 00:00:00 2001 From: Micky Date: Mon, 2 Dec 2024 15:40:42 +0100 Subject: [PATCH] Remove uses of implicit static typing from the documentation --- doc/classes/DTLSServer.xml | 8 ++++---- doc/classes/UDPServer.xml | 6 +++--- modules/zip/doc_classes/ZIPPacker.xml | 4 ++-- modules/zip/doc_classes/ZIPReader.xml | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 41e241779a9b..5b6264671818 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -11,8 +11,8 @@ # server_node.gd extends Node - var dtls := DTLSServer.new() - var server := UDPServer.new() + var dtls = DTLSServer.new() + var server = UDPServer.new() var peers = [] func _ready(): @@ -90,8 +90,8 @@ # client_node.gd extends Node - var dtls := PacketPeerDTLS.new() - var udp := PacketPeerUDP.new() + var dtls = PacketPeerDTLS.new() + var udp = PacketPeerUDP.new() var connected = false func _ready(): diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index 123ae399b331..59a12a1dafb6 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -13,7 +13,7 @@ class_name ServerNode extends Node - var server := UDPServer.new() + var server = UDPServer.new() var peers = [] func _ready(): @@ -22,7 +22,7 @@ func _process(delta): server.poll() # Important! if server.is_connection_available(): - var peer: PacketPeerUDP = server.take_connection() + var peer = server.take_connection() var packet = peer.get_packet() print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) print("Received data: %s" % [packet.get_string_from_utf8()]) @@ -77,7 +77,7 @@ class_name ClientNode extends Node - var udp := PacketPeerUDP.new() + var udp = PacketPeerUDP.new() var connected = false func _ready(): diff --git a/modules/zip/doc_classes/ZIPPacker.xml b/modules/zip/doc_classes/ZIPPacker.xml index 3be7d8b6df3e..517e20a92c06 100644 --- a/modules/zip/doc_classes/ZIPPacker.xml +++ b/modules/zip/doc_classes/ZIPPacker.xml @@ -7,8 +7,8 @@ This class implements a writer that allows storing the multiple blobs in a zip archive. [codeblock] func write_zip_file(): - var writer := ZIPPacker.new() - var err := writer.open("user://archive.zip") + var writer = ZIPPacker.new() + var err = writer.open("user://archive.zip") if err != OK: return err writer.start_file("hello.txt") diff --git a/modules/zip/doc_classes/ZIPReader.xml b/modules/zip/doc_classes/ZIPReader.xml index bf596806b2d6..cf85292295da 100644 --- a/modules/zip/doc_classes/ZIPReader.xml +++ b/modules/zip/doc_classes/ZIPReader.xml @@ -7,11 +7,11 @@ This class implements a reader that can extract the content of individual files inside a zip archive. [codeblock] func read_zip_file(): - var reader := ZIPReader.new() - var err := reader.open("user://archive.zip") + var reader = ZIPReader.new() + var err = reader.open("user://archive.zip") if err != OK: return PackedByteArray() - var res := reader.read_file("hello.txt") + var res = reader.read_file("hello.txt") reader.close() return res [/codeblock]