summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2021-07-30doc: Use self-closing tags for `return` and `argument`Rémi Verschelde
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-26Fix LSP reporting wrong typesFrancois Belair
2021-07-26Use Ref<T> references as iterators where relevantRémi Verschelde
And const when possible.
2021-07-25Fix instantiate line classJulien Nguyen
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-22Improve documentation for GDScript constantsHugo Locurcio
2021-07-21Use the standard C `INFINITY` and `NAN` constants directlyHugo Locurcio
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-20[Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli
- 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-18Optimize StringName usagereduz
* 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-15Misc cleanup of header includesRémi Verschelde
Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
2021-07-13Implement the ability to disable classesreduz
* 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-12[Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli
2021-07-08Implement didClose notification in LSPFrancois Belair
2021-06-30Merge pull request #50009 from reduz/fix-suffixes-and-degreesRémi Verschelde
Fix editor suffixes and degrees conversion
2021-06-30Fix editor suffixes and degrees conversionreduz
* Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30Remove singleton variable shadowing.K. S. Ernest (iFire) Lee
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-20Merge pull request #48804 from EricEzaM/scripting-multi-error-supportRémi Verschelde
Added support for scripts reporting multiple errors to ScriptTextEditor
2021-06-19Merge pull request #44806 from madmiraal/consolidate_jsonRémi Verschelde
Consolidate JSON, JSONParseResults and JSONParser into JSON
2021-06-19Added support for scripts reporting multiple errors to ScriptTextEditorEric M
Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
2021-06-19Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
2021-06-19Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde
Make some Variant internal functions public.
2021-06-18Merge pull request #49449 from SpectralDragon/fix-enum-equal-operationGeorge Marques
Fix equal operation for typed enums
2021-06-18GDScript: Fix setting type of operator return valueGeorge Marques
Also write type adjust when needed for binary operators.
2021-06-17Translate file path to URI on LSP symbol requestsFrancois Belair
2021-06-15Merge pull request #49616 from BastiaanOlij/more_rename_transformRémi Verschelde
Adding some more missing renames for Transform3D and Quaternion
2021-06-15Adding some more missing renames for Transform3D and QuaternionBastiaan Olij
2021-06-15Merge pull request #49570 from RandomShaper/fix_slow_scene_ioRémi Verschelde
2021-06-13Fix "super" call when having at least one argumentJulien Nguyen
2021-06-13Fix slow load/save of scenes with many instances of the same scriptPedro J. Estébanez
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-11Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11Merge pull request #49279 from Calinou/rename-string-is-abs-path-methodRémi Verschelde
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11Merge pull request #34566 from Heikki00/34541_to_json_precisionRémi Verschelde
Increased String::num default decimal precision
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-10Fix regression from 160c260 causing export of non-@export properties.Lyuma
2021-06-09Fix equal operation for typed enumsВладислав Прусаков
2021-06-07Merge pull request #49367 from Calinou/gdscript-highligher-add-annotationsRémi Verschelde
Highlight annotations in the GDScript syntax highlighter
2021-06-07Merge pull request #49221 from Faless/mp/4.x_rpc_refactorRémi Verschelde
[Net] Refactor RPCs, remove RSETs
2021-06-06Highlight annotations in the GDScript syntax highlighterHugo Locurcio
By default, a orange color is used to highlight annotations in the script editor.
2021-06-04Rename Quat to QuaternionMarcel Admiraal
2021-06-03Rename `String.is_abs_path()` to `String.is_absolute_path()`Hugo Locurcio
This is more consistent with `NodePath.is_absolute()`.
2021-06-03Rename Variant TRANSFORM to TRANSFORM3DAaron Franke
Also _transform to _transform3d
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-06-01[Net] Refactor RPCs, remove RSETsFabio Alessandrelli
In this PR: - Removed rset - rpc_config can now optionally configure transfer mode (reliable/unreliable/ordered) and channel (channels are not actually implemented yet.) - Refactor how the RPC id is computed to minimize the logic in Node and scripts that now only needs a single `get_rpc_methods` function.
2021-06-01Merge pull request #49067 from JFonS/fix_gcc_warningsRémi Verschelde
Fix some warnings raised by GCC-11.1
2021-05-31Rename the bundled text editor themes for consistency with themesHugo Locurcio
The Adaptive text editor theme is the default, and has therefore been renamed Default for consistency with the Default theme preset. It keeps its automatic dark/light switch status. The Default text editor theme was actually a legacy Godot 2-style theme, so it has been renamed to Godot 2 to match the theme preset. Its background color has been changed to be a constant opaque color, since the new editor theme made the theme look less good on a translucent background. The previous background color on light theme also lacked contrast.
2021-05-29Increase String::num default decimal precisionHeikki Simojoki
Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.
2021-05-26Merge pull request #49114 from vnen/gdscript-fix-self-function-type-checkRémi Verschelde
GDScript: Fix function signature check for self calls