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:
Yuri Sizov
2023-04-26 21:36:04 +02:00
parent e2e870c611
commit 391eccca76
44 changed files with 191 additions and 175 deletions

View File

@ -41,7 +41,7 @@
<return type="Node" />
<param index="0" name="data" type="Variant" default="null" />
<description>
Requests a custom spawn, with [code]data[/code] passed to [member spawn_function] on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by [member spawn_path].
Requests a custom spawn, with [param data] passed to [member spawn_function] on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by [member spawn_path].
[b]Note:[/b] Spawnable scenes are spawned automatically. [method spawn] is only needed for custom spawns.
</description>
</method>

View File

@ -17,14 +17,14 @@
<param index="0" name="filter" type="Callable" />
<description>
Adds a peer visibility filter for this synchronizer.
[code]filter[/code] should take a peer ID [int] and return a [bool].
[param filter] should take a peer ID [int] and return a [bool].
</description>
</method>
<method name="get_visibility_for" qualifiers="const">
<return type="bool" />
<param index="0" name="peer" type="int" />
<description>
Queries the current visibility for peer [code]peer[/code].
Queries the current visibility for peer [param peer].
</description>
</method>
<method name="remove_visibility_filter">
@ -39,14 +39,14 @@
<param index="0" name="peer" type="int" />
<param index="1" name="visible" type="bool" />
<description>
Sets the visibility of [code]peer[/code] to [code]visible[/code]. If [code]peer[/code] is [code]0[/code], the value of [member public_visibility] will be updated instead.
Sets the visibility of [param peer] to [param visible]. If [param peer] is [code]0[/code], the value of [member public_visibility] will be updated instead.
</description>
</method>
<method name="update_visibility">
<return type="void" />
<param index="0" name="for_peer" type="int" default="0" />
<description>
Updates the visibility of [code]peer[/code] according to visibility filters. If [code]peer[/code] is [code]0[/code] (the default), all peers' visibilties are updated.
Updates the visibility of [param for_peer] according to visibility filters. If [param for_peer] is [code]0[/code] (the default), all peers' visibilties are updated.
</description>
</method>
</methods>
@ -77,7 +77,7 @@
<signal name="visibility_changed">
<param index="0" name="for_peer" type="int" />
<description>
Emitted when visibility of [code]for_peer[/code] is updated. See [method update_visibility].
Emitted when visibility of [param for_peer] is updated. See [method update_visibility].
</description>
</signal>
</signals>

View File

@ -55,7 +55,7 @@
<param index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
<param index="3" name="channel" type="int" default="0" />
<description>
Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
Sends the given raw [param bytes] to a specific peer identified by [param id] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
</description>
</method>
</methods>
@ -100,7 +100,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="packet" type="PackedByteArray" />
<description>
Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] receives a [param packet] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
</description>
</signal>
</signals>

View File

@ -13,7 +13,7 @@
<param index="0" name="path" type="NodePath" />
<param index="1" name="index" type="int" default="-1" />
<description>
Adds the property identified by the given [code]path[/code] to the list of the properties being synchronized, optionally passing an [code]index[/code].
Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index].
</description>
</method>
<method name="get_properties" qualifiers="const">
@ -26,28 +26,28 @@
<return type="bool" />
<param index="0" name="path" type="NodePath" />
<description>
Returns whether the given [code]path[/code] is configured for synchronization.
Returns whether the given [param path] is configured for synchronization.
</description>
</method>
<method name="property_get_index" qualifiers="const">
<return type="int" />
<param index="0" name="path" type="NodePath" />
<description>
Finds the index of the given [code]path[/code].
Finds the index of the given [param path].
</description>
</method>
<method name="property_get_spawn">
<return type="bool" />
<param index="0" name="path" type="NodePath" />
<description>
Returns whether the property identified by the given [code]path[/code] is configured to be synchronized on spawn.
Returns whether the property identified by the given [param path] is configured to be synchronized on spawn.
</description>
</method>
<method name="property_get_sync">
<return type="bool" />
<param index="0" name="path" type="NodePath" />
<description>
Returns whether the property identified by the given [code]path[/code] is configured to be synchronized on process.
Returns whether the property identified by the given [param path] is configured to be synchronized on process.
</description>
</method>
<method name="property_set_spawn">
@ -55,7 +55,7 @@
<param index="0" name="path" type="NodePath" />
<param index="1" name="enabled" type="bool" />
<description>
Sets whether the property identified by the given [code]path[/code] is configured to be synchronized on spawn.
Sets whether the property identified by the given [param path] is configured to be synchronized on spawn.
</description>
</method>
<method name="property_set_sync">
@ -63,14 +63,14 @@
<param index="0" name="path" type="NodePath" />
<param index="1" name="enabled" type="bool" />
<description>
Sets whether the property identified by the given [code]path[/code] is configured to be synchronized on process.
Sets whether the property identified by the given [param path] is configured to be synchronized on process.
</description>
</method>
<method name="remove_property">
<return type="void" />
<param index="0" name="path" type="NodePath" />
<description>
Removes the property identified by the given [code]path[/code] from the configuration.
Removes the property identified by the given [param path] from the configuration.
</description>
</method>
</methods>