From b85dfd990e26ffb22643d78e5f00ba135d1f97e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 1 Oct 2021 17:06:48 +0200 Subject: GDScript completion: Handle quote style ad-hoc to remove editor dependency `core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`. --- scene/resources/material.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'scene/resources') diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 3a6af3afb0..08851dbc58 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -32,11 +32,6 @@ #include "core/config/engine.h" #include "core/version.h" - -#ifdef TOOLS_ENABLED -#include "editor/editor_settings.h" -#endif - #include "scene/main/scene_tree.h" #include "scene/scene_string_names.h" @@ -268,19 +263,13 @@ void ShaderMaterial::_bind_methods() { } void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List *r_options) const { -#ifdef TOOLS_ENABLED - const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\""; -#else - const String quote_style = "\""; -#endif - String f = p_function.operator String(); if ((f == "get_shader_param" || f == "set_shader_param") && p_idx == 0) { if (shader.is_valid()) { List pl; shader->get_param_list(&pl); for (const PropertyInfo &E : pl) { - r_options->push_back(E.name.replace_first("shader_param/", "").quote(quote_style)); + r_options->push_back(E.name.replace_first("shader_param/", "").quote()); } } } -- cgit v1.2.3