summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | Editor: Remove unused Class Name field from Create Script dialogDanil Alexeev2023-09-121-1/+3
|/
* Merge pull request #81201 from anvilfolk/rpcRémi Verschelde2023-09-121-1/+0
|\ | | | | | | GDScript: Fix subclass methods not inheriting RPC info
| * GDScript: fix subclass methods not inheriting RPC infoocean (they/them)2023-09-111-1/+0
| |
* | GDScript: Fix `get_*_list()` methods return incorrect infoDanil Alexeev2023-09-041-8/+6
|/
* Fix Object::notification orderMarkus Sauermann2023-08-301-1/+1
| | | | | | | | | | | | | | Previously the `p_reversed` parameter didn't influence the order in a correct way. Also script overridden _notification functions were not called in the correct order. To fix this some `notification` functions had to add a `p_reversed` parameter. This made it necessary to adjust cpp-bindings. Co-authored-by: David Snopek <dsnopek@gmail.com>
* Merge pull request #75778 from KoBeWi/_vpRémi Verschelde2023-08-291-0/+2
|\ | | | | | | Expose `_validate_property()` for scripting
| * Expose _validate_property() for scriptingkobewi2023-08-281-0/+2
| |
* | Add a script method to get its class iconYuri Sizov2023-08-241-0/+2
|/ | | | Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
* Support threads in the script debuggerJuan Linietsky2023-07-261-31/+37
| | | | | | | | | | * This implementation adds threads on the side of the client (script debugger). * Some functions of the debugger are optimized. * The profile is also now thread safe using atomics. * The editor can switch between multiple threads when debugging. This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs. This means that, now, the editor can receive multiple threads entering debug mode at the same time.
* GDScript: Fix `_get_script_name()` function collision for SCU buildDanil Alexeev2023-06-201-4/+5
|
* GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-0/+1
|
* Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* Add support for static variables in GDScriptGeorge Marques2023-04-271-0/+14
| | | | | | | | | | Which allows editable data associated with a particular class instead of the instance. Scripts with static variables are kept in memory indefinitely unless the `@static_unload` annotation is used or the `static_unload()` method is called on the GDScript. If the custom function `_static_init()` exists it will be called when the class is loaded, after the static variables are set.
* Improve and fix GDScript documentation generation & behaviorocean (they/them)2023-04-211-9/+1
| | | | | | Removes documentation generation (docgen) from the GDScript compiler to its own file. Adds support for GDScript enums and signal parameters and quite a few other assorted fixes and improvements.
* Remove unused `ScriptLanguage` methodsvoidedWarranties2023-02-261-1/+0
|
* Merge pull request #71687 from reduz/support-script-class-name-in-efsRémi Verschelde2023-01-211-0/+1
|\ | | | | | | Support script global resource name in EditorFileSystem
| * Support script global resource name in EditorFileSystemJuan Linietsky2023-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | * Works for binary and text files. * Makes EditorQuickOpen work with custom resources again. * Information is cached and easily accessible. Properly fixes #66179. Supersedes #66215 and supersedes #62417 **WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
* | Remove references to compiled GDScript in exportGeorge Marques2023-01-201-3/+0
|/ | | | | This feature was removed from GDScript so it should not be present on the interface nor in the saved export presets.
* Resolve `GDScript::clear()` `heap-use-after-free` ASAN errorsAdam Scott2023-01-071-3/+11
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Unify GDScriptAnalyzer in-editor and runtime autoload checksocean (they/them)2022-12-201-0/+3
|
* GDScript: Fix built-in script and other `find_class` bugsrune-scape2022-12-151-1/+1
|
* GDScript: Fix subclass script path issuesrune-scape2022-12-011-1/+2
|
* Fix cyclic references in GDScript 2.0Adam Scott2022-11-181-0/+16
|
* GDScript compiler subclass bugfixesRune2022-11-131-2/+5
|
* Fix built-in script path of GDScriptWei Guo2022-10-251-0/+1
|
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-1/+1
| | | | change warnings=all to use /W4.
* Make `property_*_revert` methods multilevel and expose them for scriptingYuri Sizov2022-08-181-0/+5
|
* Swap arguments of ResourceSaver.save()kobewi2022-07-291-1/+1
|
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-261-3/+3
| | | | | | | | | - RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
* Add support for documenting built-in annotationsYuri Sizov2022-07-041-0/+1
|
* GDScript: Use implicit method for @onready variablesGeorge Marques2022-06-241-0/+1
| | | | | | Initialize them with the implicit method so they're not related to the overriding of the `_ready` method of the script but instead are always set.
* Improve stack overflow error message in GDScript and VisualScriptHugo Locurcio2022-06-151-1/+1
| | | | | Stack overflow errors are generally the result of infinite recursion within a script.
* Add a new HashSet templatereduz2022-05-201-6/+7
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-161-35/+35
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-4/+4
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* GDScript: Allow using self in lambdasGeorge Marques2022-04-241-0/+1
|
* GDScript: Add support for static method calls in native typesGeorge Marques2022-04-061-0/+1
|
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-8/+8
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Add GDExtension support to Scriptreduz2022-03-271-2/+2
| | | | | | | | | * Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
* Remove VARIANT_ARG* macrosreduz2022-03-091-2/+2
| | | | | | | | * Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Improve editor template workflowfabriceci2022-01-021-51/+50
| | | | Co-Authored-By: jmb462 <jmb462@gmail.com>
* Show built-in script names in the debuggerkobewi2021-11-111-0/+1
|
* Merge pull request #51456 from SaracenOne/super_init_fixGeorge Marques2021-09-101-0/+1
|\ | | | | Call _init on base class if one does not exist.
| * Automatically call the _init function on base class if one does not exist.SaracenOne2021-08-101-0/+1
| |
* | [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-071-3/+3
|/ | | | | | | | | | | 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".
* [Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli2021-07-201-1/+0
| | | | | | | | | | | | | | | | - 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).
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-4/+4
|
* Added support for scripts reporting multiple errors to ScriptTextEditorEric M2021-06-191-1/+1
| | | | Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.