mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Ensure get script method list also checks base classes, fixes #23384
This commit is contained in:
@@ -223,16 +223,21 @@ void GDScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {
|
|||||||
|
|
||||||
void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
|
void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
|
||||||
|
|
||||||
for (const Map<StringName, GDScriptFunction *>::Element *E = member_functions.front(); E; E = E->next()) {
|
const GDScript *current = this;
|
||||||
GDScriptFunction *func = E->get();
|
while (current) {
|
||||||
MethodInfo mi;
|
for (const Map<StringName, GDScriptFunction *>::Element *E = member_functions.front(); E; E = E->next()) {
|
||||||
mi.name = E->key();
|
GDScriptFunction *func = E->get();
|
||||||
for (int i = 0; i < func->get_argument_count(); i++) {
|
MethodInfo mi;
|
||||||
mi.arguments.push_back(func->get_argument_type(i));
|
mi.name = E->key();
|
||||||
|
for (int i = 0; i < func->get_argument_count(); i++) {
|
||||||
|
mi.arguments.push_back(func->get_argument_type(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
mi.return_val = func->get_return_type();
|
||||||
|
p_list->push_back(mi);
|
||||||
}
|
}
|
||||||
|
|
||||||
mi.return_val = func->get_return_type();
|
current = current->_base;
|
||||||
p_list->push_back(mi);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user