summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium42@users.noreply.github.com>2021-04-12 20:53:04 +0200
committerGitHub <noreply@github.com>2021-04-12 20:53:04 +0200
commitc4bccd4f70cc369d5b3867f8dac74b0ac1d9ea5c (patch)
tree0f799c0cc08012d4d1e1fcfc3469a11e77fc87ab /src/console_cmds.cpp
parente722ea89f0ebda60fd251ee2ba33635df367acd4 (diff)
downloadopenttd-c4bccd4f70cc369d5b3867f8dac74b0ac1d9ea5c.tar.xz
Fix #8874: show a warning when a NewGRF scan is requested multiple times from the console (#9022)
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index f50644cf5..cebf70198 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1351,7 +1351,9 @@ DEF_CONSOLE_CMD(ConRescanNewGRF)
return true;
}
- RequestNewGRFScan();
+ if (!RequestNewGRFScan()) {
+ IConsoleWarning("NewGRF scanning is already running. Please wait until completed to run again.");
+ }
return true;
}