mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Refactor explicit constructor usage in Peep::Place
This commit is contained in:
@@ -582,7 +582,8 @@ std::unique_ptr<GameActions::Result> Peep::Place(const TileCoordsXYZ& location,
|
||||
}
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE);
|
||||
return std::make_unique<GameActions::Result>(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
// Set the coordinate of destination to be exactly
|
||||
@@ -591,7 +592,7 @@ 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);
|
||||
return std::make_unique<GameActions::Result>(GameActions::Status::NotOwned, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE);
|
||||
}
|
||||
|
||||
if (auto res = MapCanConstructAt({ destination, destination.z, destination.z + (1 * 8) }, { 0b1111, 0 });
|
||||
|
||||
Reference in New Issue
Block a user