|
@@ -731,9 +731,9 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio
|
|
}
|
|
}
|
|
|
|
|
|
// Autoload singletons
|
|
// Autoload singletons
|
|
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
- for (const Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E != nullptr; E = E->next()) {
|
|
|
|
- const ProjectSettings::AutoloadInfo &info = E->get();
|
|
|
|
|
|
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
|
|
|
|
+ const ProjectSettings::AutoloadInfo &info = E.get();
|
|
if (!info.is_singleton || info.path.get_extension().to_lower() != "gd") {
|
|
if (!info.is_singleton || info.path.get_extension().to_lower() != "gd") {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -1086,12 +1086,12 @@ static void _find_identifiers(GDScriptParser::CompletionContext &p_context, bool
|
|
kwa++;
|
|
kwa++;
|
|
}
|
|
}
|
|
|
|
|
|
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
- for (const Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E != nullptr; E = E->next()) {
|
|
|
|
- if (!E->value().is_singleton) {
|
|
|
|
|
|
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
|
|
|
|
+ if (!E.value().is_singleton) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- ScriptCodeCompletionOption option(E->key(), ScriptCodeCompletionOption::KIND_CONSTANT);
|
|
|
|
|
|
+ ScriptCodeCompletionOption option(E.key(), ScriptCodeCompletionOption::KIND_CONSTANT);
|
|
r_result.insert(option.display, option);
|
|
r_result.insert(option.display, option);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1359,12 +1359,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
|
|
r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[which]);
|
|
r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[which]);
|
|
found = true;
|
|
found = true;
|
|
} else {
|
|
} else {
|
|
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
|
|
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
|
|
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
|
|
|
|
- String name = E->key();
|
|
|
|
|
|
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
|
|
|
|
+ String name = E.key();
|
|
if (name == which) {
|
|
if (name == which) {
|
|
- String script = E->value().path;
|
|
|
|
|
|
+ String script = E.value().path;
|
|
|
|
|
|
if (!script.begins_with("res://")) {
|
|
if (!script.begins_with("res://")) {
|
|
script = "res://" + script;
|
|
script = "res://" + script;
|
|
@@ -2660,10 +2660,10 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
|
|
}
|
|
}
|
|
|
|
|
|
// Get autoloads.
|
|
// Get autoloads.
|
|
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
|
|
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
|
|
|
|
|
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
|
|
|
|
- String path = "/root/" + E->key();
|
|
|
|
|
|
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
|
|
|
|
+ String path = "/root/" + E.key();
|
|
ScriptCodeCompletionOption option(path.quote(quote_style), ScriptCodeCompletionOption::KIND_NODE_PATH);
|
|
ScriptCodeCompletionOption option(path.quote(quote_style), ScriptCodeCompletionOption::KIND_NODE_PATH);
|
|
options.insert(option.display, option);
|
|
options.insert(option.display, option);
|
|
}
|
|
}
|