1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Use descriptive error strings for two GameAction::Results

- Fix error when setting brake speed outside park
- Fix error when pasting but reached tile limit
This commit is contained in:
Peter Froud
2024-01-25 02:37:02 -08:00
committed by GitHub
parent ff03844b35
commit ce45cb3360
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con
if (!LocationValid(_loc))
{
return GameActions::Result(GameActions::Status::NotOwned, STR_NONE, STR_NONE);
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_THIS, STR_OFF_EDGE_OF_MAP);
}
TileElement* tileElement = MapGetTrackElementAtOfType(_loc, _trackType);

View File

@@ -298,7 +298,7 @@ namespace OpenRCT2::TileInspector
// Make sure there is enough space for the new element
if (!MapCheckCapacityAndReorganise(loc))
{
return GameActions::Result(GameActions::Status::NoFreeElements, STR_NONE, STR_NONE);
return GameActions::Result(GameActions::Status::NoFreeElements, STR_CANT_PASTE, STR_TILE_ELEMENT_LIMIT_REACHED);
}
auto tileLoc = TileCoordsXY(loc);