Commit Graph

3184 Commits

Author SHA1 Message Date
7b3e1a5bde Optimize SceneTree's change_scene_to_file autocompletion 2024-03-01 15:12:52 +01:00
a2e7c64dc4 Cleanup 2024-03-01 13:06:37 +01:00
1f42455e0a Debugging additions 2024-03-01 11:38:49 +01:00
fc7d7d3dae Add test for get_node autocompletion 2024-03-01 11:24:06 +01:00
0908ad4005 GDScript: Fix paths in ResourceFormatLoaderGDScript::load() 2024-02-29 16:04:31 +03:00
9278856ff7 Merge pull request #88948 from dalexeev/core-add-callable-create
Core: Add `Callable.create` static method for `Variant` callables
2024-02-29 13:54:22 +01:00
172b254687 Merge pull request #88664 from RandomShaper/res_load_modes
Enhance cache modes in resource loading
2024-02-29 13:54:07 +01:00
d90c9db27f Core: Add Callable.create static method for Variant callables 2024-02-29 10:45:00 +03:00
21ee3716c2 Merge pull request #82122 from dalexeev/gds-add-export-hidden-annotation
GDScript: Add `@export_storage` annotation
2024-02-27 21:22:49 +01:00
a10241bfe4 GDScript: Fix type highlighting after whitespace 2024-02-26 20:49:05 +03:00
5e144022e7 Enhance cache modes in resource loading
- Unify documentation, hoping to clear misconcepctions about about propagation of the cache mode across dependant loads.
- Clarify in docs that `CACHE_MODE_REPLACE` now also works on the main resource (from #87008).
- Add two recursive modes, counterparts of `CACHE_MODE_REPLACE` and `CACHE_MODE_IGNORE`, since it seems some need them (see #59669, #82830).
- Let resources, even loaded with one of the ignore-cache modes, get a path, which is useful for tools.
2024-02-26 14:59:04 +01:00
8ffc50ee8c GDScript: Canonicalize script path in FQCN 2024-02-26 10:46:24 +03:00
83b32f990e Merge pull request #88733 from ryevdokimov/Remove-word-duplicates
Remove word duplicates in comments and strings, and fix casing and punctuation
2024-02-25 11:50:09 +01:00
ee5ace10b7 Merge pull request #85501 from /remove-packed-scene-cache 2024-02-25 11:49:27 +01:00
13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 -05:00
77666286b7 Merge pull request #88020 from emre0altan/match-null-crashes-GDScript-compiler
GDScript: Set `has_type` false if it is `BUILTIN` but `Variant::NIL`
2024-02-23 22:18:55 +01:00
8a9c9ef94f Merge pull request #88452 from AThousandShips/template_test
Fix running tests in template builds
2024-02-22 23:34:30 +01:00
d7a72d72e6 Fix running tests in template builds 2024-02-22 18:05:42 +01:00
f781571d07 Add keywords to improve search in the class reference 2024-02-22 16:16:49 +01:00
6037500219 Merge pull request #69032 from KoBeWi/check_every_changed_setting_in_every_group_everywhere()
Use `check_changed_settings_in_group()` everywhere
2024-02-20 19:34:30 +01:00
b652a81da7 Merge pull request #82554 from dsnopek/gdextension-placeholders
Allow registering "runtime classes" from GDExtension
2024-02-20 17:13:24 +01:00
ea75307a11 Allow registering "runtime classes" 2024-02-20 09:20:58 -06:00
a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
6ae54fd787 Move EditorNode setting registration so they are in class reference
Co-authored-by: Micky <micheledevita2@gmail.com>
2024-02-17 11:33:22 +01:00
6f805dee2a Merge pull request #88365 from dalexeev/gds-fix-gdc-export
GDScript: Fix extension comparison for exported scripts
2024-02-15 17:35:58 +01:00
a2e3e31e80 GDScript: Fix extension comparison for exported scripts 2024-02-15 17:53:24 +03:00
ef5d6ccfb7 Merge pull request #86966 from Muller-Castro/value2ref-core
Add const lvalue ref to `core/*` container parameters
2024-02-15 15:44:43 +01:00
af28f87791 Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
c8b3e39161 Merge pull request #88211 from bitwise-aiden/ba-default-arg-hints
Add fallback argument hints for default values
2024-02-12 13:35:07 +01:00
986c8af29d Merge pull request #81629 from rune-scape/more-gdscript-deps
GDScript: Include lambda dependencies
2024-02-12 13:33:22 +01:00
7ffc246aad Add fallback argument hints for default values 2024-02-11 10:01:03 -05:00
081fa324fd set has_type false if it is BUILTIN but Variant::NIL 2024-02-11 13:47:12 +00:00
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
72e5f8c31e GDScript: Enable compression on export
Besides the regular option to export GDScript as binary tokens, this
also includes a compression option on top of it. The binary format
needs to encode some information which generally makes it bigger than
the source text. This option reduces that difference by using Zstandard
compression on the buffer.
2024-02-08 11:20:07 -03:00
b4d0a09f15 GDScript: Reintroduce binary tokenization on export
This adds back a function available in 3.x: exporting the GDScript
files in a binary form by converting the tokens recognized by the
tokenizer into a data format.

It is enabled by default on export but can be manually disabled. The
format helps with loading times since, the tokens are easily
reconstructed, and with hiding the source code, since recovering it
would require a specialized tool. Code comments are not stored in this
format.

The `--test` command can also include a `--use-binary-tokens` flag
which will run the GDScript tests with the binary format instead of the
regular source code by converting them in-memory before the test runs.
2024-02-08 11:20:05 -03:00
41564aaf77 Merge pull request #86999 from AThousandShips/init_note
Improve error message when a GDScript instance fails to be constructed
2024-02-08 13:49:44 +01:00
9a793d95eb Merge pull request #87124 from rsubtil/bugfix-warn_as_err
Simplify script paths to ensure proper resource path checks
2024-02-08 13:45:57 +01:00
50491db048 Merge pull request #88071 from Calinou/gdscript-nodepath-autocomplete-fix-identifiers
Fix NodePath autocompletion to ensure paths are quoted when required
2024-02-08 10:54:12 +01:00
1238b60b22 Fix NodePath autocompletion to ensure paths are quoted when required
Every component of the path is now checked to be a valid identifier,
so that node names that start with a digit always require the full
path to be quoted.
2024-02-07 19:26:55 +01:00
1d75480082 Fix autocompletion for enum members in the core classes 2024-02-07 20:42:06 +03:00
7223c5b54a Fix various typos with codespell
Using 2.2.7.dev115+g0eb441d6.

Had to add `cancelled` to the ignore list, as it's a Wayland signal which
we're handling in our code, so we don't want codespell to fix that "typo".

Also includes the typo fix from #87927.

Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
2024-02-07 11:09:34 +01:00
888299d6f7 Merge pull request #87939 from dalexeev/gds-add-is-not-operator
GDScript: Add `is not` operator
2024-02-07 11:01:19 +01:00
9cfd6dbab2 Merge pull request #87783 from AThousandShips/utility_err
Make `GDScriptUtilityCallable` return call error when method is invalid
2024-02-07 10:59:17 +01:00
6df1a1e9b0 Autocompletion: mark datatype as constant for constant arrays 2024-02-05 20:26:43 +01:00
2f9ea3a505 Merge pull request #87941 from AThousandShips/num_fix
[GDScript] Prevent running `String` number functions on invalid literal
2024-02-05 14:53:23 +01:00
2bf25954b4 GDScript: Add is not operator 2024-02-04 17:36:53 +03:00
66d55e62f0 [GDScript] Prevent running String number functions on invalid literal
Prevents printing excessive errors.
2024-02-04 14:35:22 +01:00
f4f7e13388 Make GDScriptUtilityCallable return call error when method is invalid 2024-01-31 15:59:37 +01:00
aed5ea9460 Expose a method to get gravity for any physics body 2024-01-30 23:57:38 -06:00