From 75de0790bc3925b8752e4c48259bd68a918db33e Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 8 Nov 2020 14:30:56 +0100 Subject: [PATCH] Improve message when asking for a game_path with no filepicker available --- data/language/en-GB.txt | 1 + src/openrct2/config/Config.cpp | 8 +++++++- src/openrct2/localisation/StringIds.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 014091d2a7..e285584f78 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3652,6 +3652,7 @@ STR_6395 :Maintenance STR_6396 :Disable screensaver and monitor power saving STR_6397 :{SMALLFONT}{BLACK}If checked, screensaver and other monitor power saving features will be inhibited while OpenRCT2 is running. STR_6398 :File contains unsupported ride types. Please update to a newer version of OpenRCT2. +STR_6399 :OpenRCT2 needs files from the original RollerCoaster Tycoon 2 in order to work. Please set the "game_path" variable in config.ini to the directory where you installed RollerCoaster Tycoon 2, then restart OpenRCT2. ############# # Scenarios # diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 68bf5cc7ba..551ca9b009 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -794,12 +794,18 @@ bool config_find_or_browse_install_directory() return false; } + auto uiContext = GetContext()->GetUiContext(); + if (!uiContext->HasFilePicker()) + { + uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES_MANUAL, nullptr)); + return false; + } + try { const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat"; while (true) { - auto uiContext = GetContext()->GetUiContext(); uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES, nullptr)); std::string installPath = uiContext->ShowDirectoryDialog(format_string(STR_PICK_RCT2_DIR, nullptr)); diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 85612b9e4b..62f13a37ab 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3903,6 +3903,9 @@ enum STR_DISABLE_SCREENSAVER_TIP = 6397, STR_FILE_CONTAINS_UNSUPPORTED_RIDE_TYPES = 6398, + + STR_NEEDS_RCT2_FILES_MANUAL = 6399, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings };