diff --git a/src/openrct2/actions/LandBuyRightsAction.cpp b/src/openrct2/actions/LandBuyRightsAction.cpp index a5c299f66d..c48d333031 100644 --- a/src/openrct2/actions/LandBuyRightsAction.cpp +++ b/src/openrct2/actions/LandBuyRightsAction.cpp @@ -113,7 +113,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& { if (_setting >= LandBuyRightSetting::Count) { - LOG_ERROR("Tried calling buy land rights with an incorrect setting %u", _setting); + LOG_ERROR("Invalid land buying setting %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE); } diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index 759af38287..d6b86e9472 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -130,7 +130,9 @@ GameActions::Result RideCreateAction::Execute() const const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { - LOG_ERROR("Invalid request for ride %u", rideIndex); + LOG_ERROR( + "Ride entry not found for index rideEntryIndex %u (from rideType %u, subType %u)", rideEntryIndex, _rideType, + _subType); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_UNKNOWN_OBJECT_TYPE); } diff --git a/src/openrct2/actions/RideEntranceExitRemoveAction.cpp b/src/openrct2/actions/RideEntranceExitRemoveAction.cpp index b4bdde8ec9..232f8ccad9 100644 --- a/src/openrct2/actions/RideEntranceExitRemoveAction.cpp +++ b/src/openrct2/actions/RideEntranceExitRemoveAction.cpp @@ -100,8 +100,8 @@ GameActions::Result RideEntranceExitRemoveAction::Query() const else if (entranceElement == nullptr) { LOG_ERROR( - "Entrance element not found. x = %d, y = %d, ride = %u, station = %u", _loc.x, _loc.y, _rideIndex.ToUnderlying(), - _stationNum.ToUnderlying()); + "Entrance/exit element not found. x = %d, y = %d, ride = %u, station = %u", _loc.x, _loc.y, + _rideIndex.ToUnderlying(), _stationNum.ToUnderlying()); return GameActions::Result( GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_ENTRANCE_ELEMENT_NOT_FOUND); } @@ -138,8 +138,8 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const else if (entranceElement == nullptr) { LOG_ERROR( - "Entrance element not found. x = %d, y = %d, ride = %u, station = %d", _loc.x, _loc.y, _rideIndex.ToUnderlying(), - _stationNum); + "Entrance/exit element not found. x = %d, y = %d, ride = %u, station = %d", _loc.x, _loc.y, + _rideIndex.ToUnderlying(), _stationNum); return GameActions::Result( GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_ENTRANCE_ELEMENT_NOT_FOUND); } diff --git a/src/openrct2/actions/RideSetVehicleAction.cpp b/src/openrct2/actions/RideSetVehicleAction.cpp index a852bfc866..fc9892e309 100644 --- a/src/openrct2/actions/RideSetVehicleAction.cpp +++ b/src/openrct2/actions/RideSetVehicleAction.cpp @@ -66,7 +66,7 @@ GameActions::Result RideSetVehicleAction::Query() const { if (_type >= RideSetVehicleType::Count) { - LOG_ERROR("Invalid type %d", _type); + LOG_ERROR("Invalid ride vehicle type %d", _type); } auto errTitle = SetVehicleTypeErrorTitle[EnumValue(_type)]; diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index 2cf1857ca7..87043377e8 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -39,7 +39,7 @@ GameActions::Result ScenarioSetSettingAction::Query() const { if (_setting >= ScenarioSetSetting::Count) { - LOG_ERROR("Invalid setting: %u", _setting); + LOG_ERROR("Invalid scenario setting: %u", _setting); return GameActions::Result( GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE); } diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 421383008a..3eadb187b9 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -85,9 +85,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const if (_staffType >= static_cast(StaffType::Count)) { - // Invalid staff type. - LOG_ERROR("Tried to use invalid staff type: %u", static_cast(_staffType)); - + LOG_ERROR("Invalid staff type %u", static_cast(_staffType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } @@ -100,18 +98,14 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const { if (static_cast(_entertainerType) >= static_cast(EntertainerCostume::Count)) { - // Invalid entertainer costume - LOG_ERROR("Tried to use invalid entertainer type: %u", static_cast(_entertainerType)); - + LOG_ERROR("Invalid entertainer type %u", static_cast(_entertainerType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } uint32_t availableCostumes = StaffGetAvailableEntertainerCostumes(); if (!(availableCostumes & (1 << static_cast(_entertainerType)))) { - // Entertainer costume unavailable - LOG_ERROR("Tried to use unavailable entertainer type: %u", static_cast(_entertainerType)); - + LOG_ERROR("Unavailable entertainer costume %u", static_cast(_entertainerType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } } diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index 7e3205cdfd..658f38f2ea 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -58,7 +58,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (surfaceObj == nullptr) { - LOG_ERROR("Invalid surface style."); + LOG_ERROR("Invalid surface style %u", _surfaceStyle); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_UNKNOWN_OBJECT_TYPE); } @@ -70,7 +70,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (edgeObj == nullptr) { - LOG_ERROR("Invalid edge style."); + LOG_ERROR("Invalid edge style %u", _edgeStyle); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_UNKNOWN_OBJECT_TYPE); } diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 21188c1508..d35a951756 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -72,9 +72,9 @@ GameActions::Result TrackPlaceAction::Query() const auto ride = GetRide(_rideIndex); if (ride == nullptr) { - LOG_ERROR("Invalid ride for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); + LOG_ERROR("Ride not found for rideIndex %d", _rideIndex.ToUnderlying()); 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_RIDE_NOT_FOUND); } const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 845afde32d..ed25b558d2 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -129,7 +129,7 @@ GameActions::Result TrackRemoveAction::Query() const auto ride = GetRide(rideIndex); if (ride == nullptr) { - LOG_ERROR("Ride not found. ride index = %d.", rideIndex); + LOG_ERROR("Ride not found for rideIndex %d.", rideIndex); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_RIDE_NOT_FOUND); } diff --git a/src/openrct2/actions/WallSetColourAction.cpp b/src/openrct2/actions/WallSetColourAction.cpp index 917d120a6e..7690a8bc61 100644 --- a/src/openrct2/actions/WallSetColourAction.cpp +++ b/src/openrct2/actions/WallSetColourAction.cpp @@ -87,7 +87,9 @@ GameActions::Result WallSetColourAction::Query() const auto* wallEntry = wallElement->GetEntry(); if (wallEntry == nullptr) { - LOG_ERROR("Could not find wall object"); + LOG_ERROR( + "Wall element does not have wall entry at x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, + _loc.direction); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -139,7 +141,9 @@ GameActions::Result WallSetColourAction::Execute() const auto* wallEntry = wallElement->GetEntry(); if (wallEntry == nullptr) { - LOG_ERROR("Could not find wall object"); + LOG_ERROR( + "Wall element does not have wall entry at x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, + _loc.direction); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); }