mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Add LOG_ERROR calls
This commit is contained in:
@@ -83,6 +83,7 @@ GameActions::Result RideCreateAction::Query() const
|
||||
|
||||
if (_rideType >= RIDE_TYPE_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid ride type %d", _rideType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_INVALID_RIDE_TYPE);
|
||||
}
|
||||
@@ -90,6 +91,7 @@ GameActions::Result RideCreateAction::Query() const
|
||||
int32_t rideEntryIndex = RideGetEntryIndex(_rideType, _subType);
|
||||
if (rideEntryIndex >= MAX_RIDE_OBJECTS)
|
||||
{
|
||||
LOG_ERROR("Ride entry not found for rideType %d, subType %d", _rideType, _subType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_INVALID_RIDE_TYPE);
|
||||
}
|
||||
@@ -97,12 +99,14 @@ GameActions::Result RideCreateAction::Query() const
|
||||
const auto& colourPresets = GetRideTypeDescriptor(_rideType).ColourPresets;
|
||||
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);
|
||||
}
|
||||
|
||||
const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Ride entry not found for rideEntryIndex %d", rideEntryIndex);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user