Commit graph

3050 commits

Author SHA1 Message Date
Rémi Verschelde 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
Rémi Verschelde 986c8af29d
Merge pull request #81629 from rune-scape/more-gdscript-deps
GDScript: Include lambda dependencies
2024-02-12 13:33:22 +01:00
Aiden Storey 7ffc246aad Add fallback argument hints for default values 2024-02-11 10:01:03 -05:00
A Thousand Ships 684752e75b
Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
George Marques 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
George Marques 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
Rémi Verschelde 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
Rémi Verschelde 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
Rémi Verschelde 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
Hugo Locurcio 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
Yuri Rubinsky 1d75480082 Fix autocompletion for enum members in the core classes 2024-02-07 20:42:06 +03:00
Rémi Verschelde 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
Rémi Verschelde 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
Rémi Verschelde 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
Rémi Verschelde 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
Danil Alexeev 2bf25954b4
GDScript: Add is not operator 2024-02-04 17:36:53 +03:00
A Thousand Ships 66d55e62f0
[GDScript] Prevent running String number functions on invalid literal
Prevents printing excessive errors.
2024-02-04 14:35:22 +01:00
A Thousand Ships f4f7e13388
Make GDScriptUtilityCallable return call error when method is invalid 2024-01-31 15:59:37 +01:00
Aaron Franke aed5ea9460
Expose a method to get gravity for any physics body 2024-01-30 23:57:38 -06:00
Rémi Verschelde 926a7dffd6
Merge pull request #87421 from dalexeev/gds-docgen-use-autoload-singleton-name
GDScript: Use autoload singleton name in `GDScriptDocGen`
2024-01-30 17:47:58 +01:00
Rémi Verschelde 9572cf5ab2
Merge pull request #86823 from dalexeev/gds-utility-func-as-callable
GDScript: Allow utility functions to be used as `Callable`
2024-01-30 17:47:50 +01:00
Rémi Verschelde 1f027f9aef
Merge pull request #86471 from dalexeev/gds-fix-pot-gen-skips-some-nodes-2
GDScript: Fix POT generator skips some nodes (part 2)
2024-01-30 17:47:44 +01:00
Rémi Verschelde a8cfd1436a
Merge pull request #86176 from dalexeev/gds-fix-type-highlighting
GDScript: Fix type highlighting
2024-01-30 17:47:33 +01:00
Rémi Verschelde 2edfdace76
Merge pull request #83220 from dalexeev/gds-highlight-code-regions
GDScript: Highlight code region comments
2024-01-30 17:47:23 +01:00
Rémi Verschelde 745f8e112f
Revert "Add UID support to GDScript files"
This reverts commit c7f68a27ec.

We still think GDScript files need UIDs to allow safe refactoring,
but we're still debating what form those should take exactly.

So far there seems to be agreement that it shouldn't be done via an
annotation as implemented here, so we're reverting this one for now,
to revisit the feature in a future PR.
2024-01-29 21:00:26 +01:00
Rémi Verschelde fa48a51183
Merge pull request #87688 from AThousandShips/what_is_this
Remove unnecessary `this->` expressions
2024-01-29 13:18:09 +01:00
Yuri Sizov d644b9b640 Better hide internal properties from users 2024-01-29 12:35:10 +01:00
A Thousand Ships 15369fdb1d
Remove unnecessary this-> expressions 2024-01-29 09:59:18 +01:00
Danil Alexeev faebb0895f
GDScript: Highlight code region comments 2024-01-25 22:03:48 +03:00
Yuri Sizov 9579dc6313 Merge pull request #85239 from HolonProduction/global-class-property-location
Handle global classes when resolving property location
2024-01-25 16:26:50 +01:00
HolonProduction c99e4f862f Handle global classes when resolving property location 2024-01-24 18:05:47 +01:00
Yuri Sizov 72756133e0 Merge pull request #85224 from HolonProduction/identifier-type-prefer-annotated
Prefer identifiers annotated type if assigned type is incompatible to it
2024-01-24 14:07:52 +01:00
Danil Alexeev 5e7cda3405
GDScript: Use autoload singleton name in GDScriptDocGen 2024-01-21 11:28:23 +03:00
Rémi Verschelde 0bcc0e92b3
Merge pull request #86730 from reduz/64-bit-cowdata
Promote CowData to 64 bits
2024-01-19 18:46:11 +01:00
Juan Linietsky 24fe0715b5 Promote CowData to 64 bits
Fixes a lot of bugs, please help me fill the list.
2024-01-19 17:41:10 +01:00
Rémi Verschelde baf87e2717
Merge pull request #87294 from vnen/allow-free-callable
Allow `free()` to be used as Callable
2024-01-18 16:35:14 +01:00
Rémi Verschelde 33f3511241
Merge pull request #87293 from YuriSizov/editor-theme-a-rehashed-follow-up
Improve editor theme generation after the refactor
2024-01-18 16:34:50 +01:00
Rémi Verschelde d3003c48b3
Merge pull request #67132 from KoBeWi/This_commit_message_is_auto-generated._Do_not_modify_it-
Add UID support to GDScript files
2024-01-18 16:33:14 +01:00
George Marques b4e08eb752
Allow free() to be used as Callable
This method is registered in a special way so ClassDB doesn't naturally
know about its existence. Here it is hardcoded if any other option fail
to check if it is about the `free()` method and, if so, say it exists
and return a Callable.
2024-01-18 09:33:44 -03:00
Rémi Verschelde b5dcb5f58a
Merge pull request #85215 from HolonProduction/type-from-property-class-name
Handle global classes when resolving type from `PropertyInfo`
2024-01-18 09:33:22 +01:00
HolonProduction 0203b3c310 Prefer identifiers annotated type if assigned type is incompatible to it 2024-01-17 22:32:00 +01:00
kobewi c7f68a27ec Add UID support to GDScript files 2024-01-17 22:30:56 +01:00
HolonProduction 4ab985d138 Handle global classes when resolving type from PropertyInfo 2024-01-17 21:39:51 +01:00
Yuri Sizov b6a2c78033 Merge pull request #87286 from akien-mga/fix-preprocessor-if-ENABLED-checks
Fix `#if *_ENABLED` inconsistencies, should check if defined
2024-01-17 18:53:33 +01:00
Yuri Sizov dc729f1614 Merge pull request #87278 from HolonProduction/give-those-autoloads-an-upgrade
Handle GDScript in `_type_from_variant` for autocompletion
2024-01-17 18:53:25 +01:00
Yuri Sizov 2dd7808757 Merge pull request #86961 from HolonProduction/completion-tests-fixup
Allow specifying a scene in completion tests
2024-01-17 18:53:03 +01:00
Yuri Sizov c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
Yuri Sizov 5b22884b4a Merge pull request #86554 from HolonProduction/lookup-subscript
Fix symbol lookup in index subscript
2024-01-17 18:52:49 +01:00
Yuri Sizov 28cf7fe2f6 Merge pull request #85384 from HolonProduction/unique-name-completion
Suggest scene unique nodes in `get_node` autocompletion
2024-01-17 18:52:31 +01:00
Yuri Sizov 45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +01:00