mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Use "X not found for Y" message style
This commit is contained in:
@@ -39,7 +39,7 @@ GameActions::Result BalloonPressAction::Query() const
|
||||
auto balloon = TryGetEntity<Balloon>(_spriteIndex);
|
||||
if (balloon == nullptr)
|
||||
{
|
||||
LOG_ERROR("Tried getting invalid sprite for balloon: %u", _spriteIndex);
|
||||
LOG_ERROR("Balloon not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_BALLOON_NOT_FOUND);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ GameActions::Result BalloonPressAction::Execute() const
|
||||
auto balloon = TryGetEntity<Balloon>(_spriteIndex);
|
||||
if (balloon == nullptr)
|
||||
{
|
||||
LOG_ERROR("Tried getting invalid sprite for balloon: %u", _spriteIndex);
|
||||
LOG_ERROR("Balloon not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_BALLOON_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ GameActions::Result BannerPlaceAction::Query() const
|
||||
auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry<BannerSceneryEntry>(_bannerType);
|
||||
if (bannerEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner object type. bannerType = %u", _bannerType);
|
||||
LOG_ERROR("Banner entry not found for bannerType %u", _bannerType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ GameActions::Result BannerPlaceAction::Execute() const
|
||||
auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry<BannerSceneryEntry>(_bannerType);
|
||||
if (bannerEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner object type. bannerType = %u", _bannerType);
|
||||
LOG_ERROR("Banner entry not found for bannerType %u", _bannerType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ GameActions::Result BannerSetNameAction::Query() const
|
||||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner id, banner id = %d", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE);
|
||||
}
|
||||
return GameActions::Result();
|
||||
@@ -58,7 +58,7 @@ GameActions::Result BannerSetNameAction::Execute() const
|
||||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner id, banner id = %d", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ GameActions::Result BannerSetStyleAction::Query() const
|
||||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner index %u", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ GameActions::Result BannerSetStyleAction::Query() const
|
||||
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find banner index = %u", _bannerIndex);
|
||||
LOG_ERROR("Banner tile element not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
||||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner index %u", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
||||
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find banner index = %u", _bannerIndex);
|
||||
LOG_ERROR("Banner tile element not found for bannerIndex &u", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ GameActions::Result GuestSetFlagsAction::Query() const
|
||||
auto* peep = TryGetEntity<Guest>(_peepId);
|
||||
if (peep == nullptr)
|
||||
{
|
||||
LOG_ERROR("Used invalid sprite index for peep: %u", _peepId.ToUnderlying());
|
||||
LOG_ERROR("Guest entity not found for peepID %u", _peepId.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_THIS, STR_NONE);
|
||||
}
|
||||
return GameActions::Result();
|
||||
@@ -53,7 +53,7 @@ GameActions::Result GuestSetFlagsAction::Execute() const
|
||||
auto* peep = TryGetEntity<Guest>(_peepId);
|
||||
if (peep == nullptr)
|
||||
{
|
||||
LOG_ERROR("Used invalid sprite index for peep: %u", _peepId.ToUnderlying());
|
||||
LOG_ERROR("Guest entity not found for peepID %u", _peepId.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ GameActions::Result GuestSetNameAction::Query() const
|
||||
auto guest = TryGetEntity<Guest>(_spriteIndex);
|
||||
if (guest == nullptr)
|
||||
{
|
||||
LOG_ERROR("Guest not found for spriteIndex %u", _spriteIndex);
|
||||
LOG_ERROR("Guest entity 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("Guest not found for spriteIndex %u", _spriteIndex);
|
||||
LOG_ERROR("Guest entity not found for spriteIndex %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(_sceneryType);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Scenery entry not found for sceneryType %u", _sceneryType);
|
||||
LOG_ERROR("Large scenery entry not found for sceneryType %u", _sceneryType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
@@ -209,7 +209,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(_sceneryType);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Scenery entry not found for sceneryType = %u", _sceneryType);
|
||||
LOG_ERROR("Large scenery entry not found for sceneryType = %u", _sceneryType);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ GameActions::Result RideEntranceExitRemoveAction::Query() const
|
||||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride id %u for entrance/exit removal", _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);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const
|
||||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride id %u for entrance/exit removal", _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);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,8 +159,9 @@ GameActions::Result RideSetSettingAction::Execute() const
|
||||
auto ride = GetRide(_rideIndex);
|
||||
if (ride == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride: #%u.", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
LOG_ERROR("Ride not found for rideIndex %u", _rideIndex.ToUnderlying());
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_RIDE_NOT_FOUND);
|
||||
}
|
||||
|
||||
switch (_setting)
|
||||
|
||||
@@ -103,7 +103,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
||||
auto rideEntry = GetRideEntryByIndex(_value);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride entry, ride->subtype = %d", ride->subtype);
|
||||
LOG_ERROR("Ride entry not found for _value %d", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ GameActions::Result RideSetVehicleAction::Execute() const
|
||||
auto rideEntry = GetRideEntryByIndex(ride->subtype);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride entry, ride->subtype = %d", ride->subtype);
|
||||
LOG_ERROR("Ride entry not found for index %d", ride->subtype);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
uint8_t clampValue = _value;
|
||||
@@ -177,7 +177,7 @@ GameActions::Result RideSetVehicleAction::Execute() const
|
||||
auto rideEntry = GetRideEntryByIndex(ride->subtype);
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid ride entry, ride->subtype = %d", ride->subtype);
|
||||
LOG_ERROR("Ride entry not found for index %d", ride->subtype);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ GameActions::Result SignSetStyleAction::Query() const
|
||||
auto banner = GetBanner(_bannerIndex);
|
||||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid banner id %u", _bannerIndex);
|
||||
LOG_ERROR("Banner not found for bannerIndex %u", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ GameActions::Result StaffFireAction::Query() const
|
||||
auto staff = TryGetEntity<Staff>(_spriteId);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid spriteId %u", _spriteId);
|
||||
LOG_ERROR("Staff entity not found for spriteId %u", _spriteId);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ GameActions::Result StaffFireAction::Execute() const
|
||||
auto staff = TryGetEntity<Staff>(_spriteId);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid spriteId %u", _spriteId);
|
||||
LOG_ERROR("Staff entity not found for spriteId %u", _spriteId);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
WindowCloseByClass(WindowClass::FirePrompt);
|
||||
|
||||
@@ -60,7 +60,7 @@ GameActions::Result StaffSetPatrolAreaAction::QueryExecute(bool executing) const
|
||||
auto staff = TryGetEntity<Staff>(_spriteId);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid entity ID: %u", _spriteId.ToUnderlying());
|
||||
LOG_ERROR("Staff entity not found for spriteID %u", _spriteId.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user