Core: Fix Object::has_method() for script static methods

This commit is contained in:
Danil Alexeev 2023-10-04 07:54:03 +03:00
parent bfd78bb917
commit ed0b3c08e1
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
9 changed files with 40 additions and 1 deletions

View file

@ -346,6 +346,10 @@ bool GDScript::has_method(const StringName &p_method) const {
return member_functions.has(p_method);
}
bool GDScript::has_static_method(const StringName &p_method) const {
return member_functions.has(p_method) && member_functions[p_method]->is_static();
}
MethodInfo GDScript::get_method_info(const StringName &p_method) const {
HashMap<StringName, GDScriptFunction *>::ConstIterator E = member_functions.find(p_method);
if (!E) {