diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index e4c6f36e7b..c006c7c52c 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -529,6 +529,12 @@ public: break; } + case INTENT_ACTION_TILE_MODIFY: + { + WindowInvalidateByClass(WindowClass::TileInspector); + break; + } + default: break; } diff --git a/src/openrct2/actions/TileModifyAction.cpp b/src/openrct2/actions/TileModifyAction.cpp index af5664afa6..9d66bdff4a 100644 --- a/src/openrct2/actions/TileModifyAction.cpp +++ b/src/openrct2/actions/TileModifyAction.cpp @@ -9,6 +9,8 @@ #include "TileModifyAction.h" +#include "../Context.h" +#include "../windows/Intent.h" #include "../world/TileInspector.h" using namespace OpenRCT2; @@ -236,5 +238,12 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const res.Position.y = _loc.y; res.Position.z = TileElementHeight(_loc); + if (isExecuting) + { + auto intent = Intent(INTENT_ACTION_TILE_MODIFY); + // TODO: add location data to intent. + ContextBroadcastIntent(&intent); + } + return res; } diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index 9cf4326cff..b0360f0ff2 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -47,6 +47,7 @@ enum IntentAction INTENT_ACTION_TRACK_DESIGN_RESTORE_PROVISIONAL, INTENT_ACTION_SET_MAP_TOOLTIP, INTENT_ACTION_NEW_SCENERY, + INTENT_ACTION_TILE_MODIFY, INTENT_ACTION_NULL = 255, };