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 "../peep/Staff.h"
13 #include "GameAction.h"
14 
15 struct StaffHireNewActionResult
16 {
17     uint16_t StaffEntityId = SPRITE_INDEX_NULL;
18 };
19 
20 class StaffHireNewAction final : public GameActionBase<GameCommand::HireNewStaffMember>
21 {
22 private:
23     bool _autoPosition{};
24     uint8_t _staffType{ EnumValue(StaffType::Count) };
25     EntertainerCostume _entertainerType{ EntertainerCostume::Count };
26     uint32_t _staffOrders{};
27 
28 public:
29     StaffHireNewAction() = default;
30     StaffHireNewAction(bool autoPosition, StaffType staffType, EntertainerCostume entertainerType, uint32_t staffOrders);
31 
32     void AcceptParameters(GameActionParameterVisitor& visitor) override;
33 
34     uint16_t GetActionFlags() const override;
35 
36     void Serialise(DataSerialiser& stream) override;
37     GameActions::Result::Ptr Query() const override;
38     GameActions::Result::Ptr Execute() const override;
39 
40 private:
41     GameActions::Result::Ptr QueryExecute(bool execute) const;
42     void AutoPositionNewStaff(Peep* newPeep) const;
43 };
44