1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00
Files
OpenRCT2/src/openrct2/actions/TileModifyAction.h
ζeh Matt 83b911b193 #15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00

66 lines
1.7 KiB
C++

/*****************************************************************************
* Copyright (c) 2014-2020 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
#include "GameAction.h"
enum class TileModifyType : uint8_t
{
AnyRemove,
AnySwap,
AnyToggleInvisilibity,
AnyRotate,
AnyPaste,
AnySort,
AnyBaseHeightOffset,
SurfaceShowParkFences,
SurfaceToggleCorner,
SurfaceToggleDiagonal,
PathSetSlope,
PathSetBroken,
PathToggleEdge,
EntranceMakeUsable,
WallSetSlope,
WallSetAnimationFrame,
TrackBaseHeightOffset,
TrackSetChain,
TrackSetChainBlock,
TrackSetBlockBrake,
TrackSetIndestructible,
ScenerySetQuarterLocation,
ScenerySetQuarterCollision,
BannerToggleBlockingEdge,
Count,
};
class TileModifyAction final : public GameActionBase<GameCommand::ModifyTile>
{
private:
CoordsXY _loc;
TileModifyType _setting{};
uint32_t _value1{};
uint32_t _value2{};
TileElement _pasteElement{};
public:
TileModifyAction() = default;
TileModifyAction(
CoordsXY loc, TileModifyType setting, uint32_t value1 = 0, uint32_t value2 = 0, TileElement pasteElement = {});
uint16_t GetActionFlags() const override;
void Serialise(DataSerialiser& stream) override;
GameActions::Result Query() const override;
GameActions::Result Execute() const override;
private:
GameActions::Result QueryExecute(bool isExecuting) const;
};