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

#include <SpawnBehavior.h>

Inherits UpdateModule, SpawnBehaviorInterface, DieModuleInterface, and DamageModuleInterface.

Public Member Functions

 SpawnBehavior (Thing *thing, const ModuleData *moduleData)
 
virtual void onDelete (void)
 
virtual UpdateModuleInterfacegetUpdate ()
 
virtual DieModuleInterfacegetDie ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual SpawnBehaviorInterfacegetSpawnBehaviorInterface ()
 
virtual UpdateSleepTime update ()
 
virtual void onDie (const DamageInfo *damageInfo)
 
virtual void onDamage (DamageInfo *damageInfo)
 
virtual void onHealing (DamageInfo *damageInfo)
 healing callback
 
virtual void onBodyDamageStateChange (const DamageInfo *damageInfo, BodyDamageType oldState, BodyDamageType newState)
 state change callback
 
virtual Bool maySpawnSelfTaskAI (Real maxSelfTaskersRatio)
 
virtual void onSpawnDeath (ObjectID deadSpawn, DamageInfo *damageInfo)
 Something we spawned and set up to tell us it died just died.
 
virtual ObjectgetClosestSlave (const Coord3D *pos)
 
virtual void orderSlavesToAttackTarget (Object *target, Int maxShotsToFire, CommandSourceType cmdSource)
 
virtual void orderSlavesToAttackPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 
virtual CanAttackResult getCanAnySlavesAttackSpecificTarget (AbleToAttackType attackType, const Object *target, CommandSourceType cmdSource)
 
virtual CanAttackResult getCanAnySlavesUseWeaponAgainstTarget (AbleToAttackType attackType, const Object *victim, const Coord3D *pos, CommandSourceType cmdSource)
 
virtual Bool canAnySlavesAttack ()
 
virtual void orderSlavesToGoIdle (CommandSourceType cmdSource)
 
virtual void orderSlavesDisabledUntil (DisabledType type, UnsignedInt frame)
 
virtual void orderSlavesToClearDisabled (DisabledType type)
 
virtual void giveSlavesStealthUpgrade (Bool grantStealth)
 
virtual Bool areAllSlavesStealthed () const
 
virtual void revealSlaves ()
 
virtual Bool doSlavesHaveFreedom () const
 
void stopSpawning ()
 Whoever owns this module may want to turn it off.
 
void startSpawning ()
 Whoever owns this module may want to turn it on.
 
void computeAggregateStates (void)
 
- Public Member Functions inherited from UpdateModule
 UpdateModule (Thing *thing, const ModuleData *moduleData)
 
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 DestroyModuleInterfacegetDestroy ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
virtual UpgradeModuleInterfacegetUpgrade ()
 
virtual StealthUpdategetStealth ()
 
virtual SpyVisionUpdategetSpyVisionUpdate ()
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
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 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
 
- 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 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)
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 135 of file SpawnBehavior.h.

Constructor & Destructor Documentation

◆ SpawnBehavior()

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

Definition at line 62 of file SpawnBehavior.cpp.

Member Function Documentation

◆ areAllSlavesStealthed()

Bool SpawnBehavior::areAllSlavesStealthed ( ) const
virtual

Implements SpawnBehaviorInterface.

Definition at line 1024 of file SpawnBehavior.cpp.

◆ canAnySlavesAttack()

Bool SpawnBehavior::canAnySlavesAttack ( )
virtual

Implements SpawnBehaviorInterface.

Definition at line 499 of file SpawnBehavior.cpp.

◆ computeAggregateStates()

void SpawnBehavior::computeAggregateStates ( void )

Definition at line 863 of file SpawnBehavior.cpp.

◆ doSlavesHaveFreedom()

virtual Bool SpawnBehavior::doSlavesHaveFreedom ( ) const
inlinevirtual

Implements SpawnBehaviorInterface.

Definition at line 185 of file SpawnBehavior.h.

◆ getCanAnySlavesAttackSpecificTarget()

CanAttackResult SpawnBehavior::getCanAnySlavesAttackSpecificTarget ( AbleToAttackType attackType,
const Object * target,
CommandSourceType cmdSource )
virtual

Implements SpawnBehaviorInterface.

Definition at line 410 of file SpawnBehavior.cpp.

◆ getCanAnySlavesUseWeaponAgainstTarget()

CanAttackResult SpawnBehavior::getCanAnySlavesUseWeaponAgainstTarget ( AbleToAttackType attackType,
const Object * victim,
const Coord3D * pos,
CommandSourceType cmdSource )
virtual

Implements SpawnBehaviorInterface.

Definition at line 448 of file SpawnBehavior.cpp.

◆ getClosestSlave()

Object * SpawnBehavior::getClosestSlave ( const Coord3D * pos)
virtual

Implements SpawnBehaviorInterface.

Definition at line 306 of file SpawnBehavior.cpp.

◆ getDamage()

virtual DamageModuleInterface * SpawnBehavior::getDamage ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 154 of file SpawnBehavior.h.

◆ getDie()

virtual DieModuleInterface * SpawnBehavior::getDie ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 153 of file SpawnBehavior.h.

◆ getInterfaceMask()

static Int SpawnBehavior::getInterfaceMask ( void )
inlinestatic

Definition at line 150 of file SpawnBehavior.h.

◆ getSpawnBehaviorInterface()

virtual SpawnBehaviorInterface * SpawnBehavior::getSpawnBehaviorInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 155 of file SpawnBehavior.h.

◆ getUpdate()

virtual UpdateModuleInterface * SpawnBehavior::getUpdate ( void )
inlinevirtual

Reimplemented from UpdateModule.

Definition at line 152 of file SpawnBehavior.h.

◆ giveSlavesStealthUpgrade()

void SpawnBehavior::giveSlavesStealthUpgrade ( Bool grantStealth)
virtual

Implements SpawnBehaviorInterface.

Definition at line 486 of file SpawnBehavior.cpp.

◆ maySpawnSelfTaskAI()

Bool SpawnBehavior::maySpawnSelfTaskAI ( Real maxSelfTaskersRatio)
virtual

Implements SpawnBehaviorInterface.

Definition at line 276 of file SpawnBehavior.cpp.

◆ onBodyDamageStateChange()

virtual void SpawnBehavior::onBodyDamageStateChange ( const DamageInfo * damageInfo,
BodyDamageType oldState,
BodyDamageType newState )
inlinevirtual

state change callback

Implements DamageModuleInterface.

Definition at line 166 of file SpawnBehavior.h.

◆ onDamage()

void SpawnBehavior::onDamage ( DamageInfo * info)
virtual

When I become damaged

Implements DamageModuleInterface.

Definition at line 800 of file SpawnBehavior.cpp.

◆ onDelete()

void SpawnBehavior::onDelete ( void )
virtual

onDelete() will be called on all modules contained by an object or drawable before the actual deletion of each of those modules happens

Reimplemented from Module.

Definition at line 108 of file SpawnBehavior.cpp.

◆ onDie()

void SpawnBehavior::onDie ( const DamageInfo * damageInfo)
virtual
Todo
isDieApplicable should be called outside of the onDie call

Implements DieModuleInterface.

Definition at line 142 of file SpawnBehavior.cpp.

◆ onHealing()

virtual void SpawnBehavior::onHealing ( DamageInfo * damageInfo)
inlinevirtual

healing callback

Implements DamageModuleInterface.

Definition at line 165 of file SpawnBehavior.h.

◆ onSpawnDeath()

void SpawnBehavior::onSpawnDeath ( ObjectID deadSpawn,
DamageInfo * damageInfo )
virtual

Something we spawned and set up to tell us it died just died.

Implements SpawnBehaviorInterface.

Definition at line 754 of file SpawnBehavior.cpp.

◆ orderSlavesDisabledUntil()

void SpawnBehavior::orderSlavesDisabledUntil ( DisabledType type,
UnsignedInt frame )
virtual

Implements SpawnBehaviorInterface.

Definition at line 379 of file SpawnBehavior.cpp.

◆ orderSlavesToAttackPosition()

void SpawnBehavior::orderSlavesToAttackPosition ( const Coord3D * pos,
Int maxShotsToFire,
CommandSourceType cmdSource )
virtual

Implements SpawnBehaviorInterface.

Definition at line 345 of file SpawnBehavior.cpp.

◆ orderSlavesToAttackTarget()

void SpawnBehavior::orderSlavesToAttackTarget ( Object * target,
Int maxShotsToFire,
CommandSourceType cmdSource )
virtual

Implements SpawnBehaviorInterface.

Definition at line 328 of file SpawnBehavior.cpp.

◆ orderSlavesToClearDisabled()

void SpawnBehavior::orderSlavesToClearDisabled ( DisabledType type)
virtual

Implements SpawnBehaviorInterface.

Definition at line 397 of file SpawnBehavior.cpp.

◆ orderSlavesToGoIdle()

void SpawnBehavior::orderSlavesToGoIdle ( CommandSourceType cmdSource)
virtual

Implements SpawnBehaviorInterface.

Definition at line 362 of file SpawnBehavior.cpp.

◆ revealSlaves()

void SpawnBehavior::revealSlaves ( )
virtual

Implements SpawnBehaviorInterface.

Definition at line 1045 of file SpawnBehavior.cpp.

◆ startSpawning()

void SpawnBehavior::startSpawning ( )

Whoever owns this module may want to turn it on.

Definition at line 792 of file SpawnBehavior.cpp.

◆ stopSpawning()

void SpawnBehavior::stopSpawning ( )

Whoever owns this module may want to turn it off.

Definition at line 786 of file SpawnBehavior.cpp.

◆ update()

UpdateSleepTime SpawnBehavior::update ( void )
virtual
Todo
srj use SLEEPY_UPDATE here

Implements UpdateModule.

Definition at line 200 of file SpawnBehavior.cpp.


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