mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Fix empty error messages (#21351)
* Add `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE` * Add `STR_ERR_TRACK_ON_THIS_TILE_NEEDS_WATER` * Return existing `GameAction::Result` * Add `STR_ERR_ACTION_INVALID_FOR_THAT_STAFF_TYPE` I am open to suggestions for a different message! Originally this was going to be STR_ERR_WRONG_STAFF_TYPE but I thought that was confusing because the game action arguments do not specify a staff type. We want it to mean "the staff ID you specified is the wrong StaffType for this game action". * Refactor `StaffSetColour()` to return `Result` * Remove unnecessary arguments when `Status` is `Ok` * Refactor `SwapTileElements()` to return `Result` Also add STR_ERR_CANT_SWAP_TILE_ELEMENT_WITH_ITSELF * Format code * Use `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE` in title * Format code using Github web editor * Format indentation
This commit is contained in:
@@ -1428,7 +1428,7 @@ static std::optional<GameActions::Result> TrackDesignPlaceEntrances(
|
||||
auto res = RideEntranceExitPlaceAction::TrackPlaceQuery(newCoords, false);
|
||||
if (res.Error != GameActions::Status::Ok)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return res;
|
||||
}
|
||||
|
||||
totalCost += res.Cost;
|
||||
@@ -1742,7 +1742,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi
|
||||
ride.Delete();
|
||||
}
|
||||
|
||||
auto res = GameActions::Result(GameActions::Status::Ok, STR_NONE, STR_NONE);
|
||||
auto res = GameActions::Result();
|
||||
res.Cost = totalCost;
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user