Rename cscript file names.

This commit is contained in:
Relintai 2022-07-12 20:04:37 +02:00
parent e92d4e0f97
commit 90e555ebb0
2 changed files with 7 additions and 7 deletions

View File

@ -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)) {

View File

@ -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);
}
}
}