summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2020-02-28Removed interactive loader, added proper thread loading.Juan Linietsky
2020-02-28Merge pull request #36620 from Calinou/doc-linear2db-exampleRémi Verschelde
Add a practical example for `@GDScript.linear2db()`
2020-02-28Merge pull request #36619 from Calinou/doc-improve-inverse-lerpRémi Verschelde
Improve the `@GDScript.inverse_lerp()` documentation
2020-02-28Merge pull request #36556 from RandomShaper/rework_mutexRémi Verschelde
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
2020-02-27Add a practical example for `@GDScript.linear2db()`Hugo Locurcio
One of its most common applications in games is for volume sliders. See https://www.dr-lex.be/info-stuff/volumecontrols.html for more information.
2020-02-27Improve the `@GDScript.inverse_lerp()` documentationHugo Locurcio
This closes https://github.com/godotengine/godot-docs/issues/2589.
2020-02-27Merge pull request #36545 from nathanwfranke/syntax-highlight-int-typesRémi Verschelde
Fix autocomplete and highlighting for new integer types
2020-02-26Fix autocomplete and GDScript Highlighting for typesnathanwfranke
Types include new integer types and others
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-26Merge pull request #36521 from rafaeldelboni/masterRémi Verschelde
Improve LSP completion using scene owner
2020-02-25Improve LSP completion using scene ownerRafael Delboni
Fixes: #36473
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-23Fix crash after closing a GDScript LSP sessionOliver Frank
2020-02-23Merge pull request #36461 from akien-mga/c++17-fallthrough-attributeRémi Verschelde
Replace FALLTHROUGH macro by C++17 [[fallthrough]]
2020-02-23Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde
This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-22Add support for Vector2i, Rect2i and Vector3i to VariantJuan Linietsky
WARNING: Requires C++17 'guaranteed copy elision' to fix ambiguous operator problems in Variant. This was added for this commit (and future C++17 uses) in #36457.
2020-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Migrating language server from Websockets to raw TCPof9
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-19GDScript: Remove self static reference and create one on callsGeorge Marques
This is needed because of the new changes to Variant. The reference counter is increased by adding it to a Variant, which means no GDScript will be freed (or will be double freed if manually freed somewhere).
2020-02-18doc: Sync classref with current sourceRémi Verschelde
Handle removal of Pool*Array types and other recent changes.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-15Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky
2020-02-13Remove more deprecated methods and codeRémi Verschelde
2020-02-13Remove deprecated sync and slave networking keywordsRémi Verschelde
Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
2020-02-12Merge pull request #36142 from akien-mga/remove-deprecated-decimalsRémi Verschelde
Remove deprecated decimals builtin
2020-02-12ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky
32 bits.
2020-02-12Merge pull request #35522 from AndreaCatania/rpc_opt_2Rémi Verschelde
Optmized data sent during RPC and RSet calls.
2020-02-12Remove deprecated decimals builtinRémi Verschelde
Replaced by 'step_decimals' in 3.2 via #21425.
2020-02-12Optmized data sent during RPC and RSet calls.Andrea Catania
- Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
2020-02-12Fix hover symbol content positiongeequlim
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-31Update docs to version 4.0clayjohn
2020-01-28Fix static functions loop using class' functionsFrancois Belair
Besides being incorrect, it also caused a hard editor crash for purely static classes or classes with more static functions than methods.
2020-01-26Merge pull request #35589 from akien-mga/doc-drop-category-propertyRémi Verschelde
doc: Drop unused 'category' property from header
2020-01-26doc: Do not expose Variant::NIL as a type in the class referenceRémi Verschelde
Fix signals Variant arguments incorrectly listed as Nil. Fixes #12520.
2020-01-26doc: Drop unused 'category' property from headerRémi Verschelde
We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
2020-01-26doc: Document named color constantsRémi Verschelde
Busywork but it's good for our completion rate :)
2020-01-22Merge pull request #35412 from DaividFrank/check_overriding_selfRémi Verschelde
Disabled re-assigning 'self'
2020-01-22GDScript: Added checks in assign operations to disable re-assigning 'self'DaividFrank
2020-01-21Remove unused #if 0'ed codeRémi Verschelde
2020-01-18Fix subclass finding in extend statement for sub-sub classesDani Frank
lookup was always done on top level script instead of advancing to subclass each time. this commit changes the lookup to always be at last found subclass
2020-01-17Fix constant access in base class through subclass instanceChibiDenDen
Fixes as issue where a subclass calls a base class method that tries to access a constant from the script. The original code went through every ower class, and for each owner, went through its inheritance tree. This seems like the wrong order, the modified code goes to each base class, and for each base class goes through the owner tree. This is more in line with what the parser does, as the current impelemtation allows an access that the parser does not support. This change should not negatively affect existing code due to the way the parser works
2020-01-16Merge pull request #35218 from bojidar-bg/26691-parse-error-errorsRémi Verschelde
Fix errors raised when showing parse errors in the editor
2020-01-16Fix errors raised when showing parse errors in the editorBojidar Marinov
Fixes #26691
2020-01-16Merge pull request #35201 from bojidar-bg/27582-gdfunction-validate-instanceRémi Verschelde
Validate instances of objects before trying to check their type in GDScript
2020-01-16Merge pull request #35199 from dalexeev/masterRémi Verschelde
Fix function arguments hint format in GDScript editor
2020-01-16Merge pull request #35102 from ChibiDenDen/reuse_orphaned_subclassRémi Verschelde
#34161: Keep a weak reference to orphan subclasses to reuse on class reload
2020-01-16Validate instances of objects before trying to check their type in GDScriptBojidar Marinov
Fixes #27582