Skip to content
Permalink
Browse files

Merge pull request #8836 from duncanspumpkin/fix_error_msg

Fix Game Actions Error Messages
  • Loading branch information...
duncanspumpkin committed Mar 9, 2019
2 parents b5f3e96 + 0b98971 commit 1e003fbddb9470a4fcc13edd8f2d55bc3a043c9c
@@ -123,7 +123,8 @@ DEFINE_GAME_ACTION(LandSetHeightAction, GAME_COMMAND_SET_LAND_HEIGHT, GameAction
_coords.x, _coords.y, _height, zCorner, &map_set_land_height_clear_func, { 0b1111, 0 }, 0, nullptr,
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);
@@ -150,9 +150,7 @@ DEFINE_GAME_ACTION(MazeSetTrackAction, GAME_COMMAND_SET_MAZE_TRACK, GameActionRe

if (!map_can_construct_at(floor2(_x, 32), floor2(_y, 32), baseHeight, clearanceHeight, { 0b1111, 0 }))
{
res->Error = GA_ERROR::NO_CLEARANCE;
res->ErrorMessage = STR_NONE;
return res;
return MakeResult(GA_ERROR::NO_CLEARANCE, res->ErrorTitle, gGameCommandErrorText, gCommonFormatArgs);
}

if (gMapGroundFlags & ELEMENT_IS_UNDERWATER)
@@ -101,7 +101,8 @@ DEFINE_GAME_ACTION(PlaceParkEntranceAction, GAME_COMMAND_PLACE_PARK_ENTRANCE, Ga

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
@@ -34,7 +34,7 @@ class RideCreateGameActionResult final : public GameActionResult
{
}
RideCreateGameActionResult(GA_ERROR error, rct_string_id message)
: GameActionResult(error, message)
: GameActionResult(error, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, message)
{
}

@@ -186,8 +186,8 @@ DEFINE_GAME_ACTION(RideEntranceExitPlaceAction, GAME_COMMAND_PLACE_RIDE_ENTRANCE
int8_t clear_z = (z / 8) + (_isExit ? 5 : 7);
auto cost = MONEY32_UNDEFINED;
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,
CREATE_CROSSING_MODE_NONE))
_loc.x, _loc.y, z / 8, clear_z, &map_place_non_scenery_clear_func, { 0b1111, 0 },
GetFlags() | GAME_COMMAND_FLAG_APPLY, &cost, CREATE_CROSSING_MODE_NONE))
{
return MakeResult(GA_ERROR::NO_CLEARANCE, errorTitle, gGameCommandErrorText, gCommonFormatArgs);
}
@@ -375,8 +375,8 @@ DEFINE_GAME_ACTION(SmallSceneryPlaceAction, GAME_COMMAND_PLACE_SCENERY, GameActi
money32 clearCost = 0;

if (!map_can_construct_with_clear_at(
_loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags(), &clearCost,
CREATE_CROSSING_MODE_NONE))
_loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags() | GAME_COMMAND_FLAG_APPLY,
&clearCost, CREATE_CROSSING_MODE_NONE))
{
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_POSITION_THIS_HERE, gGameCommandErrorText, gCommonFormatArgs);
}
@@ -31,7 +31,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "55"
#define NETWORK_STREAM_VERSION "56"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION

static Peep* _pickup_peep = nullptr;

0 comments on commit 1e003fb

Please sign in to comment.
You can’t perform that action at this time.