Replace Array return types with TypedArray 2

This commit is contained in:
kobewi 2022-08-05 20:35:08 +02:00
parent d5606503b4
commit 1abdffe7a0
75 changed files with 301 additions and 263 deletions

View file

@ -10,7 +10,7 @@
</tutorials>
<methods>
<method name="clip_polygons">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
@ -19,7 +19,7 @@
</description>
</method>
<method name="clip_polyline_with_polygon">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="polygon" type="PackedVector2Array" />
<description>
@ -34,7 +34,7 @@
</description>
</method>
<method name="exclude_polygons">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
@ -71,7 +71,7 @@
</description>
</method>
<method name="intersect_polygons">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
@ -80,7 +80,7 @@
</description>
</method>
<method name="intersect_polyline_with_polygon">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="polygon" type="PackedVector2Array" />
<description>
@ -130,7 +130,7 @@
</description>
</method>
<method name="merge_polygons">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
@ -139,7 +139,7 @@
</description>
</method>
<method name="offset_polygon">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polygon" type="PackedVector2Array" />
<param index="1" name="delta" type="float" />
<param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />
@ -166,7 +166,7 @@
</description>
</method>
<method name="offset_polyline">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="delta" type="float" />
<param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />

View file

@ -10,14 +10,14 @@
</tutorials>
<methods>
<method name="build_box_planes">
<return type="Array" />
<return type="Plane[]" />
<param index="0" name="extents" type="Vector3" />
<description>
Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [param extents], which represents one (positive) corner of the box (i.e. half its actual size).
</description>
</method>
<method name="build_capsule_planes">
<return type="Array" />
<return type="Plane[]" />
<param index="0" name="radius" type="float" />
<param index="1" name="height" type="float" />
<param index="2" name="sides" type="int" />
@ -28,7 +28,7 @@
</description>
</method>
<method name="build_cylinder_planes">
<return type="Array" />
<return type="Plane[]" />
<param index="0" name="radius" type="float" />
<param index="1" name="height" type="float" />
<param index="2" name="sides" type="int" />

View file

@ -149,7 +149,7 @@
</description>
</method>
<method name="get_connection_list" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code].
</description>

View file

@ -24,13 +24,13 @@
</description>
</method>
<method name="get_local_addresses" qualifiers="const">
<return type="Array" />
<return type="PackedStringArray" />
<description>
Returns all the user's current IPv4 and IPv6 addresses as an array.
</description>
</method>
<method name="get_local_interfaces" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns all network adapters as an array.
Each adapter is a dictionary of the form:
@ -74,7 +74,7 @@
</description>
</method>
<method name="resolve_hostname_addresses">
<return type="Array" />
<return type="PackedStringArray" />
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>

View file

@ -41,7 +41,7 @@
</description>
</method>
<method name="action_get_events">
<return type="Array" />
<return type="InputEvent[]" />
<param index="0" name="action" type="StringName" />
<description>
Returns an array of [InputEvent]s associated with a given action.
@ -91,7 +91,7 @@
</description>
</method>
<method name="get_actions">
<return type="Array" />
<return type="StringName[]" />
<description>
Returns an array of all actions in the [InputMap].
</description>

View file

@ -60,7 +60,7 @@
</description>
</method>
<method name="_surface_get_blend_shape_arrays" qualifiers="virtual const">
<return type="Array" />
<return type="Array[]" />
<param index="0" name="index" type="int" />
<description>
</description>
@ -153,7 +153,7 @@
</description>
</method>
<method name="surface_get_blend_shape_arrays" qualifiers="const">
<return type="Array" />
<return type="Array[]" />
<param index="0" name="surf_idx" type="int" />
<description>
Returns the blend shape arrays for the requested surface.

View file

@ -128,7 +128,7 @@
</description>
</method>
<method name="get_maps" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<description>
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
@ -150,7 +150,7 @@
</description>
</method>
<method name="map_get_agents" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map].
@ -198,7 +198,7 @@
</description>
</method>
<method name="map_get_regions" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map].

View file

@ -128,7 +128,7 @@
</description>
</method>
<method name="get_maps" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<description>
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
@ -150,7 +150,7 @@
</description>
</method>
<method name="map_get_agents" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map].
@ -216,7 +216,7 @@
</description>
</method>
<method name="map_get_regions" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map].

View file

@ -262,7 +262,7 @@
</description>
</method>
<method name="get_groups" qualifiers="const">
<return type="Array" />
<return type="StringName[]" />
<description>
Returns an array listing the groups that the node is a member of.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.

View file

@ -39,7 +39,7 @@
</description>
</method>
<method name="get_gizmos" qualifiers="const">
<return type="Array" />
<return type="Node3DGizmo[]" />
<description>
Returns all the gizmos attached to this [code]Node3D[/code].
</description>

View file

@ -43,7 +43,7 @@
</description>
</method>
<method name="_get_property_list" qualifiers="virtual">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Virtual method which can be overridden to customize the return value of [method get_property_list].
Returns the object's property list as an [Array] of dictionaries.
@ -353,7 +353,7 @@
</description>
</method>
<method name="get_incoming_connections" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns an [Array] of dictionaries with information about signals that are connected to the object.
Each [Dictionary] contains three String entries:
@ -394,13 +394,13 @@
</description>
</method>
<method name="get_method_list" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the object's methods and their signatures as an [Array].
</description>
</method>
<method name="get_property_list" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the object's property list as an [Array] of dictionaries.
Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum PropertyUsageFlags]).
@ -413,14 +413,14 @@
</description>
</method>
<method name="get_signal_connection_list" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="signal" type="StringName" />
<description>
Returns an [Array] of connections for the given [param signal].
</description>
</method>
<method name="get_signal_list" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the list of signals as an [Array] of dictionaries.
</description>

View file

@ -79,7 +79,7 @@
</description>
</method>
<method name="get_custom_monitor_names">
<return type="Array" />
<return type="StringName[]" />
<description>
Returns the names of active custom monitors in an [Array].
</description>

View file

@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="cast_motion">
<return type="Array" />
<return type="PackedFloat32Array" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object.
@ -21,7 +21,7 @@
</description>
</method>
<method name="collide_shape">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@ -44,7 +44,7 @@
</description>
</method>
<method name="intersect_point">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsPointQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@ -72,7 +72,7 @@
</description>
</method>
<method name="intersect_shape">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>

View file

@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="cast_motion">
<return type="Array" />
<return type="PackedFloat32Array" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object.
@ -21,7 +21,7 @@
</description>
</method>
<method name="collide_shape">
<return type="Array" />
<return type="PackedVector2Array[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@ -46,7 +46,7 @@
</description>
</method>
<method name="intersect_point">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsPointQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@ -73,7 +73,7 @@
</description>
</method>
<method name="intersect_shape">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>

View file

@ -19,7 +19,7 @@
</description>
</method>
<method name="get_ids" qualifiers="const">
<return type="Array" />
<return type="RID[]" />
<description>
</description>
</method>

View file

@ -1959,7 +1959,7 @@
</description>
</method>
<method name="mesh_surface_get_blend_shape_arrays" qualifiers="const">
<return type="Array" />
<return type="Array[]" />
<param index="0" name="mesh" type="RID" />
<param index="1" name="surface" type="int" />
<description>

View file

@ -98,7 +98,7 @@
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Array" />
<return type="Node3D[]" />
<description>
Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.

View file

@ -113,14 +113,14 @@
</description>
</method>
<method name="get_nodes_in_group">
<return type="Array" />
<return type="Node[]" />
<param index="0" name="group" type="StringName" />
<description>
Returns a list of all nodes assigned to the given group.
</description>
</method>
<method name="get_processed_tweens">
<return type="Array" />
<return type="Tween[]" />
<description>
Returns an array of currently existing [Tween]s in the [SceneTree] (both running and paused).
</description>

View file

@ -44,19 +44,19 @@
</description>
</method>
<method name="get_script_method_list">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the list of methods in this [Script].
</description>
</method>
<method name="get_script_property_list">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the list of properties in this [Script].
</description>
</method>
<method name="get_script_signal_list">
<return type="Array" />
<return type="Dictionary[]" />
<description>
Returns the list of user signals defined in this [Script].
</description>

View file

@ -22,13 +22,13 @@
</description>
</method>
<method name="get_open_script_editors" qualifiers="const">
<return type="Array" />
<return type="ScriptEditorBase[]" />
<description>
Returns an array with all [ScriptEditorBase] objects which are currently open in editor.
</description>
</method>
<method name="get_open_scripts" qualifiers="const">
<return type="Array" />
<return type="Script[]" />
<description>
Returns an array with all [Script] objects which are currently open in editor.
</description>

View file

@ -21,7 +21,7 @@
</description>
</method>
<method name="collide_and_get_contacts">
<return type="Array" />
<return type="PackedVector2Array" />
<param index="0" name="local_xform" type="Transform2D" />
<param index="1" name="with_shape" type="Shape2D" />
<param index="2" name="shape_xform" type="Transform2D" />
@ -45,7 +45,7 @@
</description>
</method>
<method name="collide_with_motion_and_get_contacts">
<return type="Array" />
<return type="PackedVector2Array" />
<param index="0" name="local_xform" type="Transform2D" />
<param index="1" name="local_motion" type="Vector2" />
<param index="2" name="with_shape" type="Shape2D" />

View file

@ -19,7 +19,7 @@
</description>
</method>
<method name="get_collision_exceptions">
<return type="Array" />
<return type="PhysicsBody3D[]" />
<description>
Returns an array of nodes that were added as collision exceptions for this body.
</description>

View file

@ -81,7 +81,7 @@
</description>
</method>
<method name="get_node_connections" qualifiers="const">
<return type="Array" />
<return type="Dictionary[]" />
<param index="0" name="type" type="int" enum="VisualShader.Type" />
<description>
Returns the list of connected nodes with the specified type.