Rémi Verschelde
1c7aec9d9c
Merge pull request #51094 from RandomShaper/error_cast_freed_object
...
Complain if casting a freed object in a debug session
2021-09-14 21:48:10 +02:00
Pedro J. Estébanez
ddc7d7ee66
Complain if casting a freed object in a debug session
...
The idea is to give the user a chance to realize a mistake that will cause a crash in a release build (or with no debugger attached).
2021-09-14 21:07:00 +02:00
ThreeRhinosInAnElephantCostume
2c71134aa4
Fix an undefined behaviour
2021-09-13 22:59:28 +02:00
Rémi Verschelde
f6022d2aa8
Merge pull request #52362 from vnen/gdscript-lambda-completion-crash
...
GDScript: Do not complete lambda arguments from parent class
2021-09-13 21:13:40 +02:00
Rémi Verschelde
45d9df2e63
Merge pull request #52632 from vnen/autoload-global-script-class-conflict
...
Disallow class names to be the same as global names
2021-09-13 21:10:50 +02:00
Rémi Verschelde
ffe8412291
Merge pull request #52323 from vnen/gdscript-singleton-interdependence-fix
...
Fix loading of interdependent autoloads
2021-09-13 21:10:34 +02:00
George Marques
e9186cfebf
Fix GDScript test cases
2021-09-13 15:02:01 -03:00
Rémi Verschelde
0c2ab55a58
Merge pull request #52100 from vnen/gdscript-access-outer-constants
...
GDScript: Allow access to outer constant and enum values
2021-09-13 18:04:35 +02:00
Rémi Verschelde
4059cf2f02
Merge pull request #52068 from ThreeRhinosInAnElephantCostume/fixgdscript
...
Fix parse error on statement-less files with only newlines, add a warning for empty files.
2021-09-13 17:30:31 +02:00
George Marques
2e5fa124f4
Disallow class names to be the same as global names
...
Also forbid autoloads to have the same name as global script class.
2021-09-13 10:51:29 -03:00
ThreeRhinosInAnElephantCostume
e99730340b
Fix error on parsing statement-less GDScript files,
...
add an empty file warning,
add relevant tests.
2021-09-11 20:38:15 +02:00
ZuBsPaCe
1d1aa7a02f
GDScript: Removed spurious UNASSIGNED_VARIABLE warning for locals
...
Variable->assignment needs to be incremented when assigned a value.
Also fixed and improved unit test 'variable_declaration.gd'.
Fixes #52551
2021-09-10 22:26:50 +02:00
George Marques
6423e891a6
Merge pull request #52063 from KoBeWi/double_comma_of_doom
...
Fix crash with consecutive commas in Dictionary
2021-09-10 11:24:51 -03:00
George Marques
6da061faf5
Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editor
...
Fix crash when writing $. in the editor
2021-09-10 10:55:11 -03:00
George Marques
0b484c5f5f
Merge pull request #51456 from SaracenOne/super_init_fix
...
Call _init on base class if one does not exist.
2021-09-10 10:40:32 -03:00
kobewi
c7452a9940
Fix crash with consecutive commas in Dictionary
2021-09-10 15:38:24 +02:00
George Marques
11e457e594
Merge pull request #51593 from KoBeWi/if
...
Prevent crash when awaiting in a getter/setter
2021-09-10 10:36:25 -03:00
George Marques
1234c2bdd9
Merge pull request #52081 from ThreeRhinosInAnElephantCostume/fixmatchfreeze
...
Fix gdscript pattern matching expressions
2021-09-10 09:28:18 -03:00
Max Hilbrunner
886ad727f8
Merge pull request #52267 from williamd67/lookup-symbol-builtin-functions
...
Show help for built-in functions (@GlobalScope)
2021-09-07 21:05:09 +02:00
Fabio Alessandrelli
bf9aae09ba
[Net] Move multiplayer to core subdir, split RPCManager.
...
Move multiplayer classes to "core/multiplayer" subdir.
Move the RPCConfig and enums (TransferMode, RPCMode) to a separate
file (multiplayer.h), and bind them to the global namespace.
Move the RPC handling code to its own class (RPCManager).
Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-07 11:14:30 +02:00
Max Hilbrunner
8c82e305ba
Merge pull request #52329 from ZuBsPaCe/gdscript-unused-private-class-variable-fix
...
GDScript: Fix for UNUSED_PRIVATE_CLASS_VARIABLE
2021-09-03 10:04:11 +02:00
ZuBsPaCe
c76ad6b158
GDScript: Count usages of member variables.
...
Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
2021-09-03 07:44:46 +02:00
ThreeRhinosInAnElephantCostume
15ccd83ada
Added tests for expression matching
2021-09-03 06:59:13 +02:00
George Marques
da9daf4c3a
GDScript: Do not complete lambda arguments from parent class
...
Since lambdas are not overriding methods from the parent class, they
should not try to check inheritance for signature matching.
2021-09-02 19:54:55 -03:00
SaracenOne
84852585b9
Check for GDScript member and class naming conflicts in a variety of conditions.
2021-09-02 07:16:06 +01:00
George Marques
3d13588057
GDScript: Fix loading of interdependent autoloads
...
Move the autoload resolution to runtime by loading it into the stack
with an extra instruction. This allows an autoload to use another
autoload singleton independent of load order.
2021-09-01 16:06:30 -03:00
Juan Linietsky
bcd73fc00a
Merge pull request #52240 from Rubonnek/rename-rel-path
...
Rename `String::is_rel_path` to `String::is_relative_path`
2021-08-30 20:45:45 -03:00
William Deurwaarder
b2f858870d
Show help for built-in functions (@GlobalScope)
2021-08-30 21:51:56 +02:00
Wilson E. Alvarez
d11c1afc04
Rename String::is_rel_path to String::is_relative_path
2021-08-29 20:41:29 -04:00
Fabio Alessandrelli
fafddbc143
[GDScript] [Net] Allow mixing rpc annotation paramters.
...
The strings no longer needs to be in order.
The last parameter (channel), still requires all the other parameters to
be present.
2021-08-30 00:54:38 +02:00
Fabio Alessandrelli
64b9f30b92
[Net] Rename RPC "puppet" to "auth" (authority). Drop "master".
...
This commit completely removes the RPC_MODE_MASTER ("master" keyword),
and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword).
This commit also renames the "Node.[get|set]_network_master" methods to
"Node.[get|set]_network_authority".
This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY.
RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by
any puppet peer on the master, while RPC_MODE_PUPPET meant that it would
be callable by the master on any puppet.
Beside proving to be very confusing to the user (referring to where it
could be called instead of who can call it) the RPC_MODE_MASTER is quite
useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with
the exception that the network master cannot. While this could be useful
to check in some case, in such a function you would anyway need to check
in code who is the caller via get_rpc_sender_id(), so adding the check
there for those rare cases does not warrants a dedicated mode.
2021-08-30 00:54:38 +02:00
Hugo Locurcio
4f9509e6ba
Merge pull request #52085 from williamd67/fix-await-without-argument
...
Print error message when await is not followed by signal or coroutine
2021-08-28 23:01:34 +02:00
Max Hilbrunner
5d2c4faa89
Merge pull request #52164 from mhilbrunner/gd-style-fixup
...
GDScript test style fix
2021-08-28 20:16:17 +02:00
William Deurwaarder
e77338978f
Print error message when await is not followed by signal or coroutine
...
When await was not followed by a signal or coroutine the GDScript parser would
crash.
This fix will check if await is followed by a signal or coroutine in case that
isn't true (element == nullptr) then an error message is printed.
2021-08-28 17:29:35 +02:00
K. S. Ernest (iFire) Lee
d04aa9a114
Merge pull request #52122 from V-Sekai/autoload_list
...
Use sorted map for autoloads in ProjectSettings to preserve order.
2021-08-27 14:41:40 -07:00
Max Hilbrunner
f126634434
GDScript test style fix
2021-08-27 21:11:46 +02:00
Max Hilbrunner
4e67e9bca6
Merge pull request #52090 from balloonpopper/bug52060
...
Correct null and boolean values being capitalised by the str command
2021-08-27 21:05:47 +02:00
Hugo Locurcio
33773a24dc
Merge pull request #52105 from ldmnt/master
2021-08-27 19:28:59 +02:00
Lyuma
31f790299c
Use OrderedHashMap for autoloads to preserve order
2021-08-26 21:55:26 -07:00
Balloonpopper
4fae7ae9dc
Correct null and boolean values being capitalised by the str command
2021-08-26 17:11:34 +10:00
Louis Dumont
79578a5625
Fixed crash when parsing an empty assignment.
...
Resolves #51620 .
2021-08-25 18:48:08 +02:00
Hugo Locurcio
9c2ec6e697
Add a README to link to the GDScript integration tests documentation
...
This makes the documentation about creating and running GDScript
integration tests more discoverable.
2021-08-25 16:51:28 +02:00
ThreeRhinosInAnElephantCostume
6c258a89de
Fixed pattern matching with expressions
2021-08-25 15:30:41 +02:00
George Marques
4918df4527
GDScript: Allow access to outer constant and enum values
2021-08-24 14:45:51 -03:00
Max Hilbrunner
583b6a594a
Merge pull request #51971 from aaronfranke/https
...
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
Michael Alexsander
88db541705
Merge pull request #51947 from AnilBK/redundant-assignments
...
[cppcheck] Remove some redundant assignments.
2021-08-23 13:23:45 +00:00
Aaron Franke
ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions
2021-08-22 20:13:11 -05:00
reduz
3682978aee
Replace BIND_VMETHOD by new GDVIRTUAL syntax
...
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.
Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.
Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Anilforextra
c86db8b710
Remove redundant assignments.
...
Use used_in_transfer instead of used_in_compute twice.
2021-08-21 19:20:07 +05:45
Rémi Verschelde
f5422c55fc
Merge pull request #49105 from vnen/gdscript-inner-preload-type
...
GDScript: Fix inner classes and preloaded scripts as types
2021-08-20 17:07:18 +02:00