From 276ff311cf65cd36abd5aadfb3ac8ccce5747d12 Mon Sep 17 00:00:00 2001 From: Peter Froud Date: Sun, 17 Mar 2024 00:20:29 -0700 Subject: [PATCH] Add `LOG_WARNING` about bugged scenery entry --- src/openrct2/actions/LargeSceneryRemoveAction.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index d79ce0ed53..879ec229f8 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -73,7 +73,10 @@ GameActions::Result LargeSceneryRemoveAction::Query() const auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); // If we have a bugged scenery entry, do not touch the tile element. if (sceneryEntry == nullptr) - return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_UNKNOWN_OBJECT_TYPE); + { + LOG_WARNING("Scenery entry at x = %d, y = %d not removed because it is an unknown object type", _loc.x, _loc.y); + } + return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_UNKNOWN_OBJECT_TYPE); auto rotatedOffsets = CoordsXYZ{ CoordsXY{ sceneryEntry->tiles[_tileIndex].x_offset, sceneryEntry->tiles[_tileIndex].y_offset }.Rotate(_loc.direction), @@ -155,7 +158,10 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); // If we have a bugged scenery entry, do not touch the tile element. if (sceneryEntry == nullptr) + { + LOG_WARNING("Scenery entry at x = %d, y = %d not removed because it is an unknown object type", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_NONE); + } tileElement->RemoveBannerEntry();