summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-11-19 10:37:12 +0300
committerGitHub <noreply@github.com>2022-11-19 10:37:12 +0300
commitc2f03533d1731f215e7cc775dbf2c910f37b83f4 (patch)
tree611c0c246ab9fcbc7391713849df9366962da6ef
parent84c404f6bcce9ba112118d77afd6bd70a92774d1 (diff)
parent6d7c8533d52b944972a4e1cee0a0d499521385f1 (diff)
Merge pull request #68872 from adamscott/remove-fix-leftover
fix https://github.com/godotengine/godot/issues/61386
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 8b0b7a5102..3a536b42c1 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -3120,34 +3120,6 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident
result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
}
}
- } else if (ResourceLoader::get_resource_type(autoload.path) == "PackedScene") {
- Error err = OK;
- Ref<PackedScene> scene = GDScriptCache::get_packed_scene(autoload.path, err);
- if (err == OK && scene->get_state().is_valid()) {
- Ref<SceneState> state = scene->get_state();
- if (state->get_node_count() > 0) {
- const int ROOT_NODE = 0;
- for (int i = 0; i < state->get_node_property_count(ROOT_NODE); i++) {
- if (state->get_node_property_name(ROOT_NODE, i) != SNAME("script")) {
- continue;
- }
-
- Ref<GDScript> scr = state->get_node_property_value(ROOT_NODE, i);
- if (scr.is_null()) {
- continue;
- }
-
- Ref<GDScriptParserRef> singl_parser = get_parser_for(scr->get_path());
- if (singl_parser.is_valid()) {
- err = singl_parser->raise_status(GDScriptParserRef::INTERFACE_SOLVED);
- if (err == OK) {
- result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
- }
- }
- break;
- }
- }
- }
}
result.is_constant = true;
p_identifier->set_datatype(result);