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

#include <ParkingPlaceBehavior.h>

Inherits UpdateModule, DieModuleInterface, ParkingPlaceBehaviorInterface, and ExitInterface.

Public Member Functions

 ParkingPlaceBehavior (Thing *thing, const ModuleData *moduleData)
 
virtual DieModuleInterfacegetDie (void)
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual ExitInterfacegetUpdateExitInterface ()
 
virtual Bool isExitBusy () const
 Contain style exiters are getting the ability to space out exits, so ask this before reserveDoor as a kind of no-commitment check.
 
virtual ExitDoorType reserveDoorForExit (const ThingTemplate *objType, Object *specificObject)
 All types can answer if they are free to exit or not, and you can ask about a specific guy or just exit anything in general.
 
virtual void exitObjectViaDoor (Object *newObj, ExitDoorType exitDoor)
 Here is the object for you to exit to the world in your own special way.
 
virtual void unreserveDoorForExit (ExitDoorType exitDoor)
 if you get permission to exit, but then don't/can't call exitObjectViaDoor, you should call this to "give up" your permission
 
virtual void exitObjectByBudding (Object *newObj, Object *budHost)
 puts new spawn on top of an existing one
 
virtual Bool getExitPosition (Coord3D &rallyPoint) const
 
virtual Bool getNaturalRallyPoint (Coord3D &rallyPoint, Bool offset=TRUE) const
 get the natural "rally point" for units to move towards
 
virtual void setRallyPoint (const Coord3D *pos)
 define a "rally point" for units to move towards
 
virtual const Coord3DgetRallyPoint (void) const
 define a "rally point" for units to move towards
 
virtual UpdateSleepTime update ()
 
virtual void onDie (const DamageInfo *damageInfo)
 
virtual Bool shouldReserveDoorWhenQueued (const ThingTemplate *thing) const
 
virtual Bool hasAvailableSpaceFor (const ThingTemplate *thing) const
 
virtual Bool hasReservedSpace (ObjectID id) const
 
virtual Int getSpaceIndex (ObjectID id) const
 
virtual Bool reserveSpace (ObjectID id, Real parkingOffset, PPInfo *info)
 
virtual void releaseSpace (ObjectID id)
 
virtual Bool reserveRunway (ObjectID id, Bool forLanding)
 
virtual void releaseRunway (ObjectID id)
 
virtual void calcPPInfo (ObjectID id, PPInfo *info)
 
virtual Int getRunwayCount () const
 
virtual ObjectID getRunwayReservation (Int r, RunwayReservationType type)
 
virtual void transferRunwayReservationToNextInLineForTakeoff (ObjectID id)
 
virtual Real getApproachHeight () const
 
virtual Real getLandingDeckHeightOffset () const
 
virtual void setHealee (Object *healee, Bool add)
 
virtual void killAllParkedUnits ()
 
virtual void defectAllParkedUnits (Team *newTeam, UnsignedInt detectionTime)
 
virtual Bool calcBestParkingAssignment (ObjectID id, Coord3D *pos, Int *oldIndex=NULL, Int *newIndex=NULL)
 
virtual const std::vector< Coord3D > * getTaxiLocations (ObjectID id) const
 
virtual const std::vector< Coord3D > * getCreationLocations (ObjectID id) const
 
- 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 RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
virtual BridgeBehaviorInterfacegetBridgeBehaviorInterface ()
 
virtual BridgeTowerBehaviorInterfacegetBridgeTowerBehaviorInterface ()
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual OverchargeBehaviorInterfacegetOverchargeBehaviorInterface ()
 
virtual TransportPassengerInterfacegetTransportPassengerInterface ()
 
virtual CaveInterfacegetCaveInterface ()
 
virtual LandMineInterfacegetLandMineInterface ()
 
virtual DieModuleInterfacegetEjectPilotDieInterface ()
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual AIUpdateInterfacegetAIUpdateInterface ()
 
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)
 
- Public Member Functions inherited from ExitInterface
virtual void exitObjectInAHurry (Object *newObj)
 
virtual Bool useSpawnRallyPoint (void) const
 

Static Public Member Functions

static Int getInterfaceMask ()
 
- 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 96 of file ParkingPlaceBehavior.h.

Constructor & Destructor Documentation

◆ ParkingPlaceBehavior()

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

Definition at line 56 of file ParkingPlaceBehavior.cpp.

Member Function Documentation

◆ calcBestParkingAssignment()

virtual Bool ParkingPlaceBehavior::calcBestParkingAssignment ( ObjectID id,
Coord3D * pos,
Int * oldIndex = NULL,
Int * newIndex = NULL )
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 153 of file ParkingPlaceBehavior.h.

◆ calcPPInfo()

void ParkingPlaceBehavior::calcPPInfo ( ObjectID id,
PPInfo * info )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 381 of file ParkingPlaceBehavior.cpp.

◆ defectAllParkedUnits()

void ParkingPlaceBehavior::defectAllParkedUnits ( Team * newTeam,
UnsignedInt detectionTime )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 599 of file ParkingPlaceBehavior.cpp.

◆ exitObjectByBudding()

virtual void ParkingPlaceBehavior::exitObjectByBudding ( Object * newObj,
Object * budHost )
inlinevirtual

puts new spawn on top of an existing one

Implements ExitInterface.

Definition at line 122 of file ParkingPlaceBehavior.h.

◆ exitObjectViaDoor()

void ParkingPlaceBehavior::exitObjectViaDoor ( Object * newObj,
ExitDoorType exitDoor )
virtual

Here is the object for you to exit to the world in your own special way.

Todo
srj – this is evil. fix.

Implements ExitInterface.

Definition at line 743 of file ParkingPlaceBehavior.cpp.

◆ getApproachHeight()

virtual Real ParkingPlaceBehavior::getApproachHeight ( ) const
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 148 of file ParkingPlaceBehavior.h.

◆ getCreationLocations()

virtual const std::vector< Coord3D > * ParkingPlaceBehavior::getCreationLocations ( ObjectID id) const
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 155 of file ParkingPlaceBehavior.h.

◆ getDie()

virtual DieModuleInterface * ParkingPlaceBehavior::getDie ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 113 of file ParkingPlaceBehavior.h.

◆ getExitPosition()

Bool ParkingPlaceBehavior::getExitPosition ( Coord3D & rallyPoint) const
virtual

Reimplemented from ExitInterface.

Definition at line 883 of file ParkingPlaceBehavior.cpp.

◆ getInterfaceMask()

static Int ParkingPlaceBehavior::getInterfaceMask ( void )
inlinestatic

Definition at line 110 of file ParkingPlaceBehavior.h.

◆ getLandingDeckHeightOffset()

virtual Real ParkingPlaceBehavior::getLandingDeckHeightOffset ( ) const
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 149 of file ParkingPlaceBehavior.h.

◆ getNaturalRallyPoint()

Bool ParkingPlaceBehavior::getNaturalRallyPoint ( Coord3D & rallyPoint,
Bool offset = TRUE ) const
virtual

get the natural "rally point" for units to move towards

Reimplemented from ExitInterface.

Definition at line 890 of file ParkingPlaceBehavior.cpp.

◆ getParkingPlaceBehaviorInterface()

virtual ParkingPlaceBehaviorInterface * ParkingPlaceBehavior::getParkingPlaceBehaviorInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 114 of file ParkingPlaceBehavior.h.

◆ getRallyPoint()

const Coord3D * ParkingPlaceBehavior::getRallyPoint ( void ) const
virtual

define a "rally point" for units to move towards

Implements ExitInterface.

Definition at line 871 of file ParkingPlaceBehavior.cpp.

◆ getRunwayCount()

virtual Int ParkingPlaceBehavior::getRunwayCount ( ) const
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 145 of file ParkingPlaceBehavior.h.

◆ getRunwayReservation()

ObjectID ParkingPlaceBehavior::getRunwayReservation ( Int r,
RunwayReservationType type )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 452 of file ParkingPlaceBehavior.cpp.

◆ getSpaceIndex()

Int ParkingPlaceBehavior::getSpaceIndex ( ObjectID id) const
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 239 of file ParkingPlaceBehavior.cpp.

◆ getTaxiLocations()

virtual const std::vector< Coord3D > * ParkingPlaceBehavior::getTaxiLocations ( ObjectID id) const
inlinevirtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 154 of file ParkingPlaceBehavior.h.

◆ getUpdateExitInterface()

virtual ExitInterface * ParkingPlaceBehavior::getUpdateExitInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 115 of file ParkingPlaceBehavior.h.

◆ hasAvailableSpaceFor()

Bool ParkingPlaceBehavior::hasAvailableSpaceFor ( const ThingTemplate * thing) const
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 301 of file ParkingPlaceBehavior.cpp.

◆ hasReservedSpace()

Bool ParkingPlaceBehavior::hasReservedSpace ( ObjectID id) const
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 222 of file ParkingPlaceBehavior.cpp.

◆ isExitBusy()

virtual Bool ParkingPlaceBehavior::isExitBusy ( ) const
inlinevirtual

Contain style exiters are getting the ability to space out exits, so ask this before reserveDoor as a kind of no-commitment check.

Implements ExitInterface.

Definition at line 118 of file ParkingPlaceBehavior.h.

◆ killAllParkedUnits()

void ParkingPlaceBehavior::killAllParkedUnits ( )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 638 of file ParkingPlaceBehavior.cpp.

◆ onDie()

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

Implements DieModuleInterface.

Definition at line 667 of file ParkingPlaceBehavior.cpp.

◆ releaseRunway()

void ParkingPlaceBehavior::releaseRunway ( ObjectID id)
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 529 of file ParkingPlaceBehavior.cpp.

◆ releaseSpace()

void ParkingPlaceBehavior::releaseSpace ( ObjectID id)
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 426 of file ParkingPlaceBehavior.cpp.

◆ reserveDoorForExit()

ExitDoorType ParkingPlaceBehavior::reserveDoorForExit ( const ThingTemplate * objType,
Object * specificObject )
virtual

All types can answer if they are free to exit or not, and you can ask about a specific guy or just exit anything in general.

Implements ExitInterface.

Definition at line 719 of file ParkingPlaceBehavior.cpp.

◆ reserveRunway()

Bool ParkingPlaceBehavior::reserveRunway ( ObjectID id,
Bool forLanding )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 477 of file ParkingPlaceBehavior.cpp.

◆ reserveSpace()

Bool ParkingPlaceBehavior::reserveSpace ( ObjectID id,
Real parkingOffset,
ParkingPlaceBehaviorInterface::PPInfo * info )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 333 of file ParkingPlaceBehavior.cpp.

◆ setHealee()

void ParkingPlaceBehavior::setHealee ( Object * healee,
Bool add )
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 566 of file ParkingPlaceBehavior.cpp.

◆ setRallyPoint()

void ParkingPlaceBehavior::setRallyPoint ( const Coord3D * pos)
virtual

define a "rally point" for units to move towards

Implements ExitInterface.

Definition at line 863 of file ParkingPlaceBehavior.cpp.

◆ shouldReserveDoorWhenQueued()

Bool ParkingPlaceBehavior::shouldReserveDoorWhenQueued ( const ThingTemplate * thing) const
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 291 of file ParkingPlaceBehavior.cpp.

◆ transferRunwayReservationToNextInLineForTakeoff()

void ParkingPlaceBehavior::transferRunwayReservationToNextInLineForTakeoff ( ObjectID id)
virtual

Implements ParkingPlaceBehaviorInterface.

Definition at line 461 of file ParkingPlaceBehavior.cpp.

◆ unreserveDoorForExit()

void ParkingPlaceBehavior::unreserveDoorForExit ( ExitDoorType exitDoor)
virtual

if you get permission to exit, but then don't/can't call exitObjectViaDoor, you should call this to "give up" your permission

Implements ExitInterface.

Definition at line 843 of file ParkingPlaceBehavior.cpp.

◆ update()

UpdateSleepTime ParkingPlaceBehavior::update ( void )
virtual

Implements UpdateModule.

Definition at line 673 of file ParkingPlaceBehavior.cpp.


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