Commit graph

375 commits

Author SHA1 Message Date
Thaddeus Crews
94282d88f9
Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
Thaddeus Crews
4248411baf
Merge pull request #102521 from HolonProduction/cancel-await
GDScript: Cancel suspended functions when reloading a script
2025-04-08 12:32:52 -05:00
Yufeng Ying
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08: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
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
f09ee0171a
Style: Begin integrating simple .clangd fixes 2025-03-22 13:24:35 -05:00
Michael Alexsander
ce8d2e4917
Implement class detection in GDScript for build configuration 2025-03-13 21:24:56 -03:00
HolonProduction
676e4c9013 GDScript: Cancel suspended functions when reloading a script 2025-03-06 11:34:40 +01: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
Pedro J. Estébanez
318af42020 Include more attributes in the global class names cache 2025-01-29 09:39:50 +01:00
Danil Alexeev
cd918ff470
GDScript: Remove RENAMED_IN_GODOT_4_HINT from GDScriptWarning::Code enum 2025-01-09 21:07:41 +03:00
Ricardo Subtil
b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00: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
Yufeng Ying
a43f90b89d Remove unused variable in GDScriptLanguage. 2024-12-20 00:48:06 +08:00
Danil Alexeev
80d11500b5
Code Editor: Add documentation tooltips 2024-12-15 10:51:33 +03: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
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
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
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
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
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
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
Danil Alexeev
0bc59c78de
GDScript: Add missing static default initialization for typed dictionaries 2024-10-11 13:23:34 +03:00
rune-scape
d3ad99d3d1 GDScriptNativeClass: Allow getting static function as callable 2024-09-23 10:56:53 -07: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
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
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
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
Hilderin
ef6f873938 Fix editor needs restart after adding GDExtensions 2024-08-29 06:15:32 -04: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
Alistair Leslie-Hughes
f489c313cc gdscript: Only include profiling variables when DEBUG is enabled 2024-08-12 10:14:42 +10:00
Mikael Hermansson
6852f9497c Speed up GDScriptLanguage::finish 2024-07-18 12:30:45 +02:00
kobewi
5636518358 Allow live reloading of built-in scripts 2024-07-06 23:43:37 +02:00
Rémi Verschelde
a31525c4da
Merge pull request #92609 from rune-scape/rune-relax-gds-guards
GDScript: Partially allow member lookup on invalid scripts
2024-06-28 14:42:44 +02:00
Hilderin
39369db029 Fix synchronization of global class name 2024-06-25 18:33:07 -04:00
Rémi Verschelde
6c3f811f08
Merge pull request #92177 from KoBeWi/literally_wtf
Fix broken built-in script reloading
2024-06-18 17:59:03 +02:00
Hilderin
c419b548d2 Fix mismatched external parser with binary exports 2024-06-14 11:18:52 -04:00
rune-scape
7f7114c008 GDScript: partially allow some functions on invalid scripts
+ always default initialize static variables
+ dont invalidate script when dependant scripts don't compile/resolve
2024-06-02 02:08:26 -07:00
kobewi
eca19d6e80 Fix broken script reloading 2024-05-20 23:54:27 +02:00
rune-scape
9fa13da16f GDScript: fix segfault on invalid script 2024-05-17 15:26:25 -07:00
Rémi Verschelde
bdefe53992
Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde
0a67ee52d1
Revert "GDScript: Implement get_dependencies()"
This reverts commit dc73440f89.

This commit in some form is needed to fix handling of dependencies on
export, but as it's also used for import, it's exposing some pre-existing
issues which we need to solve first.

So reverting for now to give ourselves time to iron this out for a future
Godot release.

Fixes #91726.
2024-05-13 16:59:43 +02:00
kobewi
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00