doc: Use self-closing tags for return and argument

For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
This commit is contained in:
Rémi Verschelde
2021-07-30 15:28:05 +02:00
parent c5589c76ce
commit 16fd1c421e
350 changed files with 10551 additions and 21102 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -12,15 +12,13 @@
</tutorials>
<methods>
<method name="get_as_byte_code" qualifiers="const">
<return type="PoolByteArray">
</return>
<return type="PoolByteArray" />
<description>
Returns byte code for the script source code.
</description>
</method>
<method name="new" qualifiers="vararg">
<return type="Variant">
</return>
<return type="Variant" />
<description>
Returns a new instance of the script.
For example:

View File

@@ -10,20 +10,16 @@
</tutorials>
<methods>
<method name="is_valid" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="extended_check" type="bool" default="false">
</argument>
<return type="bool" />
<argument index="0" name="extended_check" type="bool" default="false" />
<description>
Check whether the function call may be resumed. This is not the case if the function state was already resumed.
If [code]extended_check[/code] is enabled, it also checks if the associated script and object still exist. The extended check is done in debug mode as part of [method GDScriptFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point.
</description>
</method>
<method name="resume">
<return type="Variant">
</return>
<argument index="0" name="arg" type="Variant" default="null">
</argument>
<return type="Variant" />
<argument index="0" name="arg" type="Variant" default="null" />
<description>
Resume execution of the yielded function call.
If handed an argument, return the argument from the [method @GDScript.yield] call in the yielded function call. You can pass e.g. an [Array] to hand multiple arguments.
@@ -33,8 +29,7 @@
</methods>
<signals>
<signal name="completed">
<argument index="0" name="result" type="Variant">
</argument>
<argument index="0" name="result" type="Variant" />
<description>
</description>
</signal>