From fcace42e01d852555f1455e319cc01eb9328da04 Mon Sep 17 00:00:00 2001 From: Malcolm Anderson Date: Thu, 5 Dec 2024 21:17:35 -0800 Subject: [PATCH] Recognize deprecated built-in classes when used as types --- modules/gdscript/gdscript_editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index a83dd5b1fb1e..882fb579e7ff 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1004,6 +1004,9 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio for (const StringName &E : native_types) { if (ClassDB::is_class_exposed(E) && !Engine::get_singleton()->has_singleton(E)) { ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS); + if (class_doc_map.has(E)) { + option.deprecated = class_doc_map.get(E).is_deprecated; + } r_result.insert(option.display, option); } }