summaryrefslogtreecommitdiff
path: root/core/variant/callable.cpp
AgeCommit message (Collapse)Author
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 #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-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-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-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-21Callable: add callv methodRicardo Buring
This method can be called from GDExtension.
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
2022-07-18Fix the argcount when generating error message for CallableComparatorcdemirer
2022-06-20Clean up Hash Functionsreduz
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
2022-03-27Const Ref Callable for custom sort/searchmashumafi
2022-03-09Remove VARIANT_ARG* macrosreduz
* Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-02-07Fix script editor errors with CustomCallableskobewi
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-09-24Remove binds from Signal.connectkobewi
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-01Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.xLyuma
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-05-24Make Callable not crash on call when the object has been freedGeorge Marques
Also add a GDScript test for this case.
2021-05-03Add RPC to Callablereduz
-Up to each scripting language to implement this -If not supported for the function, it will just error when you try to call
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code