1 /*****************************************************************************
2  * Copyright (c) 2014-2020 OpenRCT2 developers
3  *
4  * For a complete list of all authors, please refer to contributors.md
5  * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
6  *
7  * OpenRCT2 is licensed under the GNU General Public License version 3.
8  *****************************************************************************/
9 
10 #pragma once
11 
12 #include "GameAction.h"
13 
14 class RideCreateAction final : public GameActionBase<GameCommand::CreateRide>
15 {
16 private:
17     ObjectEntryIndex _rideType{ OBJECT_ENTRY_INDEX_NULL };
18     ObjectEntryIndex _subType{ OBJECT_ENTRY_INDEX_NULL };
19     uint8_t _colour1{ 0xFF };
20     uint8_t _colour2{ 0xFF };
21 
22 public:
23     RideCreateAction() = default;
24     RideCreateAction(int32_t rideType, ObjectEntryIndex subType, int32_t colour1, int32_t colour2);
25 
26     void AcceptParameters(GameActionParameterVisitor& visitor) override;
27 
28     int32_t GetRideType() const;
29     int32_t GetRideObject() const;
30     uint16_t GetActionFlags() const override;
31 
32     void Serialise(DataSerialiser& stream) override;
33     GameActions::Result::Ptr Query() const override;
34     GameActions::Result::Ptr Execute() const override;
35 };
36