1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Include more attributes in the global class names cache

This commit is contained in:
Pedro J. Estébanez
2025-01-08 13:21:47 +01:00
parent aca5cfc913
commit 318af42020
16 changed files with 174 additions and 133 deletions

View File

@@ -368,7 +368,9 @@ static bool generate_class_index_recursive(const String &p_dir) {
}
String base_type;
String source_file = current_dir.path_join(next);
String class_name = GDScriptLanguage::get_singleton()->get_global_class_name(source_file, &base_type);
bool is_abstract = false;
bool is_tool = false;
String class_name = GDScriptLanguage::get_singleton()->get_global_class_name(source_file, &base_type, nullptr, &is_abstract, &is_tool);
if (class_name.is_empty()) {
next = dir->get_next();
continue;
@@ -376,7 +378,7 @@ static bool generate_class_index_recursive(const String &p_dir) {
ERR_FAIL_COND_V_MSG(ScriptServer::is_global_class(class_name), false,
"Class name '" + class_name + "' from " + source_file + " is already used in " + ScriptServer::get_global_class_path(class_name));
ScriptServer::add_global_class(class_name, base_type, gdscript_name, source_file);
ScriptServer::add_global_class(class_name, base_type, gdscript_name, source_file, is_abstract, is_tool);
}
next = dir->get_next();