Implement strings for GameAction errors

This commit is contained in:
Ted John committed 2020-04-26 14:35:05 +01:00
1 parent 2ad37db817
commit 83fe0cf5c5
18 files changed
+135 -41

No files matched your search

+4 -1
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)
{