mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Add location to error messages
This commit is contained in:
@@ -77,7 +77,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const
|
||||
auto tileElement = MapGetFootpathElement(_loc);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find path element.");
|
||||
LOG_ERROR("Could not find 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);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const
|
||||
|
||||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find path element.");
|
||||
LOG_ERROR("Could not find 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,14 +69,14 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const
|
||||
auto tileElement = MapGetFootpathElement(_loc);
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find path element.");
|
||||
LOG_ERROR("Could not find 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);
|
||||
}
|
||||
|
||||
auto pathElement = tileElement->AsPath();
|
||||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find path element.");
|
||||
LOG_ERROR("Could not find 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);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ GameActions::Result FootpathAdditionRemoveAction::Execute() const
|
||||
|
||||
if (pathElement == nullptr)
|
||||
{
|
||||
LOG_ERROR("Could not find path element.");
|
||||
LOG_ERROR("Could not find 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user