Age | Commit message (Collapse) | Author |
|
Explain that Array.duplicate will not deep-copy Object.
|
|
Erasing array elements while iterating does not appear to be safe.
For example, the following prints nothing:
```
var a := [0,1,2,3,4,5,6]
for i in a:
if i % 2 == 0:
a.erase(i)
else:
print(i)
```
While this is often true for array implementations, it still seems worth
documenting explicitly. I copied the wording from Dictionary.xml.
|
|
This was somewhat implied by specifically calling out nested arrays and
dictionaries, but I was still unsure and had to test it myself.
One might expect that `Resource` objects, which have a `duplicate`
method, might be deep-copied.
|
|
|
|
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
|
|
|
|
Add ability to pick random value from array
|
|
|
|
Fill random docs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These can be used as faster, more convenient shorthands to
using `filter()` + `size()`.
|
|
|
|
The docs specify that Array.remove does nothing if the index does not
exist. Array.erase does not have a similar phrase, so it's unclear if
erase will print an error, or silently do nothing.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
The documentation for the sort method warns the user that it doesn't do natural sort but fails to provide a solution when it's just a one liner thanks to String.naturalnocasecmp_to() and lambda support
This suggests exactly the same algorithm as used by the filesystem dock for file sorting.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
|
|
The same is done for `Vector` (and thus `Packed*Array`).
`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.
`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.
This makes `slice` works similarly to numpy's and JavaScript's.
|
|
|
|
|
|
|
|
|
|
And fix up formatting not supported by makerst.
|
|
|
|
|
|
|
|
|
|
|
|
Negative indices are supported to pop an element relative from the end.
|
|
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.
|
|
This pull request fixes an assortment of typos and improves conciseness in `Animation`, `Area2D`, `Array`, `ArrayMesh`, `Control`, `Directory`, `EditorPlugin`, `Engine`, and `OS`.
|
|
|
|
Includes:
* Variant
* Viewport
and two fixes in Array that were pointed out in #40978
VisualScript classes are skipped on purpose.
That is the final commit of the inital code porting to C#. :)
|
|
|
|
Using codespell 2.0.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
|
|
|
|
|
|
|
|
|
|
Does the same internally for List and Vector<>, which includes all
PackedArray types.
|
|
And move GLTF docs to its module folder.
|