1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Use specific error stringIDs

This commit is contained in:
Peter Froud
2024-03-17 00:48:36 -07:00
committed by Gymnasiast
parent 276ff311cf
commit 2b1d5ad9b7
30 changed files with 131 additions and 73 deletions

View File

@@ -177,7 +177,8 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::R
if (surfaceElement == nullptr)
{
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
}
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;
@@ -241,7 +242,8 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertExecute(GameActions:
if (surfaceElement == nullptr)
{
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
}
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;