1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Add LOG_ERROR calls

This commit is contained in:
Peter Froud
2024-03-17 00:19:56 -07:00
committed by Gymnasiast
parent d1f740c786
commit 1f698dfc76
19 changed files with 64 additions and 11 deletions

View File

@@ -66,6 +66,7 @@ GameActions::Result SmallSceneryRemoveAction::Query() const
auto* entry = OpenRCT2::ObjectManager::GetObjectEntry<SmallSceneryEntry>(_sceneryType);
if (entry == nullptr)
{
LOG_ERROR("Invalid small scenery type %u", _sceneryType);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
}
@@ -102,6 +103,7 @@ GameActions::Result SmallSceneryRemoveAction::Query() const
TileElement* tileElement = FindSceneryElement();
if (tileElement == nullptr)
{
LOG_ERROR("Small scenery of type %u not found at x = %d, y = %d, z = &d", _sceneryType, _loc.x, _loc.y, _loc.z);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
}
@@ -116,6 +118,7 @@ GameActions::Result SmallSceneryRemoveAction::Execute() const
auto* entry = OpenRCT2::ObjectManager::GetObjectEntry<SmallSceneryEntry>(_sceneryType);
if (entry == nullptr)
{
LOG_ERROR("Invalid small scenery type %u", _sceneryType);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
}