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
Danil Alexeev
49bcdf78a7
Core: Сheck r_error
after calling callp()
2024-08-30 21:09:30 +03:00
HolonProduction
171c522290
Autocompletion: reintroduce enum options on assignment
2024-08-30 13:46:48 +02:00
Rémi Verschelde
2e4c07bfe0
Merge pull request #96229 from dalexeev/gds-replace-assert-in-tests
...
GDScript: Replace `assert()` with `Utils.check()` in tests
2024-08-30 11:43:05 +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
Hilderin
ef6f873938
Fix editor needs restart after adding GDExtensions
2024-08-29 06:15:32 -04:00
Aina
930742f8b3
Fix missing GDScriptParser reference on completion context
2024-08-28 17:03:12 -03:00
Danil Alexeev
c1322d41e6
GDScript: Replace assert()
with Utils.check()
in tests
2024-08-28 17:41:52 +03:00
Rémi Verschelde
4e051ff6f7
Merge pull request #78178 from dalexeev/gds-add-non-tool-extends-tool-error
...
GDScript: Add warning if non-`@tool` class extends `@tool` class
2024-08-28 13:14:13 +02:00
Rémi Verschelde
6eb1d3cf98
Merge pull request #94888 from rune-scape/no-const-cast-gdscript-parser
...
GDScriptParser: Avoid `const_cast` of `AnnotationNode`
2024-08-28 00:12:35 +02:00
Rémi Verschelde
9f70823eec
Merge pull request #94012 from KoBeWi/reload_everything_to_update_one_line
...
Allow live reloading of built-in scripts
2024-08-28 00:11:53 +02:00
Rémi Verschelde
3eba191c9e
Merge pull request #96160 from HolonProduction/dict-fix
...
Autocompletion: Enable string literal completion in subscripts
2024-08-27 16:55:31 +02:00
Rémi Verschelde
9dfc41568a
Merge pull request #95984 from timothyqiu/what-identifier
...
Add `String.is_valid_unicode_identifier()`
2024-08-27 16:55:06 +02:00
HolonProduction
c824403853
Autocompletion: enable string literal completion in subscripts
2024-08-27 13:02:09 +02:00
Danil Alexeev
2d8f6c1b1d
GDScript: Fix message when calling non-tool function in tool mode
2024-08-27 12:30:15 +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
4a798ad85d
Merge pull request #95749 from Mickeon/documentation-example-pruning
...
Remove empty `[b]Example:[/b]` lines from the class reference
2024-08-26 23:29:00 +02:00
Rémi Verschelde
2c14f3ef95
Merge pull request #79378 from HolonProduction/autocompletion-index
...
Improve autocompletion for indices
2024-08-26 22:44:40 +02:00
HolonProduction
ccbdb34a2a
Improve autocompletion for indices
2024-08-26 14:42:22 +02:00
Pedro J. Estébanez
f4d76853b9
WorkerThreadPool (plus friends): Overhaul unlock allowance zones
...
This fixes a rare but possible deadlock, maybe due to undefined behavior. The new implementation is safer, at the cost of some added boilerplate.
2024-08-21 12:22:52 +02:00
Rémi Verschelde
f45421204c
Merge pull request #95764 from passivestar/gdscript-syntax-highlighter
...
Expose GDScript syntax highlighter to editor plugins
2024-08-20 10:02:35 +02:00
Rémi Verschelde
58505b0bce
Merge pull request #94082 from HolonProduction/completion-force
...
Autocompletion: Rework argument options string literal completion
2024-08-20 10:01:52 +02:00
passivestar
3fe644de86
Expose GDScript syntax highlighter to editor plugins
2024-08-19 16:36:55 +04:00
Micky
4ce5856384
Remove empty [b]Example:[/b]
lines from the class reference
2024-08-19 01:00:52 +02:00
Micky
e80c44dbe7
Fix some invalid code in GDScript class reference
2024-08-19 00:55:51 +02:00
Rémi Verschelde
cc894e59ea
Merge pull request #95408 from alesliehughes/gdscitp_debug_statement
...
GDScript: Only include profiling variables when DEBUG is enabled
2024-08-16 14:34:01 +02:00
Alistair Leslie-Hughes
f489c313cc
gdscript: Only include profiling variables when DEBUG is enabled
2024-08-12 10:14:42 +10:00
Hilderin
d199f1f0d5
Fix resolve class inheritance after file rename
2024-08-10 19:21:24 -04:00
rune-scape
e680369d5b
GDScript: Fix too many calls to 'remove_parser'
...
+fix excessive memory allocations when 'load'ing many dependant scripts
+fix excessive calls to vformat
2024-08-03 20:52:44 -07:00
rune-scape
6e8fa6dd50
GDScript: Fix common mismatched external parser errors
2024-07-31 12:54:16 -07:00
rune-scape
22f43b7879
Avoid const_cast in GDScriptParser
2024-07-28 08:04:25 -07:00
Rémi Verschelde
b2facc018a
Merge pull request #94730 from dalexeev/gds-fix-while-locals-clearing
...
GDScript: Fix locals clearing after exiting `while` block
2024-07-26 13:44:09 +02:00
Rémi Verschelde
7805220fef
Merge pull request #90134 from AThousandShips/construct_fix
...
[Core] Fix `Variant::construct` of `Object`
2024-07-26 13:43:54 +02:00
Rémi Verschelde
2a61a2fa2f
Merge pull request #89274 from 0x0ACB/unchecked_cast
...
Fix use after free in `GDScriptLanguage::debug_get_globals`
2024-07-26 13:43:48 +02:00
A Thousand Ships
8f3e2c96eb
[Core] Fix Variant::construct
of Object
...
Variant type was not updated correctly causing leaks in ref-counted
2024-07-25 12:25:29 +02:00
Danil Alexeev
5350e1beaa
GDScript: Fix locals clearing after exiting while
block
2024-07-25 12:10:37 +03:00
Rémi Verschelde
f2918c73cf
Revert "GDScript: Fix common mismatched external parser errors"
...
This reverts commit c75225ffb2
.
This caused a crashing regression for multiple users:
https://github.com/godotengine/godot/pull/94617#issuecomment-2247868580
2024-07-25 09:20:23 +02:00
Rémi Verschelde
022d702bc0
Merge pull request #94678 from rune-scape/clear-abandoned-parser-refs
...
GDScriptCache: Clear abandoned parser refs
2024-07-24 13:03:27 +02:00
Rémi Verschelde
77e18da5ff
Merge pull request #94674 from dalexeev/gds-fix-incorrect-setter-call-for-ref-types
...
GDScript: Fix incorrect setter call for reference types
2024-07-24 10:17:45 +02:00
Rémi Verschelde
d342df79d5
Merge pull request #94676 from rune-scape/test-oops
...
GDScriptTestRunner: Fix compiler error output
2024-07-24 09:59:34 +02:00
Rémi Verschelde
f361133601
Merge pull request #94664 from dalexeev/gds-fix-make-arguments-hint
...
GDScript: Fix incorrect default values in `_make_arguments_hint()`
2024-07-24 09:59:28 +02:00
Rémi Verschelde
e91725f490
Merge pull request #94617 from rune-scape/fix-mismatched-parsers
...
GDScript: Fix common mismatched external parser errors
2024-07-24 09:59:19 +02:00
Rémi Verschelde
7708f0e163
Merge pull request #85382 from HolonProduction/in-case-of-a-script
...
GDScript: Generate `arghint` for script types
2024-07-24 09:59:08 +02:00
Danil Alexeev
8c82fd15d2
GDScript: Fix incorrect setter call for reference types
2024-07-24 10:37:35 +03:00
rune-scape
298904d74e
GDScriptTestRunner: Fix compiler error output
2024-07-23 12:59:22 -07:00
rune-scape
86b23d0420
GDScriptCache: Clear abandoned parser refs
2024-07-23 12:54:45 -07:00
rune-scape
c75225ffb2
GDScript: Fix common mismatched external parser errors
2024-07-23 12:25:23 -07:00
Danil Alexeev
37a3a98fde
GDScript: Fix incorrect default values in _make_arguments_hint()
2024-07-23 19:35:42 +03:00
Danil Alexeev
638148a184
GDScript: Fix false positive cases of ENUM_VARIABLE_WITHOUT_DEFAULT
2024-07-22 21:45:01 +03:00
Rémi Verschelde
60966f5bcf
Merge pull request #94505 from mihe/speed-up-gdscript-shutdown
...
Speed up `GDScriptLanguage::finish`
2024-07-18 15:38:29 +02:00
Rémi Verschelde
fefd9537e6
Merge pull request #94424 from HolonProduction/completion-fix-depended-parsers
...
Autocompletion: Register depended parsers with the main parser
2024-07-18 15:38:20 +02:00
Mikael Hermansson
6852f9497c
Speed up GDScriptLanguage::finish
2024-07-18 12:30:45 +02:00
HolonProduction
4699e69708
Autocompletion: register depended parsers with the main parser
2024-07-18 12:16:28 +02:00
Rémi Verschelde
c2b91e2986
Merge pull request #94327 from HolonProduction/underscore_identifier
...
GDScript: Restore support for `Token::UNDERSCORE` in identifiers
2024-07-17 11:44:01 +02:00
Rémi Verschelde
ab67408390
Merge pull request #94238 from RandomShaper/ref_is_now_rc
...
Make errors on `RefCounted.free()` more accurate
2024-07-17 11:43:32 +02:00
Rémi Verschelde
aefd91ae42
Merge pull request #94138 from vnen/gdscript-simple-setter-chain-call-setter
...
GDScript: Call setter on simple setter chain without getter
2024-07-17 11:43:15 +02:00
HolonProduction
06e732c3ed
GDScript: Restore support for Token::UNDERSCORE
in identifiers
2024-07-15 10:04:11 +02:00
Pedro J. Estébanez
76bfe8e0fd
Make errors on RefCounted.free() more accurate
2024-07-15 08:51:42 +02:00
HolonProduction
402bdfa3b7
Generate arghint
for script types
2024-07-13 10:47:26 +02:00
HolonProduction
9a84387017
Autocompletion: Keep get_node values which are compatible with type hint
2024-07-12 12:32:30 +02:00
Rémi Verschelde
fe5d567917
Merge pull request #93942 from MikeSchulze/73525
...
Fix GDScript analyzer error when instantiating EditorPlugins.
2024-07-11 09:41:09 +02:00
baptr
810fcc7431
Fix gdscript analyzer error when instantiating EditorPlugins.
...
Editor code is not instantiable outside of the editor
(1d14c054a1/core/object/class_db.cpp (L369)
).
This is fine for editor plugins and the like, but the GDScript analyzer
balks at it, causing F5 runs to fail: #73525 .
Instead, we really just want to know if the type is abstract - so add
a new ClassDB method to check that and nothing else.
Update core/object/class_db.cpp
Apply code review comments
Co-Authored-By: Bryce <1522777+baptr@users.noreply.github.com>
2024-07-10 10:24:57 +02:00
George Marques
87c90a573c
GDScript: Call setter on simple setter chain without getter
...
Fixes a bug where a member variable was being set directly before
calling the setter.
2024-07-09 13:01:59 -03:00
Rémi Verschelde
26d1577f39
Merge pull request #94131 from dalexeev/gds-fix-mismatched-parser-autoloads
...
GDScript: Fix "Mismatched external parser" for autoloads
2024-07-09 16:47:32 +02:00
Rémi Verschelde
92320c9b73
Merge pull request #94025 from dalexeev/gds-fix-implicit-cast-typed-array-param
...
GDScript: Fix implicit cast to typed array when passing parameter
2024-07-09 16:47:20 +02:00