Commit Graph

322 Commits

Author SHA1 Message Date
Haoyu Qiu a751c05b15 Fix script editor wrongly replaces and quotes non-ASCII letters 2024-09-23 00:05:16 +08:00
Rémi Verschelde 6bf8a3e3f8
Merge pull request #95449 from SlashScreen/array_functions
Add callable support for `find` and `rfind` `Array` methods
2024-09-20 16:06:13 +02:00
Rémi Verschelde f7daa0fb2f
Merge pull request #96856 from RandomShaper/selfdestruct_correctness
Object: Let debug lock handle callee destruction within call chain gracefully
2024-09-16 13:35:06 +02:00
Pedro J. Estébanez bb77520599 Object: Add tests about the safety of tail destruction 2024-09-16 09:58:47 +02:00
Slashscreen 89491f4403 Add callable support for `find` and `rfind` `Array` methods 2024-09-13 00:01:53 -07:00
Rémi Verschelde d1caac5e75
Merge pull request #93856 from timothyqiu/expression-period
Fix parsing of `4.` in Expression
2024-09-11 12:34:39 +02:00
Thaddeus Crews 9853a69144
Implement typed dictionaries 2024-09-04 10:27:26 -05:00
Rémi Verschelde 13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
A Thousand Ships 194bdde947
Cleanup of raw `nullptr` checks with `Ref`
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
Rémi Verschelde ce069e4567
Merge pull request #96291 from miv391/string-unit-tests
Add more unit tests for String `insert` and `join`.
2024-08-30 09:59:47 +02:00
Rémi Verschelde 4c6bac15a3
Merge pull request #92656 from fire/vsk-json-to-native-4.3
Ability to convert native engine types to JSON and back.
2024-08-30 09:58:57 +02:00
rune-scape 154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
K. S. Ernest (iFire) Lee 71bdbcdfb1 Ability to convert native engine types to JSON and back.
Implements support for all engine types in JSON encoding/decoding

Co-Authored-By: Juan <reduzio@gmail.com>
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
2024-08-29 10:57:15 -07:00
demolke c409e6d722 Import/export GLTF extras to node->meta
This is useful for custom tagging of objects with properties (for example in Blender) and having this available in the editor for scripting.

- Adds import logic to propagate the parsed GLTF extras all the way to the resulting Node->meta
- Adds export logic to save Godot Object meta into GLTF extras
- Supports `nodes`, `meshes` and `materials` (in GLTF sense of the words)
2024-08-29 19:17:04 +02:00
Mika Viskari 3153e9afda Added more unit tests for String insert and join. 2024-08-29 20:05:44 +03:00
Haoyu Qiu 8bf4ecc026 Add `String.is_valid_unicode_identifier()`
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
Rémi Verschelde 80935234f4
Merge pull request #93134 from AThousandShips/default_bind_check
[Tests] Ensure all default method arguments can be encoded
2024-08-26 23:28:29 +02:00
Aaron Franke 7db24a9ad5
Simplify and fix Rect2/AABB get_support function 2024-08-19 23:55:31 -07:00
Rémi Verschelde 49e5fbfbd2
Merge pull request #95184 from jsjtxietian/shader-include-relative
Fix `String::simplify_path` handling of relative paths to parent dir (`../`), fixes relative shader includes
2024-08-17 00:46:11 +02:00
A Thousand Ships 61998b1a05
[Tests] Ensure all default method arguments can be encoded
Checks that all arguments of bound methods can be encoded in extensions, checking non-empty or non-null cases for containers and objects
2024-08-16 19:57:03 +02:00
Rémi Verschelde 803dfcc3cb
Merge pull request #95613 from timothyqiu/split-empty
Fix `split_floats` behavior when spaces are used as separators
2024-08-16 14:36:40 +02:00
Haoyu Qiu f483c3aafa Fix split_floats behavior when spaces are used as separators 2024-08-16 17:30:44 +08:00
Haoyu Qiu 7343dc3a5d Split TranslationServer into its own file 2024-08-15 15:00:47 +08:00
Aaron Franke 5ced75aeb1
Fix Vector4, Vector4i, and Projection missing from ClassDB tests 2024-08-14 02:59:59 -07:00
jsjtxietian 6cf9af2817 Fix error when use relative #include in .gdshader / .gdshaderinc file 2024-08-08 11:59:14 +08:00
Hugo Locurcio 0445ccf428
Fix Image CowData crash when baking large lightmaps
This switches to 64-bit integers in select locations of the Image
class, so that image resolutions of 16384×16384 (used by
lightmap texture arrays) can be used properly. Values that are larger
should also work.

VRAM compression is also supported, although most VRAM-compressed
formats are limited to individual slices of 16384×16384. WebP
is limited to 16383×16383 due to format limitations.
2024-07-19 16:04:30 +02:00
A Thousand Ships 832695eb2c
[Tests] Fix various unit tests on minimal builds 2024-07-18 15:17:28 +02:00
A Thousand Ships ea2e6be0a6
[Tests] Fix some invalid error messages
These used `utf8().get_data()` when they should be passed as `String`
2024-07-10 15:57:52 +02:00
Haoyu Qiu ee9cea521d Fix parsing of `4.` in Expression 2024-07-02 20:53:52 +08:00
A Thousand Ships 17929a3443
[Tests] Fix unit tests in template builds 2024-06-29 18:35:50 +02:00
Rémi Verschelde 3d8562d775
Merge pull request #89197 from AThousandShips/arr_typed_fix
[Core] Fix sharing of typed arrays from constructor
2024-06-26 18:15:09 +02:00
kobewi 5514b2c70c Use subfolder for temporary test files 2024-06-05 20:31:42 +02:00
Rémi Verschelde 972181d701
Merge pull request #90506 from Calinou/test-transform2d-add-more-tests
Add more unit tests for Transform2D
2024-05-29 22:13:35 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
lawnjelly b35264ad95 Fix AABB Ray intersection - return inside
* Separates find_intersects from test_intersects for rays, and wraps the former.
* Changes parameter name to "r_intersection_point".
* Fixes broken old version which returned per axis t.
* Returns whether the ray origin is within the AABB.
* Returns intersection point when origin outside.
* Returns "backtracking" intersection point when inside.
* Returns sensible normal when inside.
* Returns valid results on borders.
* Returns robust results dealing with floating point error.

Co-authored-by: Claire Blackshaw <evilkimau@gmail.com>
2024-05-09 20:41:19 +01:00
Rémi Verschelde a9a1d0a162
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
2024-05-08 14:35:44 +02:00
A Thousand Ships b4c6cc7d82
[Core] Add case-insensitive `String::containsn` 2024-05-08 12:48:01 +02:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
Rémi Verschelde 4c30718102
Merge pull request #91615 from Frozenfire92/remap-doc-nan-note
Add docs note about remap returning undefined when istart == istop
2024-05-08 09:54:20 +02:00
Joel Kuntz 26feefa91c Add notes for remap's return when istart and istop are the same
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
Co-Authored-By: kleonc <9283098+kleonc@users.noreply.github.com>
2024-05-07 19:37:29 -03:00
Wilson E. Alvarez d4154dbc55
Add const char * overloads to String class
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-05-07 10:53:00 -04:00
A Thousand Ships 09460d33e6
[Core] Fix sharing of typed arrays from constructor 2024-05-07 09:52:17 +02:00
Rémi Verschelde e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
A Thousand Ships 86de59d60a
[Core] Add `LocalVector::has` for convenience 2024-05-06 18:03:37 +02:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
killzebug 53a95d6a00 Suppressed expected errors for uncached resources. 2024-04-22 23:50:20 +03:00
Ricardo Buring 8a28f816d0 Replace Clipper1 library by Clipper2 library 2024-04-20 13:37:59 +02:00