From 90e555ebb07ac9022767e4fdff603ed261c46db1 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 12 Jul 2022 20:04:37 +0200 Subject: [PATCH] Rename cscript file names. --- modules/cscript/cscript_editor.cpp | 8 ++++---- modules/cscript/register_types.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/cscript/cscript_editor.cpp b/modules/cscript/cscript_editor.cpp index bd6c50b42..ab6eaf925 100644 --- a/modules/cscript/cscript_editor.cpp +++ b/modules/cscript/cscript_editor.cpp @@ -842,10 +842,10 @@ static bool _guess_expression_type(CScriptCompletionContext &p_context, const CS script = "res://" + script; } - if (!script.ends_with(".gd")) { + if (!script.ends_with(".cpp")) { //not a script, try find the script anyway, //may have some success - script = script.get_basename() + ".gd"; + script = script.get_basename() + ".cpp"; } if (FileAccess::exists(script)) { @@ -3434,10 +3434,10 @@ Error CScriptLanguage::lookup_code(const String &p_code, const String &p_symbol, if (path.begins_with("*")) { String script = path.substr(1, path.length()); - if (!script.ends_with(".gd")) { + if (!script.ends_with(".cpp")) { // Not a script, try find the script anyway, // may have some success - script = script.get_basename() + ".gd"; + script = script.get_basename() + ".cpp"; } if (FileAccess::exists(script)) { diff --git a/modules/cscript/register_types.cpp b/modules/cscript/register_types.cpp index 8d2f66239..4afeb9414 100644 --- a/modules/cscript/register_types.cpp +++ b/modules/cscript/register_types.cpp @@ -63,7 +63,7 @@ public: script_key = preset->get_script_encryption_key().to_lower(); } - if (!p_path.ends_with(".gd") || script_mode == EditorExportPreset::MODE_SCRIPT_TEXT) { + if (!p_path.ends_with(".cpp") || script_mode == EditorExportPreset::MODE_SCRIPT_TEXT) { return; } @@ -116,13 +116,13 @@ public: memdelete(fae); file = FileAccess::get_file_as_array(tmp_path); - add_file(p_path.get_basename() + ".gde", file, true); + add_file(p_path.get_basename() + ".cppe", file, true); // Clean up temporary file. DirAccess::remove_file_or_error(tmp_path); } else { - add_file(p_path.get_basename() + ".gdc", file, true); + add_file(p_path.get_basename() + ".cppc", file, true); } } }