Commit graph

1618 commits

Author SHA1 Message Date
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
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
Fabio Alessandrelli
ddb68f76ff [Net] Single rpc annotation. "sync" no longer part of mode.
- Move the "sync" property for RPCs to RPCConfig.

- Unify GDScript annotations into a single one:
  - `@rpc(master)` # default
  - `@rpc(puppet)`
  - `@rpc(any)` # former `@remote`

- Implement three additional `@rpc` options:
  - The second parameter is the "sync" option (which also calls the
    function locally when RPCing). One of "sync", "nosync".
  - The third parameter is the transfer mode (reliable, unreliable,
    ordered).
  - The third parameter is the channel (unused for now).
2021-07-20 11:17:59 +02:00
reduz
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Francois Belair
7c5335081c Implement didSave notification and rename request 2021-07-17 11:50:00 -04:00
Rémi Verschelde
06568bbfdf
Misc cleanup of header includes
Was looking for misuse of module headers without checking that the module is
actually enabled and got carried away...
2021-07-15 00:46:43 +02:00
reduz
5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
Fabio Alessandrelli
88d68346ee [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer. 2021-07-12 16:36:34 +02:00
Francois Belair
10429019ad Implement didClose notification in LSP 2021-07-08 11:40:15 -04:00
Rémi Verschelde
a02620f3a5
Merge pull request #50009 from reduz/fix-suffixes-and-degrees
Fix editor suffixes and degrees conversion
2021-06-30 18:47:40 +02:00