mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add `STR_ERR_INVALID_COLOUR`
This commit is contained in:
parent
2b1d5ad9b7
commit
322321645b
|
@ -3696,6 +3696,7 @@ STR_6621 :Restrict
|
|||
STR_6622 :Restrict object to the Scenario Editor and Sandbox mode.
|
||||
STR_6623 :Type ‘help’ for a list of available commands. Type ‘hide’ to hide the console.
|
||||
STR_6624 :Tile Inspector: Sort elements
|
||||
STR_6625 :Invalid colour
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
|
|
@ -67,7 +67,7 @@ GameActions::Result BannerSetColourAction::QueryExecute(bool isExecuting) const
|
|||
if (_primaryColour > 31)
|
||||
{
|
||||
LOG_ERROR("Invalid primary colour %u", _primaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (!MapCanBuildAt({ _loc.x, _loc.y, _loc.z - 16 }))
|
||||
|
|
|
@ -73,7 +73,8 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
if (_parameter > COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid primary colour %u", _parameter);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -81,7 +82,8 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
if (_parameter > 13)
|
||||
{
|
||||
LOG_ERROR("Invalid text colour %u", _parameter);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
break;
|
||||
case BannerSetStyleType::NoEntry:
|
||||
|
|
|
@ -73,17 +73,17 @@ GameActions::Result LargeSceneryPlaceAction::Query() const
|
|||
if (_primaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid primary colour %u", _primaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
if (_secondaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid secondary colour %u", _secondaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
if (_tertiaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid tertiary colour %u", _tertiaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (_sceneryType >= MAX_LARGE_SCENERY_OBJECTS)
|
||||
|
|
|
@ -76,19 +76,19 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting)
|
|||
if (_primaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid primary colour %u", _primaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (_secondaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid secondary colour %u", _secondaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (_tertiaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid tertiary colour %u", _tertiaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
auto largeElement = MapGetLargeScenerySegment(_loc, _tileIndex);
|
||||
|
|
|
@ -100,7 +100,8 @@ GameActions::Result RideCreateAction::Query() const
|
|||
if (_colour1 >= colourPresets.count)
|
||||
{
|
||||
LOG_ERROR("Can't create ride, invalid colour preset %d", _colour1);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex);
|
||||
|
|
|
@ -66,7 +66,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
{
|
||||
LOG_ERROR("Invalid track colour %u", _index);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
break;
|
||||
case RideSetAppearanceType::VehicleColourBody:
|
||||
|
@ -76,7 +76,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
{
|
||||
LOG_ERROR("Invalid vehicle colour %u", _index);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
break;
|
||||
case RideSetAppearanceType::VehicleColourScheme:
|
||||
|
|
|
@ -112,7 +112,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
|||
if (_colour >= presetList->count && _colour != 255 && _colour != 0)
|
||||
{
|
||||
LOG_ERROR("Unknown vehicle colour preset. colour = %d", _colour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -97,13 +97,13 @@ GameActions::Result WallSetColourAction::Query() const
|
|||
if (_primaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Primary colour invalid: colour = %d", _primaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (_secondaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Secondary colour invalid: colour = %d", _secondaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_INVALID_COLOUR);
|
||||
}
|
||||
|
||||
if (wallEntry->flags & WALL_SCENERY_HAS_TERTIARY_COLOUR)
|
||||
|
|
|
@ -4041,6 +4041,8 @@ enum : uint16_t
|
|||
|
||||
STR_SHORTCUT_SORT_ELEMENTS = 6624,
|
||||
|
||||
STR_ERR_INVALID_COLOUR = 6625,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue