Dan Nicholson
2dd409fd70
Improve locale comparison
...
Since 9456454109
, country specific locales are always preferred over
country-less locales even when the OS locale country doesn't match. For
example, running the Godot editor with locale es_ES will result in the
es_AR locale being chosen even though the es locale would be better.
The change happened because the score of the es_AR locale and the es
locale are the same when comparing to es_ES. Change this by parsing
locale strings into a Locale structure and decreasing the score when
script, country or variant are set in both but not matched. For the
es_ES case, this causes the es_AR score to be decreased since the
countries don't match. On the other hand, the es locale is not decreased
since it doesn't specify a country.
2024-11-12 06:06:50 -07:00
Thaddeus Crews
363c0b5fec
Merge pull request #47502 from KoBeWi/add_0
...
Always add decimal when converting float to string
2024-10-31 20:14:39 -05:00
Thaddeus Crews
b7a0971ad2
Merge pull request #97934 from adamscott/give-AThousandShips-a-break
...
[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
2024-10-29 19:25:36 -05:00
Thaddeus Crews
6e9907d483
Merge pull request #92554 from Nazarwadim/implement_a_hash_map
...
Implement array based hash map `AHashMap`
2024-10-25 13:03:45 -05:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon
rule to true
...
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Clay John
33db590947
Merge pull request #98357 from yeojunh/valid-base-check-num-int64-uint64
...
Core: Fix String::num_int64(), uint64 for valid base check
2024-10-24 19:41:43 -07:00
nazarii
76208f7155
Implement array based hash map
2024-10-24 21:34:12 +03:00
kobewi
5c0f2414cd
Always add decimal when printing float
2024-10-23 15:00:21 +02:00
yeojunh
b3b24ded19
Add checks for valid base in String::num_int64, uint64().
...
- Ensure String::num_int64, uint64 returns an empty string for bases less than 2 or greater than 36.
- Added corresponding test cases to verify the behavior.
- Error messages are printed when invalid bases are encountered. These messages are suppressed in the test output.
2024-10-20 00:22:08 -07:00
A Thousand Ships
610635e1c8
Add test
2024-10-18 08:47:29 +02:00
Pablo Andres Fuente
0b258e69f3
Add unit tests for String::parse_url()
2024-10-01 17:09:22 -03:00
Rémi Verschelde
a7d0464e9e
Merge pull request #95931 from pafuent/adding_packet_peer_tests
...
Add unit tests for `PacketPeer`
2024-10-01 17:30:36 +02:00
Rémi Verschelde
d71d95448c
Merge pull request #95784 from pafuent/adding_stream_peer_buffer_tests
...
Add unit tests for `StreamPeer` and `StreamPeerBuffer`
2024-10-01 17:30:33 +02:00
Pablo Andres Fuente
ff10dee946
Add unit tests for StreamPeer and StreamPeerBuffer
...
Partially fixes #43440
2024-10-01 12:25:11 -03:00
Pablo Andres Fuente
0a41a715da
Add unit tests for PacketPeer
...
Partially fixes #43440
2024-10-01 12:19:41 -03:00
Haoyu Qiu
6516ca6b11
Parse fragment from URL
2024-09-27 19:42:30 +08:00
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