Emergency 20 Dokumentation  4.2.0
em5::HeatWaveEventFactory Class Reference

Emergency 5 freeplay event factory for "heatwave" 11.9. More...

#include <HeatWaveEventFactory.h>

Inheritance diagram for em5::HeatWaveEventFactory:
em5::FreeplayEventFactory qsf::Object

Public Member Functions

 HeatWaveEventFactory ()
 Default constructor. More...
virtual ~HeatWaveEventFactory ()
 Destructor. More...
std::string getWeatherAsString () const
 Get weather. More...
void setWeatherAsString (const std::string &weather)
 Set weather bitmask. More...
WeatherComponent::WeatherBitmask getWeather () const
 Return weather bitmask. More...
void setWeather (WeatherComponent::WeatherBitmask weather)
 Set weather bitmask. More...
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (DeadPersonsToFail, uint32, mEventConfiguration.deadPersonsToFail)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (HeatwaveFadeInTime, qsf::Time, mEventConfiguration.heatwaveFadeInTime)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (HeatwaveFadeOutTime, qsf::Time, mEventConfiguration.heatwaveFadeOutTime)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (HeatwavePersistInflameObjectWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInflameObjectWaitTime)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (HeatwavePersistInflameVehicleWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInflameVehicleWaitTime)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (HeatwavePersistInjurePersonWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInjurePersonWaitTime)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (NumberOfPersonsToInjure, uint32, mEventConfiguration.numberOfPersonsToInjure)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (NumberOfVegetationToInflame, uint32, mEventConfiguration.numberOfVegetationToInflame)
 QSF_DEFINE_SIMPLE_GETTER_AND_SETTER (NumberOfVehiclesToInflame, uint32, mEventConfiguration.numberOfVehiclesToInflame)
virtual FreeplayEventtryTriggerEvent () override
- Public Member Functions inherited from em5::FreeplayEventFactory
 FreeplayEventFactory ()
 Constructor. More...
virtual ~FreeplayEventFactory ()
 Destructor. More...
uint32 getId () const
 Return event factory's unique ID. More...
const std::string & getEventName () const
 Return event's name. More...
bool isEnabled () const
 Return whether or not the factory is currently enabled for the game. More...
float getTriggerChance () const
 Return trigger chance for this event factory. More...
void setTriggerChance (float triggerChance)
 Set trigger chance for this event factory. More...
float getEventDensity () const
 Get event density. More...
void setEventDensity (float eventDensity)
 Set event desity. More...
bool getStartEvent () const
 Get start event. More...
void setStartEvent (bool startEvent)
uint32 getMaxAppearances () const
 Get limit of appearances. More...
void setMaxAppearances (uint32 maxAppearances)
const std::string & getEventTag () const
 Get the event tag (used to search the target entity) More...
void setEventTag (const std::string &eventTag)
 Set the event tag (used to search the target entity) More...
const VariantArraygetVariants () const
 Get the variants of the freeplay event factory. More...
void setVariants (const VariantArray &variants)
 Set the variants of the freeplay event factory. More...
const boost::property_tree::ptreegetRandomVariant () const
 Get a random variant of the variant array. More...
const boost::property_tree::ptreegetMainVariant () const
 Get a main variant of the variant array. More...
const boost::property_tree::ptreegetVariantByIndex (uint32 index) const
 Get a variant of the variant array by index. More...
bool operator== (const FreeplayEventFactory &other) const
 Compare this factory's unique ID to an other factory's unique ID. More...
bool operator== (const std::string &other) const
 Compare this factory's name to an std::string. More...
bool operator== (uint32 other) const
 Compare this factory's unique ID to a uint32. More...
FreeplayEventtryTriggerEvent (const FreeplayEventTriggerInfo &triggerInfo)
 Check if the event preconditions are met and if so, generate an event instance. More...
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
const camp::Class & getCampClass () const
 Return the CAMP class. More...
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...

Additional Inherited Members

- Public Types inherited from em5::FreeplayEventFactory
typedef std::vector< boost::property_tree::ptreeVariantArray
- Public Types inherited from qsf::Object
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
- Protected Member Functions inherited from em5::FreeplayEventFactory
template<typename T >
T & createAndInitializeEvent ()
FreeplayEventcreateAndInitializeEventByClassName (const std::string &className)
void deserializeRandomFreeplayVariant (FreeplayEvent &freeplayEvent)
void deserializeFreeplayVariantByIndex (FreeplayEvent &freeplayEvent, uint32 index)
bool isEventAlreadyRunning () const
const FreeplayEventTriggerInfogetTriggerInfo () const
void setTriggerFailReason (const std::string &reason) const
qsf::LayergetCandidateEventLayer (const std::string &eventLayerName, const std::string &baseLayerName, const boost::function< bool(const qsf::Layer &)> &checkCandidateCallback) const
 Try to get a randomly chosen layer to use for a event. More...
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
- Protected Attributes inherited from em5::FreeplayEventFactory
std::string mEventTag

Detailed Description

Emergency 5 freeplay event factory for "heatwave" 11.9.

Constructor & Destructor Documentation

em5::HeatWaveEventFactory::HeatWaveEventFactory ( )

Default constructor.

virtual em5::HeatWaveEventFactory::~HeatWaveEventFactory ( )


Member Function Documentation

WeatherComponent::WeatherBitmask em5::HeatWaveEventFactory::getWeather ( ) const

Return weather bitmask.

std::string em5::HeatWaveEventFactory::getWeatherAsString ( ) const

Get weather.

Get weather as string
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( DeadPersonsToFail  ,
uint32  ,
mEventConfiguration.  deadPersonsToFail 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( HeatwaveFadeInTime  ,
qsf::Time  ,
mEventConfiguration.  heatwaveFadeInTime 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( HeatwaveFadeOutTime  ,
qsf::Time  ,
mEventConfiguration.  heatwaveFadeOutTime 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( HeatwavePersistInflameObjectWaitTime  ,
qsf::Time  ,
mEventConfiguration.  heatwavePersistInflameObjectWaitTime 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( HeatwavePersistInflameVehicleWaitTime  ,
qsf::Time  ,
mEventConfiguration.  heatwavePersistInflameVehicleWaitTime 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( HeatwavePersistInjurePersonWaitTime  ,
qsf::Time  ,
mEventConfiguration.  heatwavePersistInjurePersonWaitTime 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( NumberOfPersonsToInjure  ,
uint32  ,
mEventConfiguration.  numberOfPersonsToInjure 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( NumberOfVegetationToInflame  ,
uint32  ,
mEventConfiguration.  numberOfVegetationToInflame 
em5::HeatWaveEventFactory::QSF_DEFINE_SIMPLE_GETTER_AND_SETTER ( NumberOfVehiclesToInflame  ,
uint32  ,
mEventConfiguration.  numberOfVehiclesToInflame 
void em5::HeatWaveEventFactory::setWeather ( WeatherComponent::WeatherBitmask  weather)

Set weather bitmask.

void em5::HeatWaveEventFactory::setWeatherAsString ( const std::string &  weather)

Set weather bitmask.

[in]weatherWeather enum bitmask as string
virtual FreeplayEvent* em5::HeatWaveEventFactory::tryTriggerEvent ( )

The documentation for this class was generated from the following file: