Commit graph

1626 commits

Author SHA1 Message Date
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
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
George Marques
2e84a46a0f
GDScript: Make singleton functions be seen as static
Since those can be called without an instance.
2021-08-20 10:52:58 -03:00
Rémi Verschelde
603502c11c
Merge pull request #51902 from vnen/variant-internal-constructor
Fix initialization of objects in VariantInternal
2021-08-20 08:10:38 +02:00
George Marques
a685535ad5
Fix initialization of objects in VariantInternal 2021-08-19 20:19:47 -03:00
George Marques
89695da337
GDScript: Fix memory leak when using self class as type 2021-08-18 18:58:45 -03:00
George Marques
1c8b076502
GDScript: Fix calling builtin static functions 2021-08-18 18:58:41 -03:00
George Marques
47545aeb1a
GDScript: Fix issue when calling new() on its own 2021-08-18 18:56:21 -03:00
George Marques
2ba4ee9198
GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
Max Hilbrunner
5161c97c9c Remove underscore hacks
Way less cruft. :)

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-17 16:10:28 +02:00
Rémi Verschelde
21a0af2686
Merge pull request #51762 from nekomatata/fix-crash-gdscript-cache
Fix crash when failing to load script from cache
2021-08-17 13:34:07 +02:00
PouleyKetchoupp
9973bf93ed Fix crash when failing to load script from cache 2021-08-16 16:27:25 -07:00
Paulb23
bcfc591f86 Reorganise text editor settings 2021-08-16 17:18:49 +01:00
Rémi Verschelde
81512a3732
Style: Cleanup code using text_editor/completion/use_single_quotes 2021-08-13 21:27:57 +02:00
kobewi
e0572f7ef7 Fix crash when parsing Dictionary 2021-08-10 15:57:56 +02:00
Julien Nguyen
51b7179b5a Fix infinite loop when creating a newly inherited GdScript file 2021-08-09 23:52:31 +02:00
Francois Belair
070d634966 Fix LSP completion crashing on scene-less scripts 2021-08-06 14:55:05 -04:00
Rémi Verschelde
6ded4f52e8
Merge pull request #51283 from Razoric480/lsp-parse-from
Fix LSP parsing get_node only from the scene root
2021-08-06 10:13:09 +02:00
Fabio Alessandrelli
d7dca072aa [Net] Default @rpc annotation should be puppet, not master. 2021-08-06 02:39:22 +02:00
Francois Belair
03f8fa9f62 Fix LSP parsing get_node only from the scene root 2021-08-05 12:30:06 -04:00
Rémi Verschelde
a544e77822
Merge pull request #51247 from pycbouh/docs-extract-theme-items
Add theme item descriptions to the online documentation
2021-08-05 00:18:56 +02:00
Rémi Verschelde
73b1f5ac79
Merge pull request #48615 from Razoric480/lsp-rename
Implement LSP didSave notification and rename request
2021-08-05 00:18:31 +02:00
Yuri Sizov
bf2839ea3e Add theme item descriptions to the online documentation 2021-08-04 22:27:10 +03:00
Fabio Alessandrelli
80fc90e82a
Merge pull request #50454 from Ev1lbl0w/gsoc21-dap
Implemented initial DAP support
2021-08-03 17:12:37 +02:00
Ev1lbl0w
7bccd5487e
Implemented initial DAP support
Implemented "output" event

Refactored "seq" field generation

Prevent debugging when editor and client are in different projects

Removed unneeded references to peer on the parser

Refactored way to detect project path

Implemented "setBreakpoints" request

Fix double events when terminating from client

Refactored "stopped" event

Implemented "stopped" with breakpoint event

Implemented "stackTrace", "scopes" and "variables" request

Report incoming number of stack dump variables

Implemented proper reporting of scopes and variables from stack frames

Prevent editor from grabbing focus when a DAP session is active

Implemented "next" and "stepIn" requests

Implemented "Source" checksum computing

Switched expected errors from macros to silent guards

Refactored message_id

Respect client settings regarding lines/columns behavior

Refactored nested DAP fields

Implement reporting of "Members" and "Globals" scopes as well

Fix error messages not being shown, and improved wrong path message
2021-08-02 10:43:35 +01:00
Rémi Verschelde
7adf4cc9b5
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Francois Belair
41ef9cf789 Fix LSP reporting wrong types 2021-07-26 16:26:23 -04:00
Rémi Verschelde
92299989bd
Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
Julien Nguyen
6938dd72f2 Fix instantiate line class 2021-07-25 14:20:31 +02:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Hugo Locurcio
8ff8c1e5f8
Improve documentation for GDScript constants 2021-07-22 09:50:24 +02:00
Hugo Locurcio
4bd5e4fd9b
Use the standard C INFINITY and NAN constants directly
The `Math_INF` and `Math_NAN` defines were just aliases for those
constants, so we might as well use them directly.

Some portions of the code were already using `INFINITY` directly.
2021-07-21 10:41:08 +02:00