1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Merge pull request #8836 from duncanspumpkin/fix_error_msg

Fix Game Actions Error Messages
This commit is contained in:
Duncan
2019-03-09 19:49:44 +00:00
committed by GitHub
7 changed files with 11 additions and 11 deletions

View File

@@ -123,7 +123,8 @@ public:
_coords.x, _coords.y, _height, zCorner, &map_set_land_height_clear_func, { 0b1111, 0 }, 0, nullptr, _coords.x, _coords.y, _height, zCorner, &map_set_land_height_clear_func, { 0b1111, 0 }, 0, nullptr,
CREATE_CROSSING_MODE_NONE)) CREATE_CROSSING_MODE_NONE))
{ {
return std::make_unique<GameActionResult>(GA_ERROR::DISALLOWED, gGameCommandErrorText); return std::make_unique<GameActionResult>(
GA_ERROR::DISALLOWED, STR_NONE, gGameCommandErrorText, gCommonFormatArgs);
} }
tileElement = CheckUnremovableObstructions(surfaceElement, zCorner); tileElement = CheckUnremovableObstructions(surfaceElement, zCorner);

View File

@@ -150,9 +150,7 @@ public:
if (!map_can_construct_at(floor2(_x, 32), floor2(_y, 32), baseHeight, clearanceHeight, { 0b1111, 0 })) if (!map_can_construct_at(floor2(_x, 32), floor2(_y, 32), baseHeight, clearanceHeight, { 0b1111, 0 }))
{ {
res->Error = GA_ERROR::NO_CLEARANCE; return MakeResult(GA_ERROR::NO_CLEARANCE, res->ErrorTitle, gGameCommandErrorText, gCommonFormatArgs);
res->ErrorMessage = STR_NONE;
return res;
} }
if (gMapGroundFlags & ELEMENT_IS_UNDERWATER) if (gMapGroundFlags & ELEMENT_IS_UNDERWATER)

View File

@@ -101,7 +101,8 @@ public:
if (!map_can_construct_at(entranceLoc.x, entranceLoc.y, zLow, zHigh, { 0b1111, 0 })) if (!map_can_construct_at(entranceLoc.x, entranceLoc.y, zLow, zHigh, { 0b1111, 0 }))
{ {
return std::make_unique<GameActionResult>(GA_ERROR::NO_CLEARANCE, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_NONE); return std::make_unique<GameActionResult>(
GA_ERROR::NO_CLEARANCE, STR_CANT_BUILD_PARK_ENTRANCE_HERE, gGameCommandErrorText, gCommonFormatArgs);
} }
// Check that entrance element does not already exist at this location // Check that entrance element does not already exist at this location

View File

@@ -34,7 +34,7 @@ public:
{ {
} }
RideCreateGameActionResult(GA_ERROR error, rct_string_id message) RideCreateGameActionResult(GA_ERROR error, rct_string_id message)
: GameActionResult(error, message) : GameActionResult(error, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, message)
{ {
} }

View File

@@ -186,8 +186,8 @@ public:
int8_t clear_z = (z / 8) + (_isExit ? 5 : 7); int8_t clear_z = (z / 8) + (_isExit ? 5 : 7);
auto cost = MONEY32_UNDEFINED; auto cost = MONEY32_UNDEFINED;
if (!map_can_construct_with_clear_at( if (!map_can_construct_with_clear_at(
_loc.x, _loc.y, z / 8, clear_z, &map_place_non_scenery_clear_func, { 0b1111, 0 }, GetFlags(), &cost, _loc.x, _loc.y, z / 8, clear_z, &map_place_non_scenery_clear_func, { 0b1111, 0 },
CREATE_CROSSING_MODE_NONE)) GetFlags() | GAME_COMMAND_FLAG_APPLY, &cost, CREATE_CROSSING_MODE_NONE))
{ {
return MakeResult(GA_ERROR::NO_CLEARANCE, errorTitle, gGameCommandErrorText, gCommonFormatArgs); return MakeResult(GA_ERROR::NO_CLEARANCE, errorTitle, gGameCommandErrorText, gCommonFormatArgs);
} }

View File

@@ -375,8 +375,8 @@ public:
money32 clearCost = 0; money32 clearCost = 0;
if (!map_can_construct_with_clear_at( if (!map_can_construct_with_clear_at(
_loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags(), &clearCost, _loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags() | GAME_COMMAND_FLAG_APPLY,
CREATE_CROSSING_MODE_NONE)) &clearCost, CREATE_CROSSING_MODE_NONE))
{ {
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_POSITION_THIS_HERE, gGameCommandErrorText, gCommonFormatArgs); return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_POSITION_THIS_HERE, gGameCommandErrorText, gCommonFormatArgs);
} }

View File

@@ -31,7 +31,7 @@
// This string specifies which version of network stream current build uses. // This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within // It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version. // single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "55" #define NETWORK_STREAM_VERSION "56"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr; static Peep* _pickup_peep = nullptr;