Skip to content

Commit

Permalink
[GDScript] Fix get_method for lambda self Callables
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Jul 8, 2024
1 parent ec02d40 commit 11a3f71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/gdscript/gdscript_lambda_callable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ ObjectID GDScriptLambdaSelfCallable::get_object() const {
return object->get_instance_id();
}

StringName GDScriptLambdaSelfCallable::get_method() const {
return function->get_name();
}

int GDScriptLambdaSelfCallable::get_argument_count(bool &r_is_valid) const {
if (function == nullptr) {
r_is_valid = false;
Expand Down
1 change: 1 addition & 0 deletions modules/gdscript/gdscript_lambda_callable.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class GDScriptLambdaSelfCallable : public CallableCustom {
CompareEqualFunc get_compare_equal_func() const override;
CompareLessFunc get_compare_less_func() const override;
ObjectID get_object() const override;
StringName get_method() const override;
int get_argument_count(bool &r_is_valid) const override;
void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;

Expand Down

0 comments on commit 11a3f71

Please sign in to comment.