Commit Graph

23 Commits

Author SHA1 Message Date
3f2ed008d1 Fix compile errors. 2024-04-14 16:55:07 +02:00
Kirill Diduk
1a231787b0 Check duplicate keys in dictionary literals: enums and const variables
Check identifiers (const variables and unnamed enums) and named
enums when parsing dictionary literals whether the keys are not
duplicated.

In case of duplicate key is encountered, highlight the line with it
and print error message:
`Duplicate key "foo" found in Dictionary literal`

This commit is a logical continuation of the commit dab73c7 which
implemented such checks only for literal keys (which fixed #7034).

Apart from that, this commit also fixes the issue with the error
message itself, which was shown one line below the duplicated key
in case it was the last one in the dictionary literal and there
was no hanging comma.

Also, the format of the error message has been changed so that now
the error message also contains the value of the key which is duplicated.
Instead of `Duplicate key found in Dictionary literal`, it now prints
`Duplicate key "<value>" found in Dictionary literal`

Fixes #50971
2024-04-14 16:37:55 +02:00
3da74f0703 Added get_global_class_name method to Script. Now GDScriptParser uses this first to determine global class names, instead of parsing the script file again. 2024-02-13 20:09:46 +01:00
Danil Alexeev
a70e3ce4b3 GDScript: Prevent native class shadowing 2024-02-08 13:23:04 +01:00
Jason Knight
929ad6b766 Far faster and more efficient method of checking if an identifer refers an autoload. 2023-12-20 22:45:03 +01:00
ae854d4e55 File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
0a9c9ca15e Ported godot pr: [3.x] Allow exporting custom resources from/to any scripting language (GDScript, VisualScript, C#, NativeScript, PluginScript)
- willnationsdev
https://github.com/godotengine/godot/pull/44879
Using the rebased version from 02d1f70ee5 by Atlinx
2023-09-06 01:45:29 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
3d1abe86fb Ported: GDScriptParser - don't use index operator on linked list
Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.
- lawnjelly
ef914dac31
2023-03-18 09:29:08 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
ray90514
2693ad37f7 Fix Script editor completion doesn't suggest members of a script for type hints 2022-12-22 14:48:51 +01:00
smix8
f7f386b697 Fix GDScript export hint for Navigation2D layer names 2022-10-08 17:29:21 +02:00
88d6ef51eb Removed additional direct script rpc mode query when sending rpcs, in order to simplify that codepath as much as possible. Also removed the remote, remotesync etc. keywords from gdscript, as now they won't work anymore. Node's rpc_config() method should be used instead of marking methods with keywords in scripts. 2022-08-19 01:19:33 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. 2022-08-16 21:55:56 +02:00
730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. 2022-08-13 15:22:33 +02:00
bb5acfd745 Ported: [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
- smix8
8bd7c6188b
2022-07-28 22:34:28 +02:00
Haoyu Qiu
cdeba9e5d1 Fix incorrect usage for some export variables 2022-07-27 13:37:40 +02:00
b67082e9dd Added gdscript support for the new types . 2022-03-21 15:09:56 +01:00
49f8e8c398 Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00