Add event flag for removing invalid RVs during load

This commit is contained in:
Jonathan G Rennison
2024-02-21 22:01:34 +00:00
parent 675b31887a
commit 53b06a3d04
3 changed files with 5 additions and 0 deletions

View File

@@ -23,6 +23,7 @@
#include "../error.h"
#include "../strings_func.h"
#include "../economy_base.h"
#include "../event_logs.h"
#include "../3rdparty/cpp-btree/btree_map.h"
#include "../core/format.hpp"
@@ -575,6 +576,8 @@ void AfterLoadVehiclesRemoveAnyFoundInvalid()
SetDParam(0, (uint)_load_invalid_vehicles_to_delete.size());
ShowErrorMessage(STR_WARNING_LOADGAME_REMOVED_UNCORRECTABLE_VEHICLES, INVALID_STRING_ID, WL_CRITICAL);
GroupStatistics::UpdateAfterLoad();
RegisterGameEvents(GEF_RM_INVALID_RV);
}
for (Vehicle *v : _load_invalid_vehicles_to_delete) {