Emergency 20 Dokumentation  4.2.0
em5::Injury Class Reference

Injury definition class. More...

#include <Injury.h>

Inheritance diagram for em5::Injury:
qsf::Object

Public Types

enum  InjuryFlags { INJURY_AFFECTS_HEALTH = 1<<0, INJURY_SPREADS = 1<<1 }
 
enum  ContaminationType {
  CONTAMINATION_NONE = 0, CONTAMINATION_RADIOACTIVE = 1, CONTAMINATION_CHEMICAL = 2, CONTAMINATION_PLAGUE = 3,
  CONTAMINATION_BIOLOGICAL = 4
}
 
typedef qsf::BitFlagSet< uint8, InjuryFlagsInjuryBitmask
 
typedef std::vector< uint32MedicalCareIdArray
 
typedef std::vector< uint32InjuryIdArray
 
- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 

Public Member Functions

 Injury (uint32 key)
 Constructor. More...
 
virtual ~Injury ()
 Destructor. More...
 
uint32 getInjuryId () const
 
const std::string & getName () const
 
void setName (const std::string &name)
 
const std::string & getLocalizedName () const
 
void setLocalizedName (const std::string &name)
 
InjuryBitmask getInjuryBitmask () const
 
const VisualVitalSignsgetVisualVitalSigns () const
 
float getInitialReduction () const
 
void setInitialReduction (float initialReduction)
 
float getInjuryDelta () const
 
void setInjuryDelta (float injuryDelta)
 
float getHealDelta () const
 
void setHealDelta (float healDelta)
 
float getTreatmentThreshold () const
 
void setTreatmentThreshold (float treatmentThreshold)
 
float getTreatmentFactor () const
 
void setTreatmentFactor (float treatmentFactor)
 
DiagnosisIdentifier getDiagnosisId () const
 
void setDiagnosisId (DiagnosisIdentifier diagnosisId)
 
const DiagnosisgetDiagnosis () const
 
void setAnimationName (const std::string &animationName)
 
const std::string & getAnimationName () const
 
const std::string & getAudioName () const
 
void setAudioName (const std::string &audioName)
 
bool isAffectingHealth () const
 
void setAffectsHealth (bool affectsHealth)
 
ContaminationType getContaminationType () const
 
bool isContamination () const
 
void setContaminationType (ContaminationType contaminationType)
 
float getSpreadDelay () const
 
void setSpreadDelay (float spreadDelay)
 
float getSpreadChance () const
 
void setSpreadChance (float spreadChance)
 
float getSpreadRadius () const
 
void setSpreadRadius (float spreadRadius)
 
const std::string & getSpreadedInjuryName () const
 
void setSpreadedInjuryName (const std::string &injuryName)
 
const InjuryIdArraygetFollowingInjuries () const
 
bool getIsDrowning () const
 
void setIsDrowing (bool isDrowning)
 
bool getIsKneeing () const
 
void setIsKneeing (bool isKneeing)
 
- 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...
 

Friends

class InjuryManager
 

Additional Inherited Members

- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Detailed Description

Injury definition class.

Member Typedef Documentation

typedef std::vector<uint32> em5::Injury::InjuryIdArray

Member Enumeration Documentation

Contamination type

Enumerator
CONTAMINATION_NONE 

No contamination.

CONTAMINATION_RADIOACTIVE 

Radioactive contamination.

CONTAMINATION_CHEMICAL 

Chemical contamination.

CONTAMINATION_PLAGUE 

Plague contamination.

CONTAMINATION_BIOLOGICAL 

Biological contamination.

Injury flags

Enumerator
INJURY_AFFECTS_HEALTH 

Injury affects health instead of life (e.g. "healthy" parts of illnesses and contaminations)

INJURY_SPREADS 

Injury spreads to other people.

Constructor & Destructor Documentation

em5::Injury::Injury ( uint32  key)
explicit

Constructor.

virtual em5::Injury::~Injury ( )
virtual

Destructor.

Member Function Documentation

const std::string& em5::Injury::getAnimationName ( ) const
const std::string& em5::Injury::getAudioName ( ) const
ContaminationType em5::Injury::getContaminationType ( ) const
const Diagnosis* em5::Injury::getDiagnosis ( ) const
DiagnosisIdentifier em5::Injury::getDiagnosisId ( ) const
const InjuryIdArray& em5::Injury::getFollowingInjuries ( ) const
float em5::Injury::getHealDelta ( ) const
float em5::Injury::getInitialReduction ( ) const
InjuryBitmask em5::Injury::getInjuryBitmask ( ) const
float em5::Injury::getInjuryDelta ( ) const
uint32 em5::Injury::getInjuryId ( ) const
bool em5::Injury::getIsDrowning ( ) const
bool em5::Injury::getIsKneeing ( ) const
const std::string& em5::Injury::getLocalizedName ( ) const
const std::string& em5::Injury::getName ( ) const
float em5::Injury::getSpreadChance ( ) const
float em5::Injury::getSpreadDelay ( ) const
const std::string& em5::Injury::getSpreadedInjuryName ( ) const
float em5::Injury::getSpreadRadius ( ) const
float em5::Injury::getTreatmentFactor ( ) const
float em5::Injury::getTreatmentThreshold ( ) const
const VisualVitalSigns& em5::Injury::getVisualVitalSigns ( ) const
bool em5::Injury::isAffectingHealth ( ) const
bool em5::Injury::isContamination ( ) const
void em5::Injury::setAffectsHealth ( bool  affectsHealth)
void em5::Injury::setAnimationName ( const std::string &  animationName)
void em5::Injury::setAudioName ( const std::string &  audioName)
void em5::Injury::setContaminationType ( ContaminationType  contaminationType)
void em5::Injury::setDiagnosisId ( DiagnosisIdentifier  diagnosisId)
void em5::Injury::setHealDelta ( float  healDelta)
void em5::Injury::setInitialReduction ( float  initialReduction)
void em5::Injury::setInjuryDelta ( float  injuryDelta)
void em5::Injury::setIsDrowing ( bool  isDrowning)
void em5::Injury::setIsKneeing ( bool  isKneeing)
void em5::Injury::setLocalizedName ( const std::string &  name)
void em5::Injury::setName ( const std::string &  name)
void em5::Injury::setSpreadChance ( float  spreadChance)
void em5::Injury::setSpreadDelay ( float  spreadDelay)
void em5::Injury::setSpreadedInjuryName ( const std::string &  injuryName)
void em5::Injury::setSpreadRadius ( float  spreadRadius)
void em5::Injury::setTreatmentFactor ( float  treatmentFactor)
void em5::Injury::setTreatmentThreshold ( float  treatmentThreshold)

Friends And Related Function Documentation

friend class InjuryManager
friend

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