summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-20 11:46:27 +0200
committerGitHub <noreply@github.com>2020-05-20 11:46:27 +0200
commitc404fe5848a99c22cdeb4868456b5334b0bf2e72 (patch)
tree07ae73ef205b2c73d0c70b150767ee20fec7ad09
parentaec07538f47211a8fe87dbc4e42918478da03b1d (diff)
parent653334cc8d4f232034c6086bd7672bb9e04932b7 (diff)
Merge pull request #38515 from Calinou/cli-scene-allow-res-tres
Allow `.res` and `.tres` extensions in the scene CLI positional argument
-rw-r--r--main/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f35e73cdc2..a24f41a79e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1532,7 +1532,11 @@ bool Main::start() {
} else if (args[i].length() && args[i][0] != '-' && positional_arg == "") {
positional_arg = args[i];
- if (args[i].ends_with(".scn") || args[i].ends_with(".tscn") || args[i].ends_with(".escn")) {
+ if (args[i].ends_with(".scn") ||
+ args[i].ends_with(".tscn") ||
+ args[i].ends_with(".escn") ||
+ args[i].ends_with(".res") ||
+ args[i].ends_with(".tres")) {
// Only consider the positional argument to be a scene path if it ends with
// a file extension associated with Godot scenes. This makes it possible
// for projects to parse command-line arguments for custom CLI arguments