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 enum class ParkParameter : uint8_t
15 {
16     Close,
17     Open,
18     SamePriceInPark,
19     Count
20 };
21 
22 class ParkSetParameterAction final : public GameActionBase<GameCommand::SetParkOpen>
23 {
24 private:
25     ParkParameter _parameter{ ParkParameter::Count };
26     uint64_t _value{};
27 
28     constexpr static rct_string_id _ErrorTitles[] = {
29         STR_CANT_CLOSE_PARK,
30         STR_CANT_OPEN_PARK,
31         STR_NONE,
32         STR_NONE,
33     };
34 
35 public:
36     ParkSetParameterAction() = default;
37     ParkSetParameterAction(ParkParameter parameter, uint64_t value = 0);
38 
39     uint16_t GetActionFlags() const override;
40 
41     void Serialise(DataSerialiser& stream) override;
42     GameActions::Result::Ptr Query() const override;
43     GameActions::Result::Ptr Execute() const override;
44 };
45