Fix error messages for when map_is_location_owned is false

This commit is contained in:
ζeh Matt 2021-10-28 21:20:42 +03:00
parent 3016701a98
commit 45c4ed2679
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
3 changed files with 5 additions and 4 deletions

View File

@ -93,7 +93,7 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::Query() const
auto z = ride->stations[_stationNum].GetBaseZ();
if (!LocationValid(_loc) || (!gCheatsSandboxMode && !map_is_location_owned({ _loc, z })))
{
return MakeResult(GameActions::Status::NotOwned, errorTitle, STR_NONE);
return MakeResult(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK);
}
if (!MapCheckCapacityAndReorganise(_loc))
@ -224,7 +224,7 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::TrackPlaceQuery(const Coor
if (!gCheatsSandboxMode && !map_is_location_owned(loc))
{
return MakeResult(GameActions::Status::NotOwned, errorTitle, STR_NONE);
return MakeResult(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK);
}
if (!MapCheckCapacityAndReorganise(loc))

View File

@ -89,7 +89,7 @@ GameActions::Result::Ptr WallPlaceAction::Query() const
}
else if (!map_is_location_owned(_loc))
{
return MakeResult(GameActions::Status::NotOwned, STR_CANT_BUILD_THIS_HERE, STR_NONE);
return MakeResult(GameActions::Status::NotOwned, STR_CANT_BUILD_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK);
}
}
else if (!_trackDesignDrawingPreview && (_loc.x > GetMapSizeMaxXY() || _loc.y > GetMapSizeMaxXY()))

View File

@ -592,7 +592,8 @@ std::unique_ptr<GameActions::Result> Peep::Place(const TileCoordsXYZ& location,
if (!map_is_location_owned(destination))
{
return std::make_unique<GameActions::Result>(GameActions::Status::NotOwned, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE);
return std::make_unique<GameActions::Result>(
GameActions::Status::NotOwned, STR_ERR_CANT_PLACE_PERSON_HERE, STR_LAND_NOT_OWNED_BY_PARK);
}
if (auto res = MapCanConstructAt({ destination, destination.z, destination.z + (1 * 8) }, { 0b1111, 0 });