(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.

This commit is contained in:
frosch
2011-02-05 16:07:23 +00:00
parent a4b08dddd1
commit 915e339d0f
5 changed files with 51 additions and 12 deletions

View File

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