summaryrefslogtreecommitdiffstats
path: root/modules/gdscript
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Remove `treat_warnings_as_errors` project settingDanil Alexeev2023-02-102-2/+1
|
* Merge pull request #72971 from vnen/gdscript-multiline-commentRémi Verschelde2023-02-095-21/+75
|\ | | | | | | GDScript: Allow strings as multiline comments
| * GDScript: Allow strings as multiline commentsGeorge Marques2023-02-095-21/+75
| | | | | | | | Bring back the behavior in 3.x that was left out by oversight.
* | Merge pull request #72975 from vnen/gdscript-no-ascii-spoof-checkRémi Verschelde2023-02-098-6/+67
|\ \ | | | | | | | | | GDScript: Be more lenient with identifiers
| * | GDScript: Be more lenient with identifiersGeorge Marques2023-02-098-6/+67
| |/ | | | | | | | | | | - Allow identifiers similar to keywords if they are in ASCII range. - Allow constants to be treated as regular identifiers. - Allow keywords that can be used as identifiers in expressions.
* | Merge pull request #69550 from Rindbee/fix-script-editor-not-reload-via-lspRémi Verschelde2023-02-091-0/+1
|\ \ | |/ |/| Fix internal editor not updating when using external editor via LSP
| * Fix internal editor not updating when using external editor via LSPRindbee2023-01-221-0/+1
| |
* | Fix null message in assert()kobewi2023-02-081-1/+4
| |
* | Merge pull request #72493 from dalexeev/gds-export-flagsRémi Verschelde2023-02-072-14/+55
|\ \ | | | | | | | | | GDScript: Improve validation and documentation of `@export_flags`
| * | GDScript: Improve validation and documentation of `@export_flags`Danil Alexeev2023-02-072-14/+55
| | |
* | | Merge pull request #72789 from Vilcrow/fix-jump-to-definitionRémi Verschelde2023-02-071-0/+8
|\ \ \ | |/ / |/| | | | | Fixed the jumping to function definition using 'Ctrl+LMB'.
| * | Fixed the jumping to function definition using 'Ctrl+LMB'.S.V.I. Vilcrow2023-02-071-0/+8
| | |
* | | Some code simplificationsMarkus Sauermann2023-02-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. `number_width` isn't used later 2. `return_type` is used only once 3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger 4. negative `aa->backward` conditional 5. `current_canvas` == `find_world_2d()->get_canvas()` 6. identical if `render_shadows`
* | | Merge pull request #72546 from vonagam/fix-typed-array-can-referenceYuri Sizov2023-02-061-0/+6
|\ \ \ | | | | | | | | GDScript: Fix can_reference check for typed arrays
| * | | GDScript: Fix can_reference check for typed arraysDmitrii Maganov2023-02-061-0/+6
| |/ /
* | | Merge pull request #72677 from dalexeev/gds-await-infer-typeYuri Sizov2023-02-065-13/+33
|\ \ \ | | | | | | | | GDScript: Fix `await` type inference
| * | | GDScript: Fix `await` type inferenceDanil Alexeev2023-02-065-13/+33
| | | |
* | | | Merge pull request #72804 from vnen/gdscript-no-onready-without-nodeYuri Sizov2023-02-065-1/+19
|\ \ \ \ | | | | | | | | | | GDScript: Fix inheritance check of @onready for inner classes
| * | | | GDScript: Fix inheritance check of @onready for inner classesGeorge Marques2023-02-065-1/+19
| | | | |
* | | | | Merge pull request #70002 from poohcom1/fix/static-subscript-autocompleteYuri Sizov2023-02-061-17/+19
|\ \ \ \ \ | |_|/ / / |/| | | | Fix code-completion suggesting non-static members for custom classes
| * | | | Fix code-completion suggesting non-static memberspoohcom12023-01-161-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GDScript code-completion: - Fixes class symbols not being marked as meta - Remove signal in static contexts Fixes #69928
* | | | | Merge pull request #72708 from KoBeWi/PackedMultilineStringArrayYuri Sizov2023-02-061-0/+7
|\ \ \ \ \ | | | | | | | | | | | | Fix @export_multiline for PackedStringArray
| * | | | | Fix @export_multiline for PackedStringArraykobewi2023-02-041-0/+7
| | | | | |
* | | | | | GDScript: Fix recently merged test not ignoring warningsRémi Verschelde2023-02-061-0/+3
| |_|/ / / |/| | | |
* | | | | Merge pull request #72330 from MinusKube/unreachable_code_bugRémi Verschelde2023-02-061-0/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix unreachable code warning for elif block
| * | | | | Fix unreachable code warning for elif blockMinusKube2023-01-291-0/+8
| | | | | |
* | | | | | Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov2023-02-065-1/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | GDScript: Fix type certainty for result of ternary operator
| * | | | | | GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov2023-02-015-1/+23
| | | | | | |
* | | | | | | Merge pull request #72794 from vnen/gdscript-no-onready-without-nodeRémi Verschelde2023-02-065-0/+19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | GDScript: Don't allow @onready without inheriting Node
| * | | | | | | GDScript: Don't allow @onready without inheriting NodeGeorge Marques2023-02-065-0/+19
| | |_|_|_|/ / | |/| | | | |
* / | | | | | GDScript: Better handling of `@rpc` annotation and autocompletionDanil Alexeev2023-02-053-13/+42
|/ / / / / /
* | | | | | Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov2023-02-0521-56/+358
|\ \ \ \ \ \ | | | | | | | | | | | | | | GDScript: Add warnings that are set to error by default (take 2)
| * | | | | | GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-0221-56/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* | | | | | | Merge pull request #71860 from GeroVeni/masterYuri Sizov2023-02-042-5/+13
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | Improve docs for rpc annotations
| * | | | | | Improve docs for rpc annotationsGeroVeni2023-02-042-5/+13
| |/ / / / /
* | | | | | Merge pull request #65910 from KoBeWi/gdsusRémi Verschelde2023-02-033-2/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | Cleanup function state connections when destroying instance
| * | | | | | Cleanup function state connections when destroying instancekobewi2022-12-023-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Adam Scott <ascott.ca@gmail.com>
* | | | | | | Merge pull request #72398 from vnen/gdscript-setter-chainRémi Verschelde2023-02-0212-9/+91
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | GDScript: Improve usability of setter chains
| * | | | | | | GDScript: Improve usability of setter chainsGeorge Marques2023-02-0212-9/+91
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Consider PackedArrays non-shared since they are copied on C++/script boundaries. - Add error messages in the analyzer when assigning to read-only properties. - Add specific error message at runtime when assignment fails because the property is read-only.
* / | | | | | Fix crash in gdscript when autocompleting virtual function and signature ↵Eric M2023-02-021-11/+13
|/ / / / / / | | | | | | | | | | | | | | | | | | does not match base.
* | | | | | Merge pull request #72557 from vonagam/fix-make-value-protectionRémi Verschelde2023-02-021-0/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | GDScript: Fix getting reduced value of incomplete subscript for autocomplete
| * | | | | | GDScript: Fix getting reduced value of incomplete subscriptDmitrii Maganov2023-02-021-0/+8
| | |/ / / / | |/| | | |
* / | | | | GDScript: Fix crash in export group annotationsDanil Alexeev2023-02-021-1/+6
|/ / / / /
* | | | | Merge pull request #72499 from vonagam/fix-typed-array-disassemblyRémi Verschelde2023-02-011-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | GDScript: Fix disassembly of typed array assignment and construction
| * | | | | GDScript: Fix disassembly of typed array assignment and constructionDmitrii Maganov2023-02-011-3/+3
| | | | | |
* | | | | | Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde2023-02-0117-300/+56
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
* | | | | Merge pull request #72487 from vnen/gdscript-warning-default-errorRémi Verschelde2023-02-0117-56/+300
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | GDScript: Add warnings that are set to error by default
| * | | | | GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-0117-56/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* | | | | | Merge pull request #72490 from resistor/disasmRémi Verschelde2023-02-011-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Fix disassembly of OPCODE_CONSTRUCT_TYPED_ARRAY.
| * | | | | | Fix disassembly of OPCODE_CONSTRUCT_TYPED_ARRAY.Owen Anderson2023-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found while inspecting the bytecode for godot-benchmarks.