This is a backport from 4.0 to 3.x that adds 'sort' and 'has' methods
to the following types:
- PoolByteArray
- PoolIntArray
- PoolRealArray
- PoolStringArray
- PoolVector2Array
- PoolVector3Array
- PoolColorArray
For all the types above, the methods 'sort' and 'has' have been
exposed to the GDNative API (v. 1.3)
Since the method 'has' was already implemented in GDScript before,
in this commit it has been only exposed to GDNative API.
The classes documentation is updated.
The method 'sort' uses the exisging class "Sorter".
Pooled arrays in 4.0 are rewritten, that's why this backport is not
completely indentical to the original PR made for 4.0 (see #32144).
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
Notably:
* `Pool*Array.size()` and `Array.size()`.
* Shared methods of `Transform2D` and `Transform`.
* Shared methods of `Vector2` and `Vector3`.
This reduces the Deja Vu when translating the class reference :)
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)
We already removed it from the online docs with #35132.
Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.
We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
In many of the XML files it had been noted that when the documentation
refers to a return value, both "Return" and "Returns" are used. This
has now been fixed to only say "Returns".
Fixes#28867