Commit Graph

2169 Commits

Author SHA1 Message Date
2c71134aa4 Fix an undefined behaviour 2021-09-13 22:59:28 +02:00
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
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
ffe8412291 Merge pull request #52323 from vnen/gdscript-singleton-interdependence-fix
Fix loading of interdependent autoloads
2021-09-13 21:10:34 +02:00
e9186cfebf Fix GDScript test cases 2021-09-13 15:02:01 -03:00
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
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
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
b9219bedf7 Prevent non explicit inferring parameter from null 2021-09-11 21:11:10 +02:00
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
10c9c2ccd4 Avoid crash after a parsing error in GDScript 2021-09-11 11:35:25 +02:00
7c79e361f5 Fix parameter type resolution in GDScript 2021-09-11 11:35:25 +02:00
d72f12a561 Implement iterator variable typing in GDScript 2021-09-11 11:35:25 +02:00
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
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
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
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
c7452a9940 Fix crash with consecutive commas in Dictionary 2021-09-10 15:38:24 +02:00
11e457e594 Merge pull request #51593 from KoBeWi/if
Prevent crash when awaiting in a getter/setter
2021-09-10 10:36:25 -03:00
1234c2bdd9 Merge pull request #52081 from ThreeRhinosInAnElephantCostume/fixmatchfreeze
Fix gdscript pattern matching expressions
2021-09-10 09:28:18 -03:00
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
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
a92d2c447b Fix extends with relative path to parent script 2021-09-05 00:11:04 +02:00
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
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
15ccd83ada Added tests for expression matching 2021-09-03 06:59:13 +02:00
b0c807c75a Fix auto reload scripts on external change 2021-09-02 20:28:02 -05:00
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
84852585b9 Check for GDScript member and class naming conflicts in a variety of conditions. 2021-09-02 07:16:06 +01:00
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
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
b2f858870d Show help for built-in functions (@GlobalScope) 2021-08-30 21:51:56 +02:00
d11c1afc04 Rename String::is_rel_path to String::is_relative_path 2021-08-29 20:41:29 -04:00
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
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
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
5d2c4faa89 Merge pull request #52164 from mhilbrunner/gd-style-fixup
GDScript test style fix
2021-08-28 20:16:17 +02:00
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
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
f126634434 GDScript test style fix 2021-08-27 21:11:46 +02:00
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
33773a24dc Merge pull request #52105 from ldmnt/master 2021-08-27 19:28:59 +02:00
31f790299c Use OrderedHashMap for autoloads to preserve order 2021-08-26 21:55:26 -07:00
4fae7ae9dc Correct null and boolean values being capitalised by the str command 2021-08-26 17:11:34 +10:00
79578a5625 Fixed crash when parsing an empty assignment.
Resolves #51620.
2021-08-25 18:48:08 +02:00
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
6c258a89de Fixed pattern matching with expressions 2021-08-25 15:30:41 +02:00
4918df4527 GDScript: Allow access to outer constant and enum values 2021-08-24 14:45:51 -03:00
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
88db541705 Merge pull request #51947 from AnilBK/redundant-assignments
[cppcheck] Remove some redundant assignments.
2021-08-23 13:23:45 +00:00