Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
RebuildHoleBehavior Class Reference

#include <RebuildHoleBehavior.h>

Inherits UpdateModule, DieModuleInterface, and RebuildHoleBehaviorInterface.

Public Member Functions

 RebuildHoleBehavior (Thing *thing, const ModuleData *moduleData)
 
virtual RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
virtual DieModuleInterfacegetDie (void)
 
virtual UpdateSleepTime update (void)
 
virtual void onDie (const DamageInfo *damageInfo)
 
virtual void startRebuildProcess (const ThingTemplate *rebuild, ObjectID spawnerID)
 
virtual ObjectID getSpawnerID (void)
 
virtual ObjectID getReconstructedBuildingID (void)
 
virtual const ThingTemplategetRebuildTemplate () const
 
void transferBombs (Object *reconstruction)
 end startRebuildProcess
 
- Public Member Functions inherited from UpdateModule
 UpdateModule (Thing *thing, const ModuleData *moduleData)
 
virtual UpdateModuleInterfacegetUpdate ()
 
DisabledMaskType getDisabledTypesToProcess () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getPriority () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getNextCallFrame () const
 
UPDATEMODULE_FRIEND_DECLARATOR SleepyUpdatePhase friend_getNextCallPhase () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setNextCallFrame (UnsignedInt frame)
 
UPDATEMODULE_FRIEND_DECLARATOR Int friend_getIndexInLogic () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setIndexInLogic (Int i)
 
UPDATEMODULE_FRIEND_DECLARATOR const Objectfriend_getObject () const
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
virtual CollideModuleInterfacegetCollide ()
 
virtual ContainModuleInterfacegetContain ()
 
virtual CreateModuleInterfacegetCreate ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual DestroyModuleInterfacegetDestroy ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
virtual UpgradeModuleInterfacegetUpgrade ()
 
virtual StealthUpdategetStealth ()
 
virtual SpyVisionUpdategetSpyVisionUpdate ()
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual BridgeBehaviorInterfacegetBridgeBehaviorInterface ()
 
virtual BridgeTowerBehaviorInterfacegetBridgeTowerBehaviorInterface ()
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual OverchargeBehaviorInterfacegetOverchargeBehaviorInterface ()
 
virtual TransportPassengerInterfacegetTransportPassengerInterface ()
 
virtual CaveInterfacegetCaveInterface ()
 
virtual LandMineInterfacegetLandMineInterface ()
 
virtual DieModuleInterfacegetEjectPilotDieInterface ()
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual AIUpdateInterfacegetAIUpdateInterface ()
 
virtual ExitInterfacegetUpdateExitInterface ()
 
virtual DockUpdateInterfacegetDockUpdateInterface ()
 
virtual RailedTransportDockUpdateInterfacegetRailedTransportDockUpdateInterface (void)
 
virtual SlowDeathBehaviorInterfacegetSlowDeathBehaviorInterface ()
 
virtual SpecialPowerUpdateInterfacegetSpecialPowerUpdateInterface ()
 
virtual SlavedUpdateInterfacegetSlavedUpdateInterface ()
 
virtual ProductionUpdateInterfacegetProductionUpdateInterface ()
 
virtual HordeUpdateInterfacegetHordeUpdateInterface ()
 
virtual PowerPlantUpdateInterfacegetPowerPlantUpdateInterface ()
 
virtual SpawnBehaviorInterfacegetSpawnBehaviorInterface ()
 
virtual CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface ()
 
virtual const CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface () const
 
- Public Member Functions inherited from ObjectModule
 ObjectModule (Thing *thing, const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual void onCapture (Player *oldOwner, Player *newOwner)
 
virtual void onDisabledEdge (Bool nowDisabled)
 
- Public Member Functions inherited from Module
 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onObjectCreated ()
 
virtual void onDrawableBoundToObject ()
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload any assets we might have for this time of day
 
virtual void onDelete (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static Int getInterfaceMask (void)
 
static RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterfaceFromObject (Object *obj)
 
- Static Public Member Functions inherited from UpdateModule
static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from BehaviorModule
static Int getInterfaceMask ()
 
static ModuleType getModuleType ()
 
- Static Public Member Functions inherited from Module
static ModuleDatafriend_newModuleData (INI *ini)
 

Protected Member Functions

void newWorkerRespawnProcess (Object *existingWorker)
 start the worker respawn process (again if existingWorker is non NULL)
 
- Protected Member Functions inherited from UpdateModule
void setWakeFrame (Object *obj, UpdateSleepTime wakeDelay)
 
UpdateSleepTime getWakeFrame () const
 
virtual SleepyUpdatePhase getUpdatePhase () const
 
UpdateSleepTime frameToSleepTime (UnsignedInt frame1, UnsignedInt frame2=FOREVER, UnsignedInt frame3=FOREVER, UnsignedInt frame4=FOREVER)
 
- Protected Member Functions inherited from BehaviorModule
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from ObjectModule
ObjectgetObject ()
 
const ObjectgetObject () const
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Protected Attributes

ObjectID m_workerID
 id of the worker that will rebuild us
 
ObjectID m_reconstructingID
 ID of the object we're reconstructing.
 
ObjectID m_spawnerObjectID
 Object that was killed and therefore the object that created this hole.
 
UnsignedInt m_workerWaitCounter
 when this reaches zero we spawn a worker after death
 
const ThingTemplatem_workerTemplate
 template of the worker to make
 
const ThingTemplatem_rebuildTemplate
 what we are rebuilding
 

Detailed Description

Definition at line 75 of file RebuildHoleBehavior.h.

Constructor & Destructor Documentation

◆ RebuildHoleBehavior()

RebuildHoleBehavior::RebuildHoleBehavior ( Thing * thing,
const ModuleData * moduleData )

Definition at line 86 of file RebuildHoleBehavior.cpp.

Member Function Documentation

◆ getDie()

virtual DieModuleInterface * RebuildHoleBehavior::getDie ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 93 of file RebuildHoleBehavior.h.

◆ getInterfaceMask()

static Int RebuildHoleBehavior::getInterfaceMask ( void )
inlinestatic

Definition at line 90 of file RebuildHoleBehavior.h.

◆ getRebuildHoleBehaviorInterface()

virtual RebuildHoleBehaviorInterface * RebuildHoleBehavior::getRebuildHoleBehaviorInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 88 of file RebuildHoleBehavior.h.

◆ getRebuildHoleBehaviorInterfaceFromObject()

RebuildHoleBehaviorInterface * RebuildHoleBehavior::getRebuildHoleBehaviorInterfaceFromObject ( Object * obj)
static

Helper method to get interface given an object

Definition at line 367 of file RebuildHoleBehavior.cpp.

◆ getRebuildTemplate()

virtual const ThingTemplate * RebuildHoleBehavior::getRebuildTemplate ( ) const
inlinevirtual

Implements RebuildHoleBehaviorInterface.

Definition at line 105 of file RebuildHoleBehavior.h.

◆ getReconstructedBuildingID()

virtual ObjectID RebuildHoleBehavior::getReconstructedBuildingID ( void )
inlinevirtual

Implements RebuildHoleBehaviorInterface.

Definition at line 104 of file RebuildHoleBehavior.h.

◆ getSpawnerID()

virtual ObjectID RebuildHoleBehavior::getSpawnerID ( void )
inlinevirtual

Implements RebuildHoleBehaviorInterface.

Definition at line 103 of file RebuildHoleBehavior.h.

◆ newWorkerRespawnProcess()

void RebuildHoleBehavior::newWorkerRespawnProcess ( Object * existingWorker)
protected

start the worker respawn process (again if existingWorker is non NULL)

we need to start all the timers and ID ties to make a new worker at the correct time

Definition at line 120 of file RebuildHoleBehavior.cpp.

◆ onDie()

void RebuildHoleBehavior::onDie ( const DamageInfo * damageInfo)
virtual

Implements DieModuleInterface.

Definition at line 343 of file RebuildHoleBehavior.cpp.

◆ startRebuildProcess()

void RebuildHoleBehavior::startRebuildProcess ( const ThingTemplate * rebuild,
ObjectID spawnerID )
virtual

Implements RebuildHoleBehaviorInterface.

Definition at line 148 of file RebuildHoleBehavior.cpp.

◆ transferBombs()

void RebuildHoleBehavior::transferBombs ( Object * reconstruction)

end startRebuildProcess

Definition at line 165 of file RebuildHoleBehavior.cpp.

◆ update()

UpdateSleepTime RebuildHoleBehavior::update ( void )
virtual

Implements UpdateModule.

Definition at line 188 of file RebuildHoleBehavior.cpp.

Member Data Documentation

◆ m_rebuildTemplate

const ThingTemplate* RebuildHoleBehavior::m_rebuildTemplate
protected

what we are rebuilding

Definition at line 120 of file RebuildHoleBehavior.h.

◆ m_reconstructingID

ObjectID RebuildHoleBehavior::m_reconstructingID
protected

ID of the object we're reconstructing.

Definition at line 116 of file RebuildHoleBehavior.h.

◆ m_spawnerObjectID

ObjectID RebuildHoleBehavior::m_spawnerObjectID
protected

Object that was killed and therefore the object that created this hole.

Definition at line 117 of file RebuildHoleBehavior.h.

◆ m_workerID

ObjectID RebuildHoleBehavior::m_workerID
protected

id of the worker that will rebuild us

Definition at line 115 of file RebuildHoleBehavior.h.

◆ m_workerTemplate

const ThingTemplate* RebuildHoleBehavior::m_workerTemplate
protected

template of the worker to make

Definition at line 119 of file RebuildHoleBehavior.h.

◆ m_workerWaitCounter

UnsignedInt RebuildHoleBehavior::m_workerWaitCounter
protected

when this reaches zero we spawn a worker after death

Definition at line 118 of file RebuildHoleBehavior.h.


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