From 1b3ce25c07f024e2aaac4227290509e810dc8d32 Mon Sep 17 00:00:00 2001 From: damfr Date: Tue, 20 Nov 2018 14:07:13 +0100 Subject: [PATCH] Add: Warning in save description when showing a save whith a different id --- src/fios_gui.cpp | 8 ++++++++ src/lang/english.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index e149d07b47..893d3ced8e 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -463,6 +463,14 @@ public: y = DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, r.bottom - WD_FRAMERECT_BOTTOM, _load_check_data.error, TC_RED); } else { + /* Warning if save unique id differ when saving */ + if (this->fop == SLO_SAVE && + _load_check_data.settings.game_creation.generation_unique_id != 0 && /* Don't warn if the save has no id (old save) */ + _load_check_data.settings.game_creation.generation_unique_id != _settings_game.game_creation.generation_unique_id) { + y = DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, + y, r.bottom - WD_FRAMERECT_BOTTOM, STR_SAVELOAD_DIFFERENT_ID); + } + /* Mapsize */ SetDParam(0, _load_check_data.map_size_x); SetDParam(1, _load_check_data.map_size_y); diff --git a/src/lang/english.txt b/src/lang/english.txt index 1cfe149219..e5a1eb8705 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2773,6 +2773,7 @@ STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No infor STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter string: +STR_SAVELOAD_DIFFERENT_ID :{RED}Not the same game as you are saving. STR_SAVELOAD_OSKTITLE :{BLACK}Enter a name for the savegame