1
0
Fork 0
Commit Graph

3656 Commits

Author SHA1 Message Date
Lukas Tenbrink fa0a3c9c6e Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`. 2025-03-31 20:49:50 +02:00
Danil Alexeev 7721e13a92
GDScript: Add constant `Array` and `Dictionary` constructors 2025-03-31 21:31:34 +03:00
Kiro 23129a66ed Replace append_utfx with direct String::utfx 2025-03-30 19:56:38 +02:00
Thaddeus Crews 780cf03051
Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse
Use `append_` instead of `parse_` for `String` methods.
2025-03-29 10:16:33 -05:00
Rémi Verschelde 3b90bb56ad
Merge pull request #89782 from KoBeWi/stdArrayList
Use initializer list in Arrays
2025-03-28 17:29:40 +01:00
Yyf2333 22b5ec17fb Using iterator pattern instead of List::Element *.
Co-authored-by: Adam Scott <ascott.ca@gmail.com>
2025-03-28 13:29:15 +08:00
Lukas Tenbrink ffa6ef220b Use `append_` instead of `parse_` for `String` methods. 2025-03-27 17:51:02 +01:00
kobewi 75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
Thaddeus Crews c687e4f692
Merge pull request #104509 from HolonProduction/completion-super-method
GDScript: Return early when parsing invalid super call
2025-03-24 15:27:26 -05:00
HolonProduction b67dcb21fd GDScript: Return early when parsing invalid super call 2025-03-24 17:40:26 +01:00
Thaddeus Crews 1cb3cfaa8e
Style: Convert namespaces to PascalCase 2025-03-23 19:10:24 -05:00
Thaddeus Crews f09ee0171a
Style: Begin integrating simple `.clangd` fixes 2025-03-22 13:24:35 -05:00
Rémi Verschelde d3676e9352
Merge pull request #99872 from HolonProduction/plugin-template
Add `_enable`/`_disable_plugin` to plugin script template
2025-03-21 13:03:03 +01:00
Rémi Verschelde 2fa721b1bc
Merge pull request #104127 from Ivorforce/360-noclip
Remove `String` clipping constructors.
2025-03-19 12:27:10 +01:00
Mikael Hermansson db5e843e46 Add clearing of `static_gdscript_cache` to `GDScriptCache` 2025-03-17 18:19:23 +01:00
Lukas Tenbrink a23f630781 Remove `String` clipping constructors.
Callers should instead call constructors with explicit encoding names, with known length `Span`.
2025-03-15 12:34:44 +01:00
Thaddeus Crews b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Thaddeus Crews e68ac1c89d
Merge pull request #104114 from HolonProduction/lsp-spec-selection-range-round-3
GDScript: Fix head class range to include `class_name`
2025-03-14 10:06:11 -05:00
HolonProduction d6da30e9c7 GDScript: Fix head class range to include `class_name` 2025-03-14 11:36:55 +01:00
Michael Alexsander ce8d2e4917
Implement class detection in GDScript for build configuration 2025-03-13 21:24:56 -03:00
David Snopek 393465ce92 Register editor classes normally, rather than via `ClassDB::set_current_api()` 2025-03-13 15:17:45 -05:00
Thaddeus Crews e97bb76142
Merge pull request #100314 from Ivorforce/use-string-chr
Optimize `String::chr` to avoid calling `strlen`. Use `String::chr` instead of `String(&chr, 1)` where appropriate.
2025-03-13 08:57:20 -05:00
Thaddeus Crews 0a30831bed
Merge pull request #100023 from Repiteo/core/module-includes-header-strip
Core: Avoid including `modules/modules_enabled.gen.h` in headers
2025-03-11 19:54:48 -05:00
Thaddeus Crews 754e3b3f9a
Merge pull request #103825 from JulianHeuser/region_highlight_crash_fix
Fix crash related to #region/#endregion caused by trailing spaces
2025-03-11 19:54:46 -05:00
Thaddeus Crews 6c4f17db1a
Core: Avoid including `modules_enabled` in headers 2025-03-11 19:42:13 -05:00
Julian 659d1b5d0c Fix crash caused by trailing spaces 2025-03-11 00:06:08 -04:00
A Thousand Ships d9721954e6
[Core] Use `Vector` for `MethodInfo::arguments` 2025-03-10 13:57:53 +01:00
A Thousand Ships 331a43a9d8
Add `String::remove_char(s)` methods for performance and convenience 2025-03-10 13:19:28 +01:00
A Thousand Ships 466590d0ec
Use `get_slicec` instead of `get_slice` for single character splitters 2025-03-08 20:36:37 +01:00
Thaddeus Crews 324512e11c
Style: Replace header guards with `#pragma once` 2025-03-07 17:33:47 -06:00
Thaddeus Crews 3d9b37911d
Merge pull request #103011 from Repiteo/style/svgo-newline
Style: Ensure svgs have trailing newlines
2025-03-07 15:12:41 -06:00
Thaddeus Crews 3c43508ed7
Merge pull request #102427 from AThousandShips/fix_substr
Clean up some uses of `String::substr`
2025-03-07 15:12:33 -06:00
Thaddeus Crews c937b6d180
Merge pull request #102419 from Ivorforce/std-size
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06:00
Thaddeus Crews 9e7fbdf52b
Merge pull request #103663 from pafuent/fixing_errors_warnings_output_on_tests
Fix `SCRIPT ERROR/ERROR/WARNING` on test output
2025-03-07 15:12:11 -06:00
Thaddeus Crews e0a040c0d3
Merge pull request #101319 from JulianHeuser/region_syntax_highlighting_fix
Improve consistency of code regions
2025-03-07 12:06:34 -06:00
A Thousand Ships 5113022dfe
Clean up some uses of `String::substr`
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
Pablo Andres Fuente 5775d29ad8 Fix `SCRIPT ERROR/ERROR/WARNING` on test output
Also "fixing" some GDScript completion tests which
where named wrongly.
2025-03-06 13:44:48 +01:00
HolonProduction f4172445f3 Add `_enable`/`_disable_plugin` to plugin script template 2025-03-06 11:41:21 +01:00
HolonProduction ca1e444bca GDScript: Do phrase level recovery when parsing faulty dictionaries 2025-03-06 11:35:56 +01:00
HolonProduction 676e4c9013 GDScript: Cancel suspended functions when reloading a script 2025-03-06 11:34:40 +01:00
A Thousand Ships fec3d9e68c
[Editor] Fix return of `EditorTranslationParserPlugin._parse_file`
Merged `_get_comments` into `_parse_file` and changed to using a
returned `Array[PackedStringArray]` instead.
2025-02-19 20:11:24 +01:00
Thaddeus Crews 7e5baa0426
Style: Enforce trailing newlines on svgs 2025-02-18 11:02:45 -06:00
Lukas Tenbrink 279505d8b0 Optimize `GDScriptLambdaCallable` by skipping the unnecessary `ObjectDB` lookup for `script`. 2025-02-16 20:52:09 +01:00
kobewi 012d47b089 Allow exporting variables of type Variant 2025-02-15 18:00:55 +01:00
HolonProduction c00518eec7 Autocompletion: Override context for preload 2025-02-13 22:56:06 +01:00
Rémi Verschelde 83b3c1e11e Merge pull request #102389 from Meorge/bugfix/unique-name-error
Display correct symbol in warning when unique name is used without @onready annotation
2025-02-11 23:59:01 +01:00
HolonProduction 62eebf1266 Autocompletion: Account for invalid annotations when making arghint 2025-02-11 09:17:22 +01:00
Lukas Tenbrink e34f1f504c Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase. 2025-02-07 14:57:48 +01:00
Pāvels Nadtočajevs 7da0767f35 [TextEdit] Update syntax highlighting when IME composition string is updated. 2025-02-07 11:54:56 +02:00
Malcolm Anderson 8e8f93cf0c Display correct symbol in warning when unique name is used without @onready annotation
Add tests for `GET_NODE_DEFAULT_WITHOUT_ONREADY` warning with unique nodes

Small modifications to tests
2025-02-06 10:49:08 -08:00
HolonProduction d616ea5462 Fix enum value lookup jump 2025-02-06 10:04:01 +01:00
Pāvels Nadtočajevs b50d9742c2 Fix `is_valid_float`, `Variant` parser, `Expression` parser, script highlighter, and `TextServer` not handing capital E in scientific notation. 2025-02-05 18:39:40 +02:00
bruvzg 3be46a69c4 Fix uppercase B and X parsing in the integer literals. 2025-02-05 16:02:06 +02:00
Rémi Verschelde daa074881b Revert "Fixed resource loader using not fully loaded scripts"
This reverts commit fd5fc9f3ee.

This caused significant regressions which are worse than the bug that #96499
aimed to address.

- Reverts #96499.
- Reopens #95909.
- Supersedes #102063.
- Fixes #99006.
- Fixes #101615.
2025-02-04 19:51:54 +01:00
Thaddeus Crews 0b6a717ac1
Merge pull request #101127 from dalexeev/gds-edit-fix-enum-value-ctrl-click
Editor: Fix `Ctrl+Click` on enum values ​​does nothing
2025-02-04 09:04:17 -06:00
Pedro J. Estébanez 318af42020 Include more attributes in the global class names cache 2025-01-29 09:39:50 +01:00
Thaddeus Crews 9630d4e2fc
Merge pull request #101632 from bruvzg/gds_tween_property_crash
Fix GDScript editor crash on invalid `tween_property` arguments.
2025-01-17 10:16:55 -06:00
Thaddeus Crews 73278bf35d
SCons: Properly `NoCache` all text files 2025-01-16 16:59:12 -06:00
Pāvels Nadtočajevs 576892863c Fix GDScript editor crash on invalid `tween_property` arguments. 2025-01-16 10:40:13 +02:00
Xavier Sellier b85096463e
Fix crash when using a modulo operator between a float and an integer 2025-01-14 15:07:19 +01:00
Rémi Verschelde 957097738f Merge pull request #101235 from Repiteo/style/editorconfig
Style: Unify `.editorconfig` logic
2025-01-12 18:07:16 +01:00
Rémi Verschelde 632c77e10b Merge pull request #84264 from HolonProduction/autocompletion-78003
Try to guess method return type even if subscript base has no value
2025-01-12 18:06:52 +01:00
Thaddeus Crews 9d0c41a489
Style: Unify `.editorconfig` logic 2025-01-12 08:49:01 -06:00
HolonProduction 24912d2010 Autocompletion: Try to guess method return type even if subscript base has no value 2025-01-11 23:50:43 +01:00
kobewi c29e9e9b29 Ensure path for shallow scripts 2025-01-11 21:20:31 +01:00
Lukas Tenbrink 2aeca3e885 Optimize `String::chr` to avoid calling `strlen`. Use `String::chr` instead of `String(&chr, 1)` where appropriate. 2025-01-10 18:06:46 +01:00
Julian ba3f4a4b24 Code region keywords must be followed by whitespace 2025-01-09 14:11:07 -05:00
Danil Alexeev cd918ff470
GDScript: Remove `RENAMED_IN_GODOT_4_HINT` from `GDScriptWarning::Code` enum 2025-01-09 21:07:41 +03:00
Aarni Koskela f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
Yufeng Ying 34d8255947 Force build editor with regex module, remove checking code.
Fix include.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-07 19:43:23 +08:00
Rémi Verschelde 30b20bc251
Merge pull request #99121 from dalexeev/gds-deprecate-inst-to-dict
GDScript: Deprecate `inst_to_dict()` and `dict_to_inst()` functions
2025-01-06 22:46:52 +01:00
Danil Alexeev 4cef91e0f5
Editor: Fix `Ctrl+Click` on enum values ​​does nothing 2025-01-04 17:28:53 +03:00
Danil Alexeev 07f8935c69
GDScript: Deprecate `inst_to_dict()` and `dict_to_inst()` functions 2025-01-03 21:17:06 +03:00
Ricardo Subtil b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00:00
Rémi Verschelde 5ff616736a
Merge pull request #100825 from KoBeWi/colored_eight
Add `Color.from_rgba8` and deprecate Color8
2025-01-03 00:49:18 +01:00
kobewi 4e48b19e1f Add Color.from_rgba8 and deprecate Color8 2024-12-27 11:26:59 +01:00
A Thousand Ships a1846b27ea
Improve use of `Ref.is_null/valid`
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Thaddeus Crews 0f95e9f8e6
Merge pull request #100575 from Wierdox/improve_syntax_highlighting_for_shorthand_of_and_plus_bitwise_and_by_altering_string_name_highlighting
Improve `&&` and `&` syntax highlighting by altering `StringName` highlighting
2024-12-23 11:15:21 -06:00
Yufeng Ying 33817b186f Remove unused header in drivers and modules.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2024-12-24 00:40:47 +08:00
Wierdox ed81a17e1e Improve '&&' and '&' syntax highlighting by altering StringName highlighting 2024-12-21 14:02:31 -08:00
Rémi Verschelde 0a37e12a9b
Merge pull request #100610 from YYF233333/style
Remove unused variable in `GDScriptLanguage`
2024-12-20 23:56:58 +01:00
Thaddeus Crews a4f423cc97
Merge pull request #78489 from dalexeev/gds-add-disassembling-implicit-funcs
GDScript: Add disassembling implicit and lambda functions
2024-12-19 19:59:36 -06:00
Yufeng Ying a43f90b89d Remove unused variable in GDScriptLanguage. 2024-12-20 00:48:06 +08:00
Rémi Verschelde 4866c4a8c5
Merge pull request #99925 from Mickeon/documentation-no-static-typing-yet
Remove uses of static typing from the documentation
2024-12-17 16:19:08 +01:00
Danil Alexeev 80d11500b5
Code Editor: Add documentation tooltips 2024-12-15 10:51:33 +03:00
Thaddeus Crews 9c290c4c56
Merge pull request #100033 from Daylily-Zeleen/daylily-zeleen/optimize_callable_to_string
Optimize callable's stringify text.
2024-12-12 16:13:23 -06:00
Thaddeus Crews ab208af781
Merge pull request #100174 from Calinou/gdscript-add-deprecated-experimental-annotations
Tweak unknown annotation GDScript error for `@deprecated`/`@experimental`/`@tutorial`
2024-12-11 17:35:50 -06:00
Thaddeus Crews 8f16f864a6
Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
Core: Fix `JSON.{from,to}_native()` issues
2024-12-10 14:15:53 -06:00
Thaddeus Crews 79dd5179e3
Merge pull request #99887 from JackErb/gdscript-parser-error-fix
Improve misleading `Unexpected "x" in class body.` GDScript parser error
2024-12-10 14:15:50 -06:00
JackErb 13fcb05e7b Improve GDScript "unexpected token in class body" parser error
This parser error was misleading.

Fixes:
1. Now points at correct line
2. For identifiers, prints out `Identifier "%s"`
2024-12-09 21:01:46 -08:00
Hugo Locurcio 6095a37d64
Tweak unknown annotation GDScript error for `@deprecated`/`@experimental`/`@tutorial`
These annotations don't exist at a source level, so the error messages
point to the documentation comment syntax.
2024-12-09 22:18:35 +01:00
Thaddeus Crews a372214a4a
Merge pull request #76020 from dalexeev/gds-warning-ignore-regions
GDScript: Add `@warning_ignore_start` and `@warning_ignore_restore` annotations
2024-12-09 14:33:38 -06:00
Lukas Tenbrink b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
Danil Alexeev 7d65d0a908
GDScript: Add `@warning_ignore_start` and `@warning_ignore_restore` annotations 2024-12-06 15:37:02 +03:00
Daylily-Zeleen 614a51f293 Optimize callable's stringify text. 2024-12-05 14:24:39 +08:00
Thaddeus Crews 1719f8ed3d
Merge pull request #99834 from kiroxas/passLengthToParseUTF8
Ensure `parse_utf8` has length of string passed in when available
2024-12-03 14:41:06 -06:00
Thaddeus Crews cb1b743e59
Merge pull request #99861 from Ryan-000/Fix-language-server-thread-crash
Fix language server causing random crashes when `use_threads` is enabled
2024-12-03 14:40:47 -06:00
Ryan 8dd330dee7 Fix language server thread crash
Co-Authored-By: Adam Scott <ascott.ca@gmail.com>
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-02 10:31:15 -05:00
Micky 109fcbb43a Remove uses of static typing from the documentation 2024-12-02 15:56:46 +01:00
Rémi Verschelde 702f567138
Merge pull request #98533 from dalexeev/adjust-make-rst-for-gds
Adjust `make_rst.py` for GDScript documentation
2024-12-02 15:50:26 +01:00
rune-scape d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Kiro 83d4bde0a2 When calling code has length of string, pass it to parse_utf8 2024-12-01 08:31:22 +01:00
Danil Alexeev ba943e4481
Adjust `make_rst.py` for GDScript documentation 2024-11-30 11:48:14 +03:00
Rémi Verschelde 682c5c7d49
GDScript: Fix failing tests due to collision with #99490 formatting change 2024-11-29 23:10:02 +01:00
Rémi Verschelde 6e72b159ca
Merge pull request #93301 from rune-scape/compiler-messages
GDScript: Add error messages to some compilation errors
2024-11-29 22:45:43 +01:00
Rémi Verschelde 56a7dba10b
Merge pull request #99799 from akien-mga/fix-typos
Fix various typos and code style issues
2024-11-29 22:02:53 +01:00
Rémi Verschelde b3a44a5567
Merge pull request #99490 from dalexeev/gds-tests-track-multiple-errors
GDScript: Support tracking multiple analyzer and runtime errors in tests
2024-11-29 22:02:02 +01:00
rune-scape 9f8fec39f3
GDScript: Add error messages to some compilation errors 2024-11-29 15:37:32 +01:00
Danil Alexeev bd1a35ce9e
Core: Fix `JSON.{from,to}_native()` issues 2024-11-29 12:43:06 +03:00
Rémi Verschelde 88e81ee730
Fix various typos and code style issues 2024-11-28 17:40:42 +01:00
Thaddeus Crews 6eca2aa8d6
Merge pull request #99295 from HolonProduction/yet-another-lsp-violation
LSP: Fix spec violations that break the VSCode outline
2024-11-27 10:47:18 -06:00
Danil Alexeev a73573b093
GDScript: Add disassembling implicit and lambda functions 2024-11-26 17:07:21 +03:00
Rémi Verschelde f2f48aaf36
Fix stringification of Projection 2024-11-25 21:10:32 +01:00
Thaddeus Crews 9b5c7e9efa Merge pull request #99545 from KoBeWi/Vector4.0
Fix stringification of Vector4
2024-11-25 13:22:33 -06:00
Thaddeus Crews ea3154a0d4 Merge pull request #99424 from dalexeev/core-fix-builtin-enum-const-binds
Core: Fix built-in enum constant bindings
2024-11-22 14:54:31 -06:00
kobewi e210313045 Fix stringification of Vector4 2024-11-22 21:44:30 +01:00
Danil Alexeev 03b05cf9ac
Core: Fix built-in enum constant bindings 2024-11-22 14:03:21 +03:00
Lazy-Rabbit-2001 ae853e1a42 Improve GDScript autocompletion for methods 2024-11-22 18:24:45 +08:00
Danil Alexeev f86dcd4e67
GDScript: Support tracking multiple analyzer and runtime errors in tests 2024-11-21 22:09:50 +03:00
Chaosus 0524e29b5c Fix crash when division by zero/modulo by zero happen on vectors 2024-11-21 20:24:43 +03:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +01:00
HolonProduction 2f620db1d8 LSP: Fix spec violations that break the VSCode outline 2024-11-15 20:00:28 +01:00
Thaddeus Crews e9ce3932b3
Merge pull request #98099 from dalexeev/pot-gen-add-comment-support
POT Generator: Add support for `TRANSLATORS:` and `NO_TRANSLATE` comments
2024-11-15 10:42:45 -06:00
HolonProduction a389eb4608 Add back `AnimationPlayer.get_argument_options` 2024-11-15 13:06:59 +01:00
Thaddeus Crews 4d4353179e
Merge pull request #97218 from wenqiangwang/local_debuggger_expr_evalulation
Add support for `print` command in local (command line `-d`) debugger
2024-11-12 12:13:13 -06:00
Thaddeus Crews 2c31bd767c
Merge pull request #99020 from Mickeon/documentation-example-pruning-2
Clean up more `[b]Example:[/b]` lines from the class reference
2024-11-12 09:28:02 -06:00
Danil Alexeev 4d3e2c78b6
Document exporting nested subgroups 2024-11-11 17:24:37 +03:00
Micky 932b1c434c Clean up more `[b]Example:[/b]` lines from the class reference 2024-11-11 12:05:34 +01:00
girdenis-p 413490c270 Fix analyzer pushing SHADOWED_VARIABLE warning for members shadowed in subclasses
This fixes a bug in the analyzer where it did not push the SHADOWED_VARIABLE_BASE_CLASS
warning for members shadowed by variable in subclass. It does this by comparing the class
which contains the shadowed member with the class containing the variable, and pushing
SHADOWED_VARIABLE only if the classes are the same. Additionally, SHADOWED_VARIABLE_BASE_CLASS
can take an extra symbol which helps to specify the line for non native base class.
2024-11-06 15:04:14 +00:00
Thaddeus Crews bb5f390fb9
Style: Apply `clang-tidy` fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06: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 8004c7524f
Merge pull request #98301 from aaronp64/gdscript_validate_property
Avoid unnecessary `Dictionary` conversions in `GDScriptInstance::validate_property`
2024-10-29 19:26:02 -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 2584f75537
Merge pull request #96499 from beev1s/shallow-script-cache-error
Fix resource loader not resolving shallow loaded scripts through dependencies
2024-10-25 13:04:09 -05:00
Thaddeus Crews 7da6d6032b
Merge pull request #96927 from HolonProduction/completion-inner-class-base-crash
Autocompletion: Don't use owner for inner classes
2024-10-25 13:03:53 -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
Danil Alexeev 4dc568856a
GDScript: Rework `GDScriptUtilityFunctions` macros 2024-10-25 17:46:38 +03:00
Clay John b5368d5e40
Merge pull request #98356 from dustdfg/gdscript_endif_readability_comments
Add some comments to `#endif's` where it helps readability
2024-10-24 19:11:42 -07:00
Clay John 38f2144f85
Merge pull request #98400 from rune-scape/fix-typed-dict-cached-parser
GDScript: Fix cached parser error when using typed Dictionaries
2024-10-24 18:54:12 -07:00
Thaddeus Crews 3c7fb9fe7f
Merge pull request #98169 from HolonProduction/only-highlight-exposed
GDScript: Don't highlight unexposed classes
2024-10-24 13:23:04 -05:00
Thaddeus Crews 7444da766a
Merge pull request #97374 from rune-scape/get-native-static-callable
GDScriptNativeClass: Allow getting static function as callable
2024-10-24 13:23:01 -05:00
kobewi 5c0f2414cd Always add decimal when printing float 2024-10-23 15:00:21 +02:00
Brian Huynh 360b84bad5 Clarification to the description of Global scope in regards to GDScript
Previous wording said that @GDScript referred to entries that could be accessed in any script. Although with common sense we could imagine that it is only refering to GDScript specific pieces of code, the wording is a little unclear.

In general there are small changes to the wording which makes it more clear and concise.
Wording change

Tried to match the wording up with my last change which should make it a bit easier to parse at a glance what the docs mean by "from any script"

Changed language from "not specific to" to "which work in any language"

After consulting multiple people the new wording seems easier to parse, even for non coders

Update doc/classes/@GlobalScope.xml

Update modules/gdscript/doc_classes/@GDScript.xml

Update modules/gdscript/doc_classes/@GDScript.xml

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
2024-10-23 02:10:03 -04:00
rune-scape eb8b9898c9 GDScript: Fix cached parser error when using typed Dictionaries 2024-10-22 02:13:16 -07:00
Thaddeus Crews 55aeff19dc
Merge pull request #98146 from HolonProduction/this-error-does-not-apply-to-unrecognized-annotations
GDScript: Fix annotation parsing adding new annotation entries
2024-10-21 16:39:24 -05:00
Thaddeus Crews 5fb22327ee
Merge pull request #97542 from AThousandShips/dict_sort_fix
[Core] Fix sorting of `Dictionary` keys
2024-10-21 16:39:05 -05:00
Yevhen Babiichuk (DustDFG) 8c29ef38fc Add some comments to #endif's where it will easier life
Also added some new line to improve readability

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2024-10-21 14:31:45 +03:00
aaronp64 aa1d469ffb Avoid unnecessary Dictionary conversions in GDScriptInstance::validate_property
Updated GDScriptInstance::validate_property to only convert PropertyInfo to Dictionary if _validate_property function is found.
2024-10-18 12:10:19 -04:00
A Thousand Ships 79f654ced5
[Core] Fix sorting of `Dictionary` keys
`StringName` keys were sorted as `StringName` which is unstable.
2024-10-18 08:47:05 +02:00
HolonProduction e999f11d53 GDScript: Don't highlight unexposed classes 2024-10-14 14:57:16 +02:00
HolonProduction 140c6a612e GDScript: Fix annotation parsing adding new annotation entries 2024-10-13 22:43:06 +02:00
HolonProduction 16aae0d7a7 Autocompletion: Don't use owner for inner classes 2024-10-13 18:20:27 +02:00
Danil Alexeev cab80cb97d
POT Generator: Add support for `TRANSLATORS:` and `NO_TRANSLATE` comments 2024-10-13 11:40:11 +03:00
Danil Alexeev 0bc59c78de
GDScript: Add missing static default initialization for typed dictionaries 2024-10-11 13:23:34 +03:00
Chaosus 54f6a1bf64 Fix lookup symbol for enum members to search a correct code definition 2024-10-08 22:46:44 +03:00
Haoyu Qiu 8086894a8e Create `.editorconfig` file only on project creation 2024-10-05 14:32:55 +08:00
Danil Alexeev 6286f9d21d
GDScript: Fix `GDScriptCache::get_full_script()` uses non-remapped path 2024-10-03 17:14:44 +03:00
Rémi Verschelde 903c3bc154
Merge pull request #97727 from SlugFiller/llvm-computed-goto
Enable use of Labels as Values feature in Clang when not wrapped by GCC
2024-10-02 23:56:48 +02:00
Rémi Verschelde 336d91551d
Merge pull request #97281 from reptofrog/deadzone-new-default
Input: Change the default deadzone value for new actions from 0.5 to 0.2
2024-10-02 15:01:02 +02:00
Rémi Verschelde 0b2446101c
Merge pull request #96693 from HolonProduction/annotation-arg-hint
Autocompletion: Add arghint for annotations
2024-10-02 15:00:58 +02:00
Rémi Verschelde 7f1f9799c5
Merge pull request #92263 from HolonProduction/autocompletion-get-node-set-value-if-type-compatible
Autocompletion: Keep `get_node` values which are compatible with type hint
2024-10-02 15:00:42 +02:00
SlugFiller f14af8b2d5 Enable use of Labels as Values feature in Clang when not wrapped by GCC 2024-10-02 15:22:37 +03:00
Roman Morozov d532eecc81 Changed the default deadzone value for new actions from 0.5 to 0.2 2024-10-01 16:47:44 +04:00
Wenqiang 9a94353fa3 Added support for 'print' command in local (command line -d) debugger 2024-09-28 13:28:07 -07:00
Danil Alexeev 85dfd89653 Add `@export_tool_button` annotation for easily creating inspector buttons
Co-authored-by: jordi <creptthrust@gmail.com>
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
Co-authored-by: Mack <86566939+Macksaur@users.noreply.github.com>
2024-09-27 22:24:15 +01:00
Rémi Verschelde 991e6c92ab
Merge pull request #96923 from Repiteo/style/warning-admonition
Style: Add `WARNING:` as new comment admonition
2024-09-26 12:45:38 +02:00
Thaddeus Crews 32c83a228d
Style: Add `WARNING:` as new comment admonition 2024-09-25 09:44:42 -05:00
Thaddeus Crews 9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
rune-scape d3ad99d3d1 GDScriptNativeClass: Allow getting static function as callable 2024-09-23 10:56:53 -07:00
Haoyu Qiu a751c05b15 Fix script editor wrongly replaces and quotes non-ASCII letters 2024-09-23 00:05:16 +08:00
Thaddeus Crews b37fc1014a
Style: Apply new `clang-format` changes 2024-09-20 08:09:48 -05:00
Rémi Verschelde cf539911f1
Merge pull request #97087 from aaronp64/lambda_capture_alloc
Speed up lambda capture handling
2024-09-17 09:18:11 +02:00
aaronp64 e2b6d92e27 Speed up lambda capture handling
Updated GDScriptLambdaCallable::call and GDScriptLambdaSelfCallable::call to use alloca instead of Vector when using captures, to avoid extra allocation/copy_on_write calls on each lambda function call.
2024-09-16 15:47:58 -04:00
Rémi Verschelde 964a9ec03b
Merge pull request #96684 from HolonProduction/that-was-a-bit-too-smart
LSP: Don't use smart resolve for completion
2024-09-16 15:25:44 +02:00
Rémi Verschelde 41066484ff
Merge pull request #96965 from Repiteo/style/gdscript-editorconfig
Style: Consolidate & migrate GDScript `.editorconfig`
2024-09-16 13:35:25 +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
Rémi Verschelde 08c5ce1d9c
Merge pull request #96797 from Repiteo/core/typed-dictionary-bracket-fix
Core: Fix `operator[]` for typed dictionaries
2024-09-16 13:35:02 +02:00
Rémi Verschelde 3b714ded01
Merge pull request #96725 from HolonProduction/lsp-omit
LSP: Omit some values based on specification version 3.17
2024-09-16 13:34:50 +02:00
Rémi Verschelde 8ebfd89359
Merge pull request #96024 from Ryan-000/expose_get_rpc_config
Expose `get_rpc_config` and `get_node_rpc_config`
2024-09-16 13:34:34 +02:00
Pedro J. Estébanez bb77520599 Object: Add tests about the safety of tail destruction 2024-09-16 09:58:47 +02:00
Hilderin 46edd6df55 Fix script properties reload from external editor 2024-09-14 15:07:53 -04:00
Moritz Burgdorff fd5fc9f3ee Fixed resource loader using not fully loaded scripts 2024-09-14 17:21:32 +02:00
Thaddeus Crews bf811db6c8
Style: Consolidate & migrate GDScript `.editorconfig`
• Moved to test project root so a new `.editorconfig` isn't constantly generated.
• Disable attributes only in the files which use invalid syntax deliberately
2024-09-13 11:12:17 -05:00
Thaddeus Crews b3d7960df4
Core: Fix `operator[]` for typed dictionaries 2024-09-12 11:10:17 -05:00
A Thousand Ships dd6443193c
[Editor] Expose more editor settings to documentation
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-09-12 15:34:49 +02:00
Mikael Hermansson e120792760 Fix issue with GDScript binary tokens being non-deterministic 2024-09-11 14:58:08 +02:00
Rémi Verschelde 1ff2186fe9
Merge pull request #96666 from aXu-AP/unique-node-no-quotes
Remove unneeded quotes from autocomplete % nodes
2024-09-11 12:35:00 +02:00
HolonProduction 4d713d91b5 LSP: Omit some values based on specification version 3.17 2024-09-08 21:07:19 +02:00
HolonProduction 00dfd568e0 Autocompletion: Add arghint for annotations 2024-09-07 20:47:34 +02:00
aXu-AP 2525311538 Remove unneeded quotes from autocomplete % nodes
Removes unnecessary quotes for suggestions like $"%MyNode".
2024-09-07 17:49:20 +03:00
HolonProduction 8155c1f836 LSP: Don't use smart resolve for completion 2024-09-07 16:23:25 +02:00
Rémi Verschelde 0b4ae20156
Merge pull request #78656 from Repiteo/typed-dictionary
Implement typed dictionaries
2024-09-06 22:38:13 +02:00
Rémi Verschelde d3be91e6ab
Merge pull request #89675 from dalexeev/gds-correct-unused-signal-warning
GDScript: Do not produce `UNUSED_SIGNAL` warning for common implicit uses
2024-09-05 18:34:45 +02:00
Ryan 8835f326b1 Expose get_rpc_config and get_node_rpc_config
add documentation

Update doc/classes/Node.xml

change name of get_node_rpc_config to get_rpc_config

Co-Authored-By: moondog <159832633+dog-on-moon@users.noreply.github.com>
Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
2024-09-04 15:45:22 -04:00
Rémi Verschelde dbdc4eb204
Merge pull request #96330 from rune-scape/little-regression
GDScript: Fix small mistake in script valid checks
2024-09-04 18:55:31 +02:00
Rémi Verschelde 721d280b8a
Merge pull request #96326 from HolonProduction/completion-hacks-and-fixes
Autocompletion: Reintroduce enum options on assignment
2024-09-04 18:55:27 +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
boywaste 7014c5b27d GDScript: Fix small mistake in script valid checks 2024-08-30 19:41:02 -07:00