From 73ac91dc861b09931f3463ad31482000b50d176f Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 12 Jul 2022 22:58:44 +0200 Subject: [PATCH] Fixed remaining issues and added cscript to the build. --- editor/script_create_dialog.cpp | 14 +++++++------- modules/cscript/config.py | 6 +----- modules/cscript/cscript_editor.cpp | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 1f6351ba8..11f2e128b 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -30,25 +30,25 @@ #include "script_create_dialog.h" -#include "core/io/resource_saver.h" -#include "core/project_settings.h" -#include "core/script_language.h" -#include "core/string_builder.h" -#include "editor/create_dialog.h" -#include "editor/editor_scale.h" #include "core/class_db.h" #include "core/color.h" #include "core/error_list.h" #include "core/io/resource_loader.h" +#include "core/io/resource_saver.h" #include "core/list.h" #include "core/math/vector2.h" #include "core/os/dir_access.h" #include "core/os/memory.h" +#include "core/project_settings.h" #include "core/reference.h" #include "core/resource.h" +#include "core/script_language.h" +#include "core/string_builder.h" #include "core/typedefs.h" #include "core/variant.h" +#include "editor/create_dialog.h" #include "editor/editor_file_dialog.h" +#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" @@ -221,7 +221,7 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must List extensions; // get all possible extensions for script - for (int l = 0; l < language_menu->get_item_count(); l++) { + for (int l = 0; l < ScriptServer::get_language_count(); l++) { ScriptServer::get_language(l)->get_recognized_extensions(&extensions); } diff --git a/modules/cscript/config.py b/modules/cscript/config.py index f22ac6711..a3b831710 100644 --- a/modules/cscript/config.py +++ b/modules/cscript/config.py @@ -1,9 +1,6 @@ def can_build(env, platform): - #return True - #not yet - return False - + return True def configure(env): pass @@ -13,7 +10,6 @@ def get_doc_classes(): return [ "@CScript", "CScript", - "CScriptFunctionState", ] diff --git a/modules/cscript/cscript_editor.cpp b/modules/cscript/cscript_editor.cpp index 9d0b5f1a1..564ab74b7 100644 --- a/modules/cscript/cscript_editor.cpp +++ b/modules/cscript/cscript_editor.cpp @@ -375,7 +375,7 @@ String CScriptLanguage::debug_parse_stack_level_expression(int p_level, const St } void CScriptLanguage::get_recognized_extensions(List *p_extensions) const { - p_extensions->push_back("gd"); + p_extensions->push_back("cpps"); } void CScriptLanguage::get_public_functions(List *p_functions) const {