summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2023-04-24Unify descriptions of vector methodsHaoyu Qiu
* is_equal_approx * normalize * length_squared * posmod * posmodv (cherry picked from commit 6cd8e706fae5dacc908efd1a823e3447e01bfa56)
2023-03-27Fix `Array.slice()` rounding for `abs(step) != 1`Ninni Pipping
(cherry picked from commit 10f385fb792dc74ffb8be221fec88ba9ef7aaa25)
2023-03-27Fix type check for max/minNinni Pipping
(cherry picked from commit c8c43997c79b1488ca823af6c4ad4fd12f8671d4)
2023-03-27Fix Variant hashing for floatsNinni Pipping
Incorrectly hashed floats as single precision (cherry picked from commit e6a9e0cdec2c309f9201d0ab475616c51010b531)
2023-02-25Merge pull request #73881 from vnen/max-min-only-for-numbersRémi Verschelde
Make max() and min() global functions only accept numbers
2023-02-24Core: Identity compare objects by id, not by pointersDmitrii Maganov
2023-02-24Make max() and min() global functions only accept numbersGeorge Marques
The behavior for those are not well defined for non-numeric arguments. To avoid confusion the other types are forbidden.
2023-02-13GDScript: Fix usage of ints with typed array of floatsDmitrii Maganov
2023-02-13Merge pull request #62921 from cdemirer/fix-variant-inRémi Verschelde
Fix `Variant::in()` error on invalid `evaluate`
2023-02-13Fix `Variant::in()` error on invalid `evaluate`cdemirer
2023-02-13Make sure Variant is not implicitely cast when using operator[]Gilles Roudière
Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2023-02-06GDScript: Fix can_reference check for typed arraysDmitrii Maganov
2023-02-04Merge pull request #71786 from raulsntos/dotnet/arrayRémi Verschelde
Sync C# Array with Core
2023-02-02GDScript: Improve usability of setter chainsGeorge Marques
- 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.
2023-02-01Fix various typos with codespellRémi Verschelde
Finally do the childs -> children rename too.
2023-01-31GDScript: Fix issues with typed arraysDmitrii Maganov
2023-01-30Move Array:set_typed to internal GDExtension structure and unexposed it.bruvzg
2023-01-30Sync C# Array with CoreRaul Santos
- Add `AddRange` method. - Add `Fill` method. - Add `Max` and `Min` methods. - Add `PickRandom` method. - Add `Reverse` method. - Add `RecursiveEqual` method. - Add `Sort` method. - Add `Slice` and `GetSliceRange` methods. - Add `IndexOf` overload that takes an index parameter. - Add `LastIndexOf` method. - Add `BinarySearch` method. - Add/update documentation.
2023-01-27Merge pull request #62499 from fire/gltf-binary-img-compressionRémi Verschelde
Handle gltf binary images
2023-01-27Handle gltf binaryK. S. Ernest (iFire) Lee
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ] Enable compressed mip maps from Basis Universal for faster compressions. Increase the quality of Basis to avoid corruption. To keep compatibility use the first mip of the previous internal Godot format. Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27GDScript: Fix test for read-only state of constantsDmitrii Maganov
2023-01-25Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()`Adam Scott
2023-01-23Fix bind " convergence_dist" containing spaceJan Haller
2023-01-21Use range iterators in LocalVector loopskobewi
2023-01-19Add property usage to array indexerRaul Santos
This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
2023-01-16Merge pull request #71279 from vonagam/fix-iterator-number-typeRémi Verschelde
GDScript: Fix typing of iterator in for loop
2023-01-15Rename `center` method to `get_center` in Plane.Raul Santos
2023-01-13GDScript: Fix typing of iterator in for loopDmitrii Maganov
2023-01-12Merge pull request #68450 from KoBeWi/bracket_escapistRémi Verschelde
Allow to escape closing brackets in CFG tags
2023-01-10Fix Callable call error reporting.Juan Linietsky
* Fix potential crash when using bind in `Variant::get_callable_error_text()` * Properly compute bound arguments so they can be properly shown. * Add a function to obtain the actual bound arguments.
2023-01-09Merge pull request #71051 from vonagam/consts-are-deep-startRémi Verschelde
GDScript: Begin making constants deep, not shallow or flat
2023-01-09Merge pull request #71082 from AThousandShips/array_find_fixRémi Verschelde
Fix for comparisons with PackedArrays
2023-01-09Merge pull request #70996 from reduz/properly-report-callable-bound-argumentsRémi Verschelde
Properly report Callable bound arguments
2023-01-08Properly report Callable bound argumentsJuan Linietsky
Fixes #63213 Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
2023-01-08Use BitField<> in core type masksJuan Linietsky
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
2023-01-08Fix for PackedArray comparisonNinni Pipping
2023-01-08GDScript: Begin making constants deep, not shallow or flatDmitrii Maganov
2023-01-07Merge pull request #71000 from reduz/callable-bind-from-arrayRémi Verschelde
Allow binding Callable arguments from an array
2023-01-06Allow binding Callable arguments from an arrayJuan Linietsky
Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0. Fixes #64668. Implements https://github.com/godotengine/godot-proposals/issues/6034 Usage: ```GDScript callable.bindv([arg1,arg2,arg3]) ```
2023-01-06Unbind Variant methods that change immutable types.Juan Linietsky
Fixes #62706. Code is commented instead of removed to clarify why they should not be re-added.
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-30GDScript: Error when assigning return value of void functionGeorge Marques
This also makes built-in method calls empty the return value when the method is void, to avoid keeping returning a garbage value in such case.
2022-12-20Fix empty zero assigners for the variant typesYuri Rubinsky
2022-12-15Merge pull request #69709 from RandomShaper/refactor_spirv_reflectionRémi Verschelde
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-12VariantParser make readahead optionallawnjelly
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync. This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-12Add default, zeroing constructor to BitFieldPedro J. Estébanez
2022-12-12Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextensionRémi Verschelde
Rename all gdnative occurences to gdextension
2022-12-12Rename all gdnative occurences to gdextensionGilles Roudière
Non-exhaustive list of case-sensitive renames: GDExtension -> GDNative GDNATIVE -> GDEXTENSION gdextension -> gdnative ExtensionExtension ->Extension (for where there was GDNativeExtension) EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION) gdnlib -> gdextension gdn_interface -> gde_interface gdni -> gde_interface
2022-12-09Merge pull request #68747 from rune-scape/rune-stringname-unificationRémi Verschelde
GDScript: Unify StringName and String
2022-12-06Fix Variant StringName `is_zero` being invertedAaron Franke