Merge branch 'master' into jgrpp

# Conflicts:
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/network/core/os_abstraction.h
#	src/network/core/packet.cpp
#	src/network/core/tcp_content.h
#	src/network/core/udp.cpp
#	src/table/currency_settings.ini
#	src/table/settings.h.preamble
This commit is contained in:
Jonathan G Rennison
2021-04-30 00:46:46 +01:00
7 changed files with 180 additions and 17 deletions

View File

@@ -47,8 +47,8 @@ void ShowNewGRFError()
if (_game_mode == GM_MENU) return;
for (const GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
/* We only want to show fatal errors */
if (c->error == nullptr || c->error->severity != STR_NEWGRF_ERROR_MSG_FATAL) continue;
/* Only show Fatal and Error level messages */
if (c->error == nullptr || (c->error->severity != STR_NEWGRF_ERROR_MSG_FATAL && c->error->severity != STR_NEWGRF_ERROR_MSG_ERROR)) continue;
SetDParam (0, c->error->message != STR_NULL ? c->error->message : STR_JUST_RAW_STRING);
SetDParamStr(1, c->error->custom_message.c_str());
@@ -57,7 +57,11 @@ void ShowNewGRFError()
for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(4 + i, c->error->param_value[i]);
}
ShowErrorMessage(STR_NEWGRF_ERROR_FATAL_POPUP, INVALID_STRING_ID, WL_CRITICAL);
if (c->error->severity == STR_NEWGRF_ERROR_MSG_FATAL) {
ShowErrorMessage(STR_NEWGRF_ERROR_FATAL_POPUP, INVALID_STRING_ID, WL_CRITICAL);
} else {
ShowErrorMessage(STR_NEWGRF_ERROR_POPUP, INVALID_STRING_ID, WL_ERROR);
}
break;
}
}