(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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user