diff options
author | frosch <frosch@openttd.org> | 2011-02-05 16:07:23 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-02-05 16:07:23 +0000 |
commit | 915e339d0f395305ec722925bfd8f4fdd09f30a3 (patch) | |
tree | cf6982b3ae86b563f6868379f8f6240b658d6130 /src/terraform_gui.cpp | |
parent | a4b08dddd10062f49352b5aee49e392f95e281e2 (diff) | |
download | openttd-915e339d0f395305ec722925bfd8f4fdd09f30a3.tar.xz |
(svn r21975) -Add: console command to reset the engine pool. It removes the traces of engines which are no longer associated to a NewGRF, and can be used to e.g. 'fix' scenarios which were screwed up by the author. You can only use it when there are no vehicles in the game though.
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r-- | src/terraform_gui.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index bf26910e3..30589f2af 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -31,6 +31,7 @@ #include "newgrf_object.h" #include "object.h" #include "hotkeys.h" +#include "engine_base.h" #include "table/strings.h" @@ -560,6 +561,9 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed) if (!st->IsInUse()) delete st; } + /* Now that all vehicles are gone, we can reset the engine pool. Maybe it reduces some NewGRF changing-mess */ + EngineOverrideManager::ResetToCurrentNewGRFConfig(); + MarkWholeScreenDirty(); } } |