Codechange: Use EncodedString for error messages. (#13569)
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#include "../clear_map.h"
|
||||
#include "../vehicle_func.h"
|
||||
#include "../string_func.h"
|
||||
#include "../strings_func.h"
|
||||
#include "../window_func.h"
|
||||
#include "../roadveh.h"
|
||||
#include "../roadveh_cmd.h"
|
||||
#include "../train.h"
|
||||
@@ -70,7 +72,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "../safeguards.h"
|
||||
#include "../window_func.h"
|
||||
|
||||
extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY);
|
||||
|
||||
@@ -722,8 +723,8 @@ bool AfterLoadGame()
|
||||
}
|
||||
|
||||
switch (gcf_res) {
|
||||
case GLC_COMPATIBLE: ShowErrorMessage(STR_NEWGRF_COMPATIBLE_LOAD_WARNING, INVALID_STRING_ID, WL_CRITICAL); break;
|
||||
case GLC_NOT_FOUND: ShowErrorMessage(STR_NEWGRF_DISABLED_WARNING, INVALID_STRING_ID, WL_CRITICAL); _pause_mode = PauseMode::Error; break;
|
||||
case GLC_COMPATIBLE: ShowErrorMessage(GetEncodedString(STR_NEWGRF_COMPATIBLE_LOAD_WARNING), {}, WL_CRITICAL); break;
|
||||
case GLC_NOT_FOUND: ShowErrorMessage(GetEncodedString(STR_NEWGRF_DISABLED_WARNING), {}, WL_CRITICAL); _pause_mode = PauseMode::Error; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@@ -1952,7 +1953,7 @@ bool AfterLoadGame()
|
||||
* There would be trams without tram track under causing crashes sooner or later. */
|
||||
for (RoadVehicle *v : RoadVehicle::Iterate()) {
|
||||
if (v->First() == v && EngInfo(v->engine_type)->misc_flags.Test(EngineMiscFlag::RoadIsTram)) {
|
||||
ShowErrorMessage(STR_WARNING_LOADGAME_REMOVED_TRAMS, INVALID_STRING_ID, WL_CRITICAL);
|
||||
ShowErrorMessage(GetEncodedString(STR_WARNING_LOADGAME_REMOVED_TRAMS), {}, WL_CRITICAL);
|
||||
delete v;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user