Merge pull request #85382 from HolonProduction/in-case-of-a-script
GDScript: Generate `arghint` for script types
This commit is contained in:
commit
7708f0e163
|
@ -2759,6 +2759,20 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
|
||||||
|
|
||||||
base_type = base_type.class_type->base_type;
|
base_type = base_type.class_type->base_type;
|
||||||
} break;
|
} break;
|
||||||
|
case GDScriptParser::DataType::SCRIPT: {
|
||||||
|
if (base_type.script_type->is_valid() && base_type.script_type->has_method(p_method)) {
|
||||||
|
r_arghint = _make_arguments_hint(base_type.script_type->get_method_info(p_method), p_argidx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Ref<Script> base_script = base_type.script_type->get_base_script();
|
||||||
|
if (base_script.is_valid()) {
|
||||||
|
base_type.script_type = base_script;
|
||||||
|
} else {
|
||||||
|
base_type.kind = GDScriptParser::DataType::NATIVE;
|
||||||
|
base_type.builtin_type = Variant::OBJECT;
|
||||||
|
base_type.native_type = base_type.script_type->get_instance_base_type();
|
||||||
|
}
|
||||||
|
} break;
|
||||||
case GDScriptParser::DataType::NATIVE: {
|
case GDScriptParser::DataType::NATIVE: {
|
||||||
StringName class_name = base_type.native_type;
|
StringName class_name = base_type.native_type;
|
||||||
if (!ClassDB::class_exists(class_name)) {
|
if (!ClassDB::class_exists(class_name)) {
|
||||||
|
|
Loading…
Reference in New Issue