You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Validate code tags in documentation for potential params
Adds a check to make_rst to look for matches between the text inside of the [code][/code] tag and known param identifiers. Fixes most of what was revealed.
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
<param index="1" name="peer_id" type="int" />
|
||||
<param index="2" name="unreliable_lifetime" type="int" default="1" />
|
||||
<description>
|
||||
Add a new peer to the mesh with the given [code]peer_id[/code]. The [WebRTCPeerConnection] must be in state [constant WebRTCPeerConnection.STATE_NEW].
|
||||
Three channels will be created for reliable, unreliable, and ordered transport. The value of [code]unreliable_lifetime[/code] will be passed to the [code]maxPacketLifetime[/code] option when creating unreliable and ordered channels (see [method WebRTCPeerConnection.create_data_channel]).
|
||||
Add a new peer to the mesh with the given [param peer_id]. The [WebRTCPeerConnection] must be in state [constant WebRTCPeerConnection.STATE_NEW].
|
||||
Three channels will be created for reliable, unreliable, and ordered transport. The value of [param unreliable_lifetime] will be passed to the [code]"maxPacketLifetime"[/code] option when creating unreliable and ordered channels (see [method WebRTCPeerConnection.create_data_channel]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_client">
|
||||
@@ -27,8 +27,8 @@
|
||||
<param index="0" name="peer_id" type="int" />
|
||||
<param index="1" name="channels_config" type="Array" default="[]" />
|
||||
<description>
|
||||
Initialize the multiplayer peer as a client with the given [code]peer_id[/code] (must be between 2 and 2147483647). In this mode, you should only call [method add_peer] once and with [code]peer_id[/code] of [code]1[/code]. This mode enables [method MultiplayerPeer.is_server_relay_supported], allowing the upper [MultiplayerAPI] layer to perform peer exchange and packet relaying.
|
||||
You can optionally specify a [code]channels_config[/code] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
|
||||
Initialize the multiplayer peer as a client with the given [param peer_id] (must be between 2 and 2147483647). In this mode, you should only call [method add_peer] once and with [param peer_id] of [code]1[/code]. This mode enables [method MultiplayerPeer.is_server_relay_supported], allowing the upper [MultiplayerAPI] layer to perform peer exchange and packet relaying.
|
||||
You can optionally specify a [param channels_config] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_mesh">
|
||||
@@ -36,7 +36,7 @@
|
||||
<param index="0" name="peer_id" type="int" />
|
||||
<param index="1" name="channels_config" type="Array" default="[]" />
|
||||
<description>
|
||||
Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) with the given [code]peer_id[/code] (must be between 1 and 2147483647).
|
||||
Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) with the given [param peer_id] (must be between 1 and 2147483647).
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_server">
|
||||
@@ -44,14 +44,14 @@
|
||||
<param index="0" name="channels_config" type="Array" default="[]" />
|
||||
<description>
|
||||
Initialize the multiplayer peer as a server (with unique ID of [code]1[/code]). This mode enables [method MultiplayerPeer.is_server_relay_supported], allowing the upper [MultiplayerAPI] layer to perform peer exchange and packet relaying.
|
||||
You can optionally specify a [code]channels_config[/code] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
|
||||
You can optionally specify a [param channels_config] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_peer">
|
||||
<return type="Dictionary" />
|
||||
<param index="0" name="peer_id" type="int" />
|
||||
<description>
|
||||
Returns a dictionary representation of the peer with given [code]peer_id[/code] with three keys. [code]connection[/code] containing the [WebRTCPeerConnection] to this peer, [code]channels[/code] an array of three [WebRTCDataChannel], and [code]connected[/code] a boolean representing if the peer connection is currently connected (all three channels are open).
|
||||
Returns a dictionary representation of the peer with given [param peer_id] with three keys. [code]"connection"[/code] containing the [WebRTCPeerConnection] to this peer, [code]"channels"[/code] an array of three [WebRTCDataChannel], and [code]"connected"[/code] a boolean representing if the peer connection is currently connected (all three channels are open).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_peers">
|
||||
@@ -64,14 +64,14 @@
|
||||
<return type="bool" />
|
||||
<param index="0" name="peer_id" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given [code]peer_id[/code] is in the peers map (it might not be connected though).
|
||||
Returns [code]true[/code] if the given [param peer_id] is in the peers map (it might not be connected though).
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_peer">
|
||||
<return type="void" />
|
||||
<param index="0" name="peer_id" type="int" />
|
||||
<description>
|
||||
Remove the peer with given [code]peer_id[/code] from the mesh. If the peer was connected, and [signal MultiplayerPeer.peer_connected] was emitted for it, then [signal MultiplayerPeer.peer_disconnected] will be emitted.
|
||||
Remove the peer with given [param peer_id] from the mesh. If the peer was connected, and [signal MultiplayerPeer.peer_connected] was emitted for it, then [signal MultiplayerPeer.peer_disconnected] will be emitted.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
<param index="0" name="label" type="String" />
|
||||
<param index="1" name="options" type="Dictionary" default="{}" />
|
||||
<description>
|
||||
Returns a new [WebRTCDataChannel] (or [code]null[/code] on failure) with given [code]label[/code] and optionally configured via the [code]options[/code] dictionary. This method can only be called when the connection is in state [constant STATE_NEW].
|
||||
There are two ways to create a working data channel: either call [method create_data_channel] on only one of the peer and listen to [signal data_channel_received] on the other, or call [method create_data_channel] on both peers, with the same values, and the [code]negotiated[/code] option set to [code]true[/code].
|
||||
Valid [code]options[/code] are:
|
||||
Returns a new [WebRTCDataChannel] (or [code]null[/code] on failure) with given [param label] and optionally configured via the [param options] dictionary. This method can only be called when the connection is in state [constant STATE_NEW].
|
||||
There are two ways to create a working data channel: either call [method create_data_channel] on only one of the peer and listen to [signal data_channel_received] on the other, or call [method create_data_channel] on both peers, with the same values, and the [code]"negotiated"[/code] option set to [code]true[/code].
|
||||
Valid [param options] are:
|
||||
[codeblock]
|
||||
{
|
||||
"negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. "data_channel_received" will not be called.
|
||||
@@ -83,8 +83,8 @@
|
||||
<return type="int" enum="Error" />
|
||||
<param index="0" name="configuration" type="Dictionary" default="{}" />
|
||||
<description>
|
||||
Re-initialize this peer connection, closing any previously active connection, and going back to state [constant STATE_NEW]. A dictionary of [code]options[/code] can be passed to configure the peer connection.
|
||||
Valid [code]options[/code] are:
|
||||
Re-initialize this peer connection, closing any previously active connection, and going back to state [constant STATE_NEW]. A dictionary of [param configuration] options can be passed to configure the peer connection.
|
||||
Valid [param configuration] options are:
|
||||
[codeblock]
|
||||
{
|
||||
"iceServers": [
|
||||
@@ -111,7 +111,7 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="extension_class" type="StringName" />
|
||||
<description>
|
||||
Sets the [code]extension_class[/code] as the default [WebRTCPeerConnectionExtension] returned when creating a new [WebRTCPeerConnection].
|
||||
Sets the [param extension_class] as the default [WebRTCPeerConnectionExtension] returned when creating a new [WebRTCPeerConnection].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_local_description">
|
||||
@@ -129,8 +129,8 @@
|
||||
<param index="1" name="sdp" type="String" />
|
||||
<description>
|
||||
Sets the SDP description of the remote peer. This should be called with the values generated by a remote peer and received over the signaling server.
|
||||
If [code]type[/code] is [code]offer[/code] the peer will emit [signal session_description_created] with the appropriate answer.
|
||||
If [code]type[/code] is [code]answer[/code] the peer will start emitting [signal ice_candidate_created].
|
||||
If [param type] is [code]"offer"[/code] the peer will emit [signal session_description_created] with the appropriate answer.
|
||||
If [param type] is [code]"answer"[/code] the peer will start emitting [signal ice_candidate_created].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
Reference in New Issue
Block a user