mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use specific error stringIDs
This commit is contained in:
parent
276ff311cf
commit
2b1d5ad9b7
|
@ -100,7 +100,7 @@ GameActions::Result BannerPlaceAction::Query() const
|
|||
{
|
||||
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);
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
res.Cost = bannerEntry->price;
|
||||
|
||||
|
@ -128,7 +128,7 @@ GameActions::Result BannerPlaceAction::Execute() const
|
|||
{
|
||||
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);
|
||||
GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto banner = CreateBanner();
|
||||
|
|
|
@ -80,7 +80,7 @@ GameActions::Result BannerSetColourAction::QueryExecute(bool isExecuting) const
|
|||
if (bannerElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No banner 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);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto index = bannerElement->GetIndex();
|
||||
|
|
|
@ -48,7 +48,8 @@ GameActions::Result BannerSetNameAction::Query() const
|
|||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
@ -59,7 +60,8 @@ GameActions::Result BannerSetNameAction::Execute() const
|
|||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
banner->text = _name;
|
||||
|
|
|
@ -50,7 +50,8 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
res.Expenditure = ExpenditureType::Landscaping;
|
||||
|
@ -62,7 +63,8 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Banner tile element not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
switch (_type)
|
||||
|
@ -91,7 +93,8 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid banner style type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -104,7 +107,8 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
|||
if (banner == nullptr)
|
||||
{
|
||||
LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
res.Expenditure = ExpenditureType::Landscaping;
|
||||
|
@ -133,7 +137,8 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
|||
if (bannerElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Tile element was not a banner.");
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
banner->flags &= ~BANNER_FLAG_NO_ENTRY;
|
||||
|
@ -148,7 +153,8 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
|||
}
|
||||
default:
|
||||
LOG_ERROR("Invalid banner style type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto intent = Intent(INTENT_ACTION_UPDATE_BANNER);
|
||||
|
|
|
@ -38,7 +38,7 @@ GameActions::Result ClimateSetAction::Query() const
|
|||
if (_climate >= ClimateType::Count)
|
||||
{
|
||||
LOG_ERROR("Invalid climate type %u", _climate);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
|
|
|
@ -78,7 +78,8 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const
|
|||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
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_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto pathElement = tileElement->AsPath();
|
||||
|
@ -155,7 +156,8 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const
|
|||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
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_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
// No change
|
||||
|
|
|
@ -70,14 +70,16 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const
|
|||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_ERR_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto pathElement = tileElement->AsPath();
|
||||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_ERR_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (!pathElement->AdditionIsGhost() && (GetFlags() & GAME_COMMAND_FLAG_GHOST))
|
||||
|
@ -102,7 +104,8 @@ GameActions::Result FootpathAdditionRemoveAction::Execute() const
|
|||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_ERR_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
pathElement->SetAddition(0);
|
||||
|
|
|
@ -177,7 +177,8 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::R
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
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_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
|
||||
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;
|
||||
|
@ -241,7 +242,8 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertExecute(GameActions:
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
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_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
|
||||
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;
|
||||
|
|
|
@ -101,7 +101,8 @@ GameActions::Result FootpathPlaceAction::Query() const
|
|||
if (_direction != INVALID_DIRECTION && !DirectionValid(_direction))
|
||||
{
|
||||
LOG_ERROR("Direction invalid. direction = %u", _direction);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
FootpathProvisionalRemove();
|
||||
|
@ -323,7 +324,8 @@ GameActions::Result FootpathPlaceAction::ElementInsertQuery(GameActions::Result
|
|||
auto surfaceElement = MapGetSurfaceElementAt(_loc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
|
||||
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;
|
||||
|
@ -386,7 +388,8 @@ GameActions::Result FootpathPlaceAction::ElementInsertExecute(GameActions::Resul
|
|||
auto surfaceElement = MapGetSurfaceElementAt(_loc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
int32_t supportHeight = zLow - surfaceElement->GetBaseZ();
|
||||
res.Cost += supportHeight < 0 ? 20.00_GBP : (supportHeight / PATH_HEIGHT_STEP) * 5.00_GBP;
|
||||
|
|
|
@ -68,7 +68,8 @@ GameActions::Result FootpathRemoveAction::Query() const
|
|||
TileElement* footpathElement = GetFootpathElement();
|
||||
if (footpathElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_ERR_PATH_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
res.Cost = GetRefundPrice(footpathElement);
|
||||
|
|
|
@ -58,7 +58,7 @@ GameActions::Result GuestSetNameAction::Query() const
|
|||
{
|
||||
if (_spriteIndex.ToUnderlying() >= MAX_ENTITIES || _spriteIndex.IsNull())
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto guest = TryGetEntity<Guest>(_spriteIndex);
|
||||
|
|
|
@ -114,14 +114,15 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY&
|
|||
if (_setting >= LandBuyRightSetting::Count)
|
||||
{
|
||||
LOG_ERROR("Invalid land buying setting %u", _setting);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
SurfaceElement* surfaceElement = MapGetSurfaceElementAt(loc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("No surface at x = %d, y = %d", loc.x, loc.y);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[EnumValue(_setting)], STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, _ErrorTitles[EnumValue(_setting)], STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto res = GameActions::Result();
|
||||
|
@ -171,6 +172,6 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY&
|
|||
|
||||
default:
|
||||
LOG_ERROR("Invalid land buying setting %u", _setting);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -608,7 +608,8 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const
|
|||
}
|
||||
default:
|
||||
LOG_ERROR("Invalid map selection type %u", _selectionType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, std::get<StringId>(res.ErrorTitle), STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, std::get<StringId>(res.ErrorTitle), STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
} // switch selectionType
|
||||
|
||||
// Raise / lower the land tool selection area
|
||||
|
|
|
@ -89,7 +89,8 @@ GameActions::Result LargeSceneryPlaceAction::Query() const
|
|||
if (_sceneryType >= MAX_LARGE_SCENERY_OBJECTS)
|
||||
{
|
||||
LOG_ERROR("Invalid sceneryType %u", _sceneryType);
|
||||
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_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(_sceneryType);
|
||||
|
|
|
@ -70,7 +70,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting)
|
|||
if (_loc.x < 0 || _loc.y < 0 || _loc.x > mapSizeMax.x || _loc.y > mapSizeMax.y)
|
||||
{
|
||||
LOG_ERROR("Invalid x / y coordinates: x = %d, y = %d", _loc.x, _loc.y);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
if (_primaryColour >= COLOUR_COUNT)
|
||||
|
|
|
@ -37,11 +37,13 @@ GameActions::Result MapChangeSizeAction::Query() const
|
|||
{
|
||||
if (_targetSize.x > kMaximumMapSizeTechnical || _targetSize.y > kMaximumMapSizeTechnical)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_INCREASE_MAP_SIZE_ANY_FURTHER, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_INCREASE_MAP_SIZE_ANY_FURTHER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
if (_targetSize.x < kMinimumMapSizeTechnical || _targetSize.y < kMinimumMapSizeTechnical)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DECREASE_MAP_SIZE_ANY_FURTHER, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_DECREASE_MAP_SIZE_ANY_FURTHER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ GameActions::Result MazeSetTrackAction::Execute() const
|
|||
{
|
||||
LOG_ERROR("No surface found");
|
||||
res.Error = GameActions::Status::Unknown;
|
||||
res.ErrorMessage = STR_NONE;
|
||||
res.ErrorMessage = STR_ERR_SURFACE_ELEMENT_NOT_FOUND;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ GameActions::Result ParkMarketingAction::Query() const
|
|||
{
|
||||
if (static_cast<size_t>(_type) >= std::size(AdvertisingCampaignPricePerWeek) || _numWeeks >= 256)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_START_MARKETING_CAMPAIGN, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_START_MARKETING_CAMPAIGN, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
if (GetGameState().ParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,8 @@ GameActions::Result PeepSpawnPlaceAction::Query() const
|
|||
auto surfaceMapElement = MapGetSurfaceElementAt(_location);
|
||||
if (surfaceMapElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_ERR_CANT_PLACE_PEEP_SPAWN_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_ERR_CANT_PLACE_PEEP_SPAWN_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
if (surfaceMapElement->GetOwnership() != OWNERSHIP_UNOWNED)
|
||||
{
|
||||
|
|
|
@ -117,7 +117,7 @@ GameActions::Result RideDemolishAction::Execute() const
|
|||
return RefurbishRide(*ride);
|
||||
default:
|
||||
LOG_ERROR("Unknown ride demolish type %d", _modifyType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DO_THIS, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DO_THIS, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const
|
|||
if (_stationNum.ToUnderlying() >= Limits::MaxStationsPerRide)
|
||||
{
|
||||
LOG_ERROR("Invalid station number for ride. stationNum: %u", _stationNum.ToUnderlying());
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating)
|
||||
|
|
|
@ -71,7 +71,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (!RideIsModeValid(*ride) && !GetGameState().Cheats.ShowAllOperatingModes)
|
||||
{
|
||||
LOG_ERROR("Invalid ride mode: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::Departure:
|
||||
|
@ -80,14 +81,16 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (_value > 250)
|
||||
{
|
||||
LOG_ERROR("Invalid minimum waiting time: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::MaxWaitingTime:
|
||||
if (_value > 250)
|
||||
{
|
||||
LOG_ERROR("Invalid maximum waiting time: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::Operation:
|
||||
|
@ -102,7 +105,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (_value > RIDE_INSPECTION_NEVER)
|
||||
{
|
||||
LOG_ERROR("Invalid inspection interval: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::Music:
|
||||
|
@ -114,7 +118,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (musicObj == nullptr)
|
||||
{
|
||||
LOG_ERROR("Invalid music style: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -122,7 +127,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (!RideIsValidLiftHillSpeed(*ride))
|
||||
{
|
||||
LOG_ERROR("Invalid lift hill speed: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::NumCircuits:
|
||||
|
@ -136,7 +142,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
if (!RideIsValidNumCircuits())
|
||||
{
|
||||
LOG_ERROR("Invalid number of circuits: %u", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::RideType:
|
||||
|
@ -148,7 +155,8 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid ride setting %u", static_cast<uint8_t>(_setting));
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
|
|
|
@ -98,7 +98,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
|||
if (!RideIsVehicleTypeValid(*ride))
|
||||
{
|
||||
LOG_ERROR("Invalid vehicle type %d", _value);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
auto rideEntry = GetRideEntryByIndex(_value);
|
||||
if (rideEntry == nullptr)
|
||||
|
@ -119,7 +119,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
|||
|
||||
default:
|
||||
LOG_ERROR("Invalid ride vehicle setting %d", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
|
|
|
@ -115,7 +115,8 @@ GameActions::Result SmallSceneryPlaceAction::Query() const
|
|||
auto maxSizeMax = GetMapSizeMaxXY();
|
||||
if (!_trackDesignDrawingPreview && (_loc.x > maxSizeMax.x || _loc.y > maxSizeMax.y))
|
||||
{
|
||||
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_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<SmallSceneryEntry>(_sceneryType);
|
||||
|
|
|
@ -86,7 +86,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const
|
|||
if (_staffType >= static_cast<uint8_t>(StaffType::Count))
|
||||
{
|
||||
LOG_ERROR("Invalid staff type %u", static_cast<uint32_t>(_staffType));
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
if (GetNumFreeEntities() < 400)
|
||||
|
@ -99,14 +99,16 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const
|
|||
if (static_cast<uint8_t>(_entertainerType) >= static_cast<uint8_t>(EntertainerCostume::Count))
|
||||
{
|
||||
LOG_ERROR("Invalid entertainer type %u", static_cast<uint32_t>(_entertainerType));
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
uint32_t availableCostumes = StaffGetAvailableEntertainerCostumes();
|
||||
if (!(availableCostumes & (1 << static_cast<uint8_t>(_entertainerType))))
|
||||
{
|
||||
LOG_ERROR("Unavailable entertainer costume %u", static_cast<uint32_t>(_entertainerType));
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,14 +50,16 @@ GameActions::Result StaffSetNameAction::Query() const
|
|||
if (_spriteIndex.ToUnderlying() >= MAX_ENTITIES || _spriteIndex.IsNull())
|
||||
{
|
||||
LOG_ERROR("Invalid sprite index %u", _spriteIndex);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto staff = TryGetEntity<Staff>(_spriteIndex);
|
||||
if (staff == nullptr)
|
||||
{
|
||||
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);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
|
@ -69,7 +71,8 @@ GameActions::Result StaffSetNameAction::Execute() const
|
|||
if (staff == nullptr)
|
||||
{
|
||||
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);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_ERR_STAFF_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto curName = staff->GetName();
|
||||
|
|
|
@ -88,7 +88,7 @@ GameActions::Result TrackPlaceAction::Query() const
|
|||
{
|
||||
LOG_ERROR("Invalid direction for track placement, direction = %d", _origin.direction);
|
||||
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_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
if (_rideType != ride->type && !GetGameState().Cheats.AllowArbitraryRideTypeChanges)
|
||||
|
@ -101,7 +101,7 @@ GameActions::Result TrackPlaceAction::Query() const
|
|||
{
|
||||
LOG_ERROR("Invalid ride type for track placement, rideType = %d", _rideType);
|
||||
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_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
||||
auto res = GameActions::Result();
|
||||
|
@ -312,7 +312,8 @@ GameActions::Result TrackPlaceAction::Query() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
|
||||
STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto waterHeight = surfaceElement->GetWaterHeight();
|
||||
|
@ -359,7 +360,9 @@ GameActions::Result TrackPlaceAction::Query() const
|
|||
auto surfaceElement = MapGetSurfaceElementAt(mapLoc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
|
||||
STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (!GetGameState().Cheats.DisableSupportLimits)
|
||||
|
@ -415,7 +418,7 @@ GameActions::Result TrackPlaceAction::Execute() const
|
|||
{
|
||||
LOG_ERROR("Invalid ride for track placement, 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);
|
||||
|
@ -530,7 +533,9 @@ GameActions::Result TrackPlaceAction::Execute() const
|
|||
auto surfaceElement = MapGetSurfaceElementAt(mapLoc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
|
||||
STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
int32_t supportHeight = baseZ - surfaceElement->GetBaseZ();
|
||||
|
|
|
@ -113,7 +113,8 @@ GameActions::Result TrackRemoveAction::Query() const
|
|||
LOG_ERROR(
|
||||
"Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", _origin.x, _origin.y, _origin.z,
|
||||
_origin.direction, _sequence);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (tileElement->AsTrack()->IsIndestructible())
|
||||
|
@ -137,7 +138,8 @@ GameActions::Result TrackRemoveAction::Query() const
|
|||
if (ride->type >= RIDE_TYPE_COUNT)
|
||||
{
|
||||
LOG_ERROR("Ride type not found. ride type = %d.", ride->type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
const auto& ted = GetTrackElementDescriptor(trackType);
|
||||
auto sequenceIndex = tileElement->AsTrack()->GetSequenceIndex();
|
||||
|
@ -145,7 +147,8 @@ GameActions::Result TrackRemoveAction::Query() const
|
|||
if (trackBlock == nullptr)
|
||||
{
|
||||
LOG_ERROR("Track block %d not found for track type %d.", sequenceIndex, trackType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_BLOCK_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto startLoc = _origin;
|
||||
|
@ -208,7 +211,8 @@ GameActions::Result TrackRemoveAction::Query() const
|
|||
LOG_ERROR(
|
||||
"Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", mapLoc.x, mapLoc.y, mapLoc.z,
|
||||
_origin.direction, trackBlock->index);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
int32_t entranceDirections = std::get<0>(ted.SequenceProperties);
|
||||
|
@ -226,7 +230,8 @@ GameActions::Result TrackRemoveAction::Query() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight;
|
||||
|
@ -315,7 +320,8 @@ GameActions::Result TrackRemoveAction::Execute() const
|
|||
LOG_ERROR(
|
||||
"Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", _origin.x, _origin.y, _origin.z,
|
||||
_origin.direction, _sequence);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
RideId rideIndex = tileElement->AsTrack()->GetRideIndex();
|
||||
|
@ -335,7 +341,8 @@ GameActions::Result TrackRemoveAction::Execute() const
|
|||
if (trackBlock == nullptr)
|
||||
{
|
||||
LOG_ERROR("Track block %d not found for track type %d.", sequenceIndex, trackType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_BLOCK_NOT_FOUND);
|
||||
}
|
||||
|
||||
auto startLoc = _origin;
|
||||
|
@ -393,7 +400,8 @@ GameActions::Result TrackRemoveAction::Execute() const
|
|||
LOG_ERROR(
|
||||
"Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", mapLoc.x, mapLoc.y, mapLoc.z,
|
||||
_origin.direction, trackBlock->index);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
int32_t entranceDirections = std::get<0>(ted.SequenceProperties);
|
||||
|
@ -411,7 +419,8 @@ GameActions::Result TrackRemoveAction::Execute() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y);
|
||||
return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight;
|
||||
|
|
|
@ -118,7 +118,8 @@ GameActions::Result WallPlaceAction::Query() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
targetHeight = surfaceElement->GetBaseZ();
|
||||
|
||||
|
@ -135,7 +136,8 @@ GameActions::Result WallPlaceAction::Query() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (surfaceElement->GetWaterHeight() > 0)
|
||||
|
@ -299,7 +301,8 @@ GameActions::Result WallPlaceAction::Execute() const
|
|||
if (surfaceElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_ERR_SURFACE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
targetHeight = surfaceElement->GetBaseZ();
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ GameActions::Result WallSetColourAction::Query() const
|
|||
{
|
||||
LOG_ERROR(
|
||||
"Could not find wall element at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_WALL_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if ((GetFlags() & GAME_COMMAND_FLAG_GHOST) && !(wallElement->IsGhost()))
|
||||
|
|
Loading…
Reference in New Issue