mirror of https://github.com/OpenRCT2/OpenRCT2.git
Change "invalid game command" messages
This commit is contained in:
parent
125fa12d6f
commit
13abc3441c
|
@ -39,7 +39,7 @@ GameActions::Result GameSetSpeedAction::Query() const
|
|||
|
||||
if (!IsValidSpeed(_speed))
|
||||
{
|
||||
LOG_ERROR("Invalid game command for speed %u", _speed);
|
||||
LOG_ERROR("Invalid speed %u", _speed);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ GameActions::Result GameSetSpeedAction::Execute() const
|
|||
|
||||
if (!IsValidSpeed(_speed))
|
||||
{
|
||||
LOG_ERROR("Invalid game command for speed %u", _speed);
|
||||
LOG_ERROR("Invalid speed %u", _speed);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ GameActions::Result GuestSetNameAction::Query() const
|
|||
auto guest = TryGetEntity<Guest>(_spriteIndex);
|
||||
if (guest == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Guest not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ GameActions::Result GuestSetNameAction::Execute() const
|
|||
auto guest = TryGetEntity<Guest>(_spriteIndex);
|
||||
if (guest == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Guest not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,24 +70,32 @@ GameActions::Result LargeSceneryPlaceAction::Query() const
|
|||
|
||||
money64 supportsCost = 0;
|
||||
|
||||
if (_primaryColour >= COLOUR_COUNT || _secondaryColour >= COLOUR_COUNT || _tertiaryColour >= COLOUR_COUNT)
|
||||
if (_primaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR(
|
||||
"Invalid game command for scenery placement, primaryColour = %u, secondaryColour = %u", _primaryColour,
|
||||
_secondaryColour);
|
||||
LOG_ERROR("Invalid primary colour %u", _primaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
}
|
||||
if (_secondaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid secondary colour %u", _secondaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
}
|
||||
if (_tertiaryColour >= COLOUR_COUNT)
|
||||
{
|
||||
LOG_ERROR("Invalid tertiary colour %u", _tertiaryColour);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
if (_sceneryType >= MAX_LARGE_SCENERY_OBJECTS)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType);
|
||||
LOG_ERROR("Invalid sceneryType %u", _sceneryType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(_sceneryType);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType);
|
||||
LOG_ERROR("Scenery entry not found for sceneryType %u", _sceneryType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
@ -201,7 +209,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const
|
|||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(_sceneryType);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType);
|
||||
LOG_ERROR("Scenery entry not found for sceneryType = %u", _sceneryType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ GameActions::Result LargeSceneryRemoveAction::Query() const
|
|||
TileElement* tileElement = FindLargeSceneryElement(_loc, _tileIndex);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y);
|
||||
LOG_ERROR("No large scenery element to remove at x = %d, y = %d", _loc.x, _loc.y);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const
|
|||
TileElement* tileElement = FindLargeSceneryElement(_loc, _tileIndex);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y);
|
||||
LOG_ERROR("No large scenery element to remove at %d, y = %d", _loc.x, _loc.y);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ GameActions::Result RideDemolishAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DEMOLISH_RIDE, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ GameActions::Result RideDemolishAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DEMOLISH_RIDE, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ GameActions::Result RideFreezeRatingAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
case RideSetAppearanceType::TrackColourSupports:
|
||||
if (_index >= std::size(ride->track_colour))
|
||||
{
|
||||
LOG_ERROR("Invalid game command, index %d out of bounds", _index);
|
||||
LOG_ERROR("Invalid track colour %u", _index);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
case RideSetAppearanceType::VehicleColourTertiary:
|
||||
if (_index >= std::size(ride->vehicle_colours))
|
||||
{
|
||||
LOG_ERROR("Invalid game command, index %d out of bounds", _index);
|
||||
LOG_ERROR("Invalid vehicle colour %u", _index);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ GameActions::Result RideSetAppearanceAction::Query() const
|
|||
case RideSetAppearanceType::SellingItemColourIsRandom:
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid game command, type %d not recognised", _type);
|
||||
LOG_ERROR("Invalid ride appearance type %u", _type);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ GameActions::Result RideSetAppearanceAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ GameActions::Result RideSetNameAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ GameActions::Result RideSetNameAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,14 +54,14 @@ GameActions::Result RideSetPriceAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
const auto* rideEntry = GetRideEntryByIndex(ride->subtype);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride entry not found for ride subtype %u", ride->subtype);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_OBJECT_ENTRY_NOT_FOUND);
|
||||
}
|
||||
|
@ -77,14 +77,14 @@ GameActions::Result RideSetPriceAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
const auto* rideEntry = GetRideEntryByIndex(ride->subtype);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride entry not found for ride subtype %u", ride->subtype);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_OBJECT_ENTRY_NOT_FOUND);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ GameActions::Result RideSetStatusAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
res.Error = GameActions::Status::InvalidParameters;
|
||||
res.ErrorTitle = STR_RIDE_DESCRIPTION_UNKNOWN;
|
||||
res.ErrorMessage = STR_NONE;
|
||||
|
@ -124,7 +124,7 @@ GameActions::Result RideSetStatusAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for ride %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
res.Error = GameActions::Status::InvalidParameters;
|
||||
res.ErrorTitle = STR_RIDE_DESCRIPTION_UNKNOWN;
|
||||
res.ErrorMessage = STR_NONE;
|
||||
|
|
|
@ -73,7 +73,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ GameActions::Result RideSetVehicleAction::Execute() const
|
|||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying());
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ GameActions::Result SignSetNameAction::Query() const
|
|||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting sign name, banner id = %d", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_SIGN, STR_NONE);
|
||||
}
|
||||
return GameActions::Result();
|
||||
|
@ -59,7 +59,7 @@ GameActions::Result SignSetNameAction::Execute() const
|
|||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting sign name, banner id = %d", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_SIGN, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,12 +59,13 @@ GameActions::Result SignSetStyleAction::Query() const
|
|||
TileElement* tileElement = BannerGetTileElement(_bannerIndex);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex);
|
||||
LOG_ERROR("Banner tile element not found for bannerIndex %u", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
if (tileElement->GetType() != TileElementType::LargeScenery)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting sign style, banner id '%d' is not large", _bannerIndex);
|
||||
LOG_ERROR(
|
||||
"Tile element has type %u, expected %d (LargeScenery)", tileElement->GetType(), TileElementType::LargeScenery);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +75,7 @@ GameActions::Result SignSetStyleAction::Query() const
|
|||
|
||||
if (wallElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex);
|
||||
LOG_ERROR("Wall element not found for bannerIndex", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,14 +71,14 @@ GameActions::Result StaffSetCostumeAction::Query() const
|
|||
auto* staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto spriteType = EntertainerCostumeToSprite(_costume);
|
||||
if (EnumValue(spriteType) > std::size(peep_slow_walking_types))
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Invalid entertainer costume %u", _costume);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const
|
|||
auto* staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ GameActions::Result StaffSetNameAction::Query() const
|
|||
auto staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ GameActions::Result StaffSetNameAction::Execute() const
|
|||
auto staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ GameActions::Result StaffSetOrdersAction::Query() const
|
|||
if (staff == nullptr
|
||||
|| (staff->AssignedStaffType != StaffType::Handyman && staff->AssignedStaffType != StaffType::Mechanic))
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff orders can't be changed for staff of type %u", _spriteIndex);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_ACTION_INVALID_FOR_THAT_STAFF_TYPE);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ GameActions::Result StaffSetOrdersAction::Execute() const
|
|||
auto* staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for sprite %u", _spriteIndex);
|
||||
LOG_ERROR("Staff entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
staff->StaffOrders = _ordersId;
|
||||
|
|
|
@ -90,7 +90,7 @@ GameActions::Result TrackDesignAction::Query() const
|
|||
auto ride = GetRide(rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for track placement, ride id = %d", rideIndex);
|
||||
LOG_ERROR("Ride not found for rideIndex %d", rideIndex);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ GameActions::Result TrackDesignAction::Execute() const
|
|||
auto ride = GetRide(rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for track placement, ride id = %d", rideIndex);
|
||||
LOG_ERROR("Ride not found for rideIndex %d", rideIndex);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con
|
|||
TileElement* tileElement = MapGetTrackElementAtOfType(_loc, _trackType);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid game command for setting brakes speed. x = %d, y = %d", _loc.x, _loc.y);
|
||||
LOG_ERROR("Track element of type %u not found at x = %d, y = %d, z = %d", _trackType, _loc.x, _loc.y, _loc.z);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_TILE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue