mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Allow for constant deceleration to be detected inherited scripts above the immediate parent.
This commit is contained in:
parent
24e1039eb6
commit
cf00f35a8e
1 changed files with 21 additions and 14 deletions
|
|
@ -5727,10 +5727,11 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Still look for class constants in parent script
|
// Still look for class constants in parent scripts
|
||||||
if (!found && (base_type.kind == DataType::GDSCRIPT || base_type.kind == DataType::SCRIPT)) {
|
if (!found && (base_type.kind == DataType::GDSCRIPT || base_type.kind == DataType::SCRIPT)) {
|
||||||
Ref<Script> scr = base_type.script_type;
|
Ref<Script> scr = base_type.script_type;
|
||||||
ERR_FAIL_COND_V(scr.is_null(), result);
|
ERR_FAIL_COND_V(scr.is_null(), result);
|
||||||
|
while (scr.is_valid()) {
|
||||||
Map<StringName, Variant> constants;
|
Map<StringName, Variant> constants;
|
||||||
scr->get_constants(&constants);
|
scr->get_constants(&constants);
|
||||||
|
|
||||||
|
|
@ -5750,6 +5751,12 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (found) {
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
scr = scr->get_base_script();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found && !for_completion) {
|
if (!found && !for_completion) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue