1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Implement strings for GameAction errors

This commit is contained in:
Ted John
2020-03-03 21:11:26 +00:00
parent 2ad37db817
commit 83fe0cf5c5
18 changed files with 135 additions and 41 deletions

View File

@@ -1481,7 +1481,10 @@ bool map_can_construct_with_clear_at(
uint8_t crossingMode)
{
GameActionResult::Ptr res = map_can_construct_with_clear_at(pos, clearFunc, quarterTile, flags, crossingMode);
gGameCommandErrorText = res->ErrorMessage;
if (auto message = std::get_if<rct_string_id>(&res->ErrorMessage))
gGameCommandErrorText = *message;
else
gGameCommandErrorText = STR_NONE;
std::copy(res->ErrorMessageArgs.begin(), res->ErrorMessageArgs.end(), gCommonFormatArgs);
if (price != nullptr)
{