Emergency 20 Dokumentation  4.2.0
DrunkRiotAtBeerTentEventFactory.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace qsf
22 {
23  class Entity;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public methods ]
47  //[-------------------------------------------------------]
48  public:
54 
60 
61  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(PeopleToAttack, uint32, mPeopleToAttack);
62  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(TriggerFromHour, uint32, mHourMin);
63  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(TriggerToHour, uint32, mHourMax);
64  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(MinStartGangsters, uint32, mMinStartGangsters);
65  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(MaxStartGangsters, uint32, mMaxStartGangsters);
66  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(FleeThreshold, uint32, mFleeThreshold);
67  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(TentBuildingTag, const std::string&, mTentBuildingTag);
68 
69 
70  //[-------------------------------------------------------]
71  //[ Public virtual em5::FreeplayEventFactory methods ]
72  //[-------------------------------------------------------]
73  public:
74  virtual FreeplayEvent* tryTriggerEvent() override;
75 
76 
77  //[-------------------------------------------------------]
78  //[ Private methods ]
79  //[-------------------------------------------------------]
80  private:
81  qsf::Entity* findCandidate() const;
82  bool checkCandidate(qsf::Entity& candidate, const std::string& tag) const;
83  bool checkTime() const;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Private data ]
88  //[-------------------------------------------------------]
89  private:
90  uint32 mPeopleToAttack;
91  uint32 mMinStartGangsters;
92  uint32 mMaxStartGangsters;
93  uint32 mFleeThreshold;
94  std::string mTentBuildingTag;
95  uint32 mHourMin;
96  uint32 mHourMax;
97 
98 
99  //[-------------------------------------------------------]
100  //[ CAMP reflection system ]
101  //[-------------------------------------------------------]
102  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
103 
104 
105  };
106 
107 
108 //[-------------------------------------------------------]
109 //[ Namespace ]
110 //[-------------------------------------------------------]
111 } // em5
112 
113 
114 //[-------------------------------------------------------]
115 //[ CAMP reflection system ]
116 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
EMERGENCY 5 freeplay event factory base class.
Definition: FreeplayEventFactory.h:56
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66
Emergency 5 freeplay event factory for "drunk riot at beer tent" 13.1.
Definition: DrunkRiotAtBeerTentEventFactory.h:41