Emergency 20 Dokumentation  4.2.0
em5::FiremanLogic Class Reference

Fireman logic. More...

#include <FiremanLogic.h>

Inheritance diagram for em5::FiremanLogic:
em5::CarryPersonLogic qsf::GameLogic qsf::WeakPtrTarget

Public Types

enum  Clothing { CLOTHING_DEFAULT, CLOTHING_ABC_SUIT, CLOTHING_DUST_MASK }
 

Public Member Functions

 FiremanLogic ()
 
uint64 getPullingPersonId () const
 Return pulling person entity ID. More...
 
void setPullingPersonId (uint64 id)
 Set pulling person entity ID. More...
 
bool isConnectedToHydrant () const
 Check if the fireman is connected to a hydrant. More...
 
qsf::EntitygetConnectedHydrant () const
 Return the hydrant entity. More...
 
void connectToHydrant (qsf::Entity &hydrant)
 Connect to a hydrant. More...
 
void disconnectFromHydrant ()
 Disconnect from a hydrant. More...
 
SimpleFireHoseComponentgetFireHose () const
 Return the connected fire hose component. More...
 
void createFireHose ()
 
void destroyFireHose ()
 
void performAutomatism ()
 Performs the automatism, internally called after all checks are passed. More...
 
Clothing getActiveClothing () const
 Direct swapping of the mesh to the ABC suit; no actions. More...
 
void setActiveClothing (Clothing clothing, bool changeMesh=true)
 Set another clothing mesh. More...
 
virtual bool onStartup () override
 Startup the game logic. More...
 
virtual void onShutdown () override
 Shutdown the game logic. More...
 
- Public Member Functions inherited from em5::CarryPersonLogic
 CarryPersonLogic (uint32 gameLogicId)
 
uint64 getCarryPerson () const
 Get the carried person ID. More...
 
virtual void setCarryPerson (uint64 person)
 Set the carried person ID. More...
 
- Public Member Functions inherited from qsf::GameLogic
virtual ~GameLogic ()
 Destructor. More...
 
uint32 getId () const
 Get the game logic's unique ID. More...
 
uint32 getTypeId () const
 Get the game logic's type ID. More...
 
uint64 getEntityId () const
 Get the owning entity's ID or zero if there is none. More...
 
EntitygetEntity () const
 Get the owning entity or a null pointer if there is none. More...
 
EntitygetEntitySafe () const
 Get the owning entity or a null pointer if there is none. More...
 
MapgetMap () const
 Get the associated map of the game logic. More...
 
bool startup ()
 Startup the game logic. More...
 
bool isRunning () const
 Return whether or not the game logic is up-and-running. More...
 
void shutdown ()
 Shutdown the game logic. More...
 
bool isDebug () const
 Return whether or not the logic is considered to be in debug mode. More...
 
void setDebug (bool debugMode)
 Set whether or not the logic is considered to be in debug mode. More...
 
virtual void serialize (BinarySerializer &serializer)
 Serialize or deserialize the game logic using a binary serializer. More...
 

Static Public Attributes

static const uint32 GAMELOGIC_TYPE_ID
 
static const std::string ASSET_ABC_SUIT
 
static const std::string ASSET_DUST_MASK
 
- Static Public Attributes inherited from em5::CarryPersonLogic
static const uint32 GAMELOGIC_TYPE_ID
 

Protected Member Functions

virtual void onSetDebug (bool debug) override
 Set whether or not the logic is considered to be in debug mode. More...
 
- Protected Member Functions inherited from qsf::GameLogic
void removeThis ()
 
 GameLogic (uint32 typeId)
 Constructor. More...
 
void registrationAtManager (GameLogicManager &manager, uint32 id)
 Registering call from manager. More...
 
- Protected Member Functions inherited from qsf::WeakPtrTarget
 WeakPtrTarget ()
 Default constructor. More...
 
 WeakPtrTarget (const WeakPtrTarget &other)
 Copy constructor. More...
 
 WeakPtrTarget (WeakPtrTarget &&)=delete
 Delete the move constructor, as WeakPtrTarget would need a proper move constructor-implementation that ensures that its pointer gets updated in the WeakPtrBase as well. More...
 
 ~WeakPtrTarget ()
 Destructor. More...
 
void invalidateAllWeakPtr ()
 Invalidate all weak pointers to this object. More...
 
void operator= (const WeakPtrTarget &other)
 Copy operator. More...
 

Detailed Description

Fireman logic.

Member Enumeration Documentation

Enumerator
CLOTHING_DEFAULT 
CLOTHING_ABC_SUIT 
CLOTHING_DUST_MASK 

Constructor & Destructor Documentation

em5::FiremanLogic::FiremanLogic ( )

Member Function Documentation

void em5::FiremanLogic::connectToHydrant ( qsf::Entity hydrant)

Connect to a hydrant.

void em5::FiremanLogic::createFireHose ( )
void em5::FiremanLogic::destroyFireHose ( )
void em5::FiremanLogic::disconnectFromHydrant ( )

Disconnect from a hydrant.

Clothing em5::FiremanLogic::getActiveClothing ( ) const

Direct swapping of the mesh to the ABC suit; no actions.

qsf::Entity* em5::FiremanLogic::getConnectedHydrant ( ) const

Return the hydrant entity.

Returns
The hydrant entity, or a null pointer if there is none connected
SimpleFireHoseComponent* em5::FiremanLogic::getFireHose ( ) const

Return the connected fire hose component.

Returns
The fire hose component entity, or a null pointer if there is none connected
uint64 em5::FiremanLogic::getPullingPersonId ( ) const

Return pulling person entity ID.

Returns
ID of the pulling entity
bool em5::FiremanLogic::isConnectedToHydrant ( ) const

Check if the fireman is connected to a hydrant.

Returns
Returns "true" when the fireman is connected to a hydrant; "false" otherwise
virtual void em5::FiremanLogic::onSetDebug ( bool  debug)
overrideprotectedvirtual

Set whether or not the logic is considered to be in debug mode.

Parameters
[in]debug"true" if the logic is considered to be in debug mode, else "false"
Note
  • The default implementation is empty
  • This method is only called in case there's a real state change
See also
  • "qsf::Component::setDebug()"

Reimplemented from qsf::GameLogic.

virtual void em5::FiremanLogic::onShutdown ( )
overridevirtual

Shutdown the game logic.

Reimplemented from em5::CarryPersonLogic.

virtual bool em5::FiremanLogic::onStartup ( )
overridevirtual

Startup the game logic.

Reimplemented from em5::CarryPersonLogic.

void em5::FiremanLogic::performAutomatism ( )

Performs the automatism, internally called after all checks are passed.

Note
Called from "ExtinguishFireAction"
void em5::FiremanLogic::setActiveClothing ( Clothing  clothing,
bool  changeMesh = true 
)

Set another clothing mesh.

void em5::FiremanLogic::setPullingPersonId ( uint64  id)

Set pulling person entity ID.

Parameters
[in]idID of the pulling entity

Member Data Documentation

const std::string em5::FiremanLogic::ASSET_ABC_SUIT
static
const std::string em5::FiremanLogic::ASSET_DUST_MASK
static
const uint32 em5::FiremanLogic::GAMELOGIC_TYPE_ID
static

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