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

#include <OpenContain.h>

Inherits UpdateModule, ContainModuleInterface, CollideModuleInterface, DieModuleInterface, DamageModuleInterface, and ExitInterface.

Inherited by CaveContain, GarrisonContain, HealContain, MobNexusContain, ParachuteContain, TransportContain, and TunnelContain.

Public Member Functions

 OpenContain (Thing *thing, const ModuleData *moduleData)
 
virtual ContainModuleInterfacegetContain ()
 
virtual CollideModuleInterfacegetCollide ()
 
virtual DieModuleInterfacegetDie ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual void onDie (const DamageInfo *damageInfo)
 the die callback
 
virtual void onDelete (void)
 Last possible moment cleanup.
 
virtual void onCapture (Player *oldOwner, Player *newOwner)
 
virtual void onCollide (Object *other, const Coord3D *loc, const Coord3D *normal)
 
virtual Bool wouldLikeToCollideWith (const Object *other) const
 
virtual Bool isCarBombCrateCollide () const
 
virtual Bool isHijackedVehicleCrateCollide () const
 
virtual Bool isRailroad () const
 
virtual Bool isSalvageCrateCollide () const
 
virtual Bool isSabotageBuildingCrateCollide () const
 
virtual UpdateSleepTime update ()
 called once per frame
 
virtual OpenContainasOpenContain ()
 treat as open container
 
virtual void onDamage (DamageInfo *damageInfo)
 damage callback
 
virtual void onHealing (DamageInfo *damageInfo)
 damage callback
 
virtual void onBodyDamageStateChange (const DamageInfo *damageInfo, BodyDamageType oldState, BodyDamageType newState)
 healing callback
 
virtual void containReactToTransformChange ()
 state change callback
 
virtual Bool calcBestGarrisonPosition (Coord3D *sourcePos, const Coord3D *targetPos)
 
virtual Bool attemptBestFirePointPosition (Object *source, Weapon *weapon, Object *victim)
 
virtual Bool attemptBestFirePointPosition (Object *source, Weapon *weapon, const Coord3D *targetPos)
 
virtual void clientVisibleContainedFlashAsSelected ()
 
virtual const PlayergetApparentControllingPlayer (const Player *observingPlayer) const
 
virtual void recalcApparentControllingPlayer ()
 
virtual void onContaining (Object *obj, Bool wasSelected)
 object now contains 'obj'
 
virtual void onRemoving (Object *obj)
 object no longer contains 'obj'
 
virtual void onSelling ()
 Container is being sold. Open responds by kicking people out.
 
virtual void orderAllPassengersToExit (CommandSourceType commandSource, Bool instantly)
 All of the smarts of exiting are in the passenger's AIExit. removeAllFrommContain is a last ditch system call, this is the game Evacuate.
 
virtual void orderAllPassengersToIdle (CommandSourceType commandSource)
 Just like it sounds.
 
virtual void orderAllPassengersToHackInternet (CommandSourceType)
 Just like it sounds.
 
virtual void markAllPassengersDetected ()
 Cool game stuff got added to the system calls since this layer didn't exist, so this regains that functionality.
 
virtual Bool isValidContainerFor (const Object *obj, Bool checkCapacity) const
 
virtual void addToContain (Object *obj)
 add 'obj' to contain list
 
virtual void addToContainList (Object *obj)
 The part of AddToContain that inheritors can override (Can't do whole thing because of all the private stuff involved)
 
virtual void removeFromContain (Object *obj, Bool exposeStealthUnits=FALSE)
 remove 'obj' from contain list
 
virtual void removeAllContained (Bool exposeStealthUnits=FALSE)
 remove all objects on contain list
 
virtual void killAllContained (void)
 kill all objects on contain list
 
virtual void harmAndForceExitAllContained (DamageInfo *info)
 
virtual Bool isEnclosingContainerFor (const Object *obj) const
 Does this type of Contain Visibly enclose its contents?
 
virtual Bool isPassengerAllowedToFire (ObjectID id=INVALID_ID) const
 Hey, can I shoot out of this container?
 
virtual void setPassengerAllowedToFire (Bool permission=TRUE)
 Hey, can I shoot out of this container?
 
virtual void setOverrideDestination (const Coord3D *)
 Instead of falling peacefully towards a clear spot, I will now aim here.
 
virtual Bool isDisplayedOnControlBar () const
 Does this container display its contents on the ControlBar?
 
virtual Int getExtraSlotsInUse (void)
 
virtual Bool isKickOutOnCapture ()
 By default, yes, all contain modules kick passengers out on capture.
 
virtual void iterateContained (ContainIterateFunc func, void *userData, Bool reverse)
 
virtual UnsignedInt getContainCount () const
 contained count
 
virtual const ContainedItemsListgetContainedItemsList () const
 
virtual const Objectfriend_getRider () const
 Damn. The draw order dependency bug for riders means that our draw module needs to cheat to get around it.
 
virtual Real getContainedItemsMass () const
 
virtual UnsignedInt getStealthUnitsContained () const
 
virtual PlayerMaskType getPlayerWhoEntered (void) const
 
virtual Int getContainMax () const
 The max needs to be virtual, but only two inheritors care. -1 means "I don't care".
 
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)
 
virtual void exitObjectInAHurry (Object *newObj)
 
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 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 Bool getExitPosition (Coord3D &exitPosition) const
 
virtual Bool getNaturalRallyPoint (Coord3D &rallyPoint, Bool offset=TRUE) const
 access to the "Door" position of the production object
 
virtual ExitInterfacegetContainExitInterface ()
 
virtual Bool isGarrisonable () const
 can this unit be Garrisoned? (ick)
 
virtual Bool isBustable () const
 can this container get busted by a bunkerbuster
 
virtual Bool isHealContain () const
 true when container only contains units while healing (not a transport!)
 
virtual Bool isTunnelContain () const
 
virtual Bool isRiderChangeContain () const
 
virtual Bool isSpecialZeroSlotContainer () const
 
virtual Bool isImmuneToClearBuildingAttacks () const
 
virtual Bool isSpecialOverlordStyleContainer () const
 
virtual Bool isAnyRiderAttacking (void) const
 
virtual void onObjectWantsToEnterOrExit (Object *obj, ObjectEnterExitType wants)
 
virtual Bool hasObjectsWantingToEnterOrExit () const
 
virtual void processDamageToContained (Real percentDamage)
 Do our % damage to units now.
 
virtual Bool isWeaponBonusPassedToPassengers () const
 
virtual WeaponBonusConditionFlags getWeaponBonusPassedToPassengers () const
 
virtual void enableLoadSounds (Bool enable)
 
Real getDamagePercentageToUnits (void)
 
virtual ObjectgetClosestRider (const Coord3D *pos)
 
virtual void setEvacDisposition (EvacDisposition disp)
 
- 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 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 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 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)
 
- Public Member Functions inherited from ContainModuleInterface
virtual Bool getContainerPipsToShow (Int &numTotal, Int &numFull)
 
- Public Member Functions inherited from ExitInterface
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)
 

Protected Member Functions

virtual void monitorConditionChanges (void)
 check to see if we need to update our occupant postions from a model change or anything else
 
virtual void putObjAtNextFirePoint (Object *obj)
 place object at position of the next fire point to use
 
virtual void redeployOccupants (void)
 redeploy any objects at firepoints due to a model condition change
 
const ContainedItemsListgetContainList () const
 
void scatterToNearbyPosition (Object *obj)
 
void removeFromContainViaIterator (ContainedItemsList::iterator it, Bool exposeStealthUnits=FALSE)
 remove item from contain list
 
void removeFromPassengerViaIterator (ContainedItemsList::iterator it)
 remove item from passenger list
 
virtual void doLoadSound ()
 
virtual void doUnloadSound ()
 
virtual void positionContainedObjectsRelativeToContainer ()
 
virtual void addOrRemoveObjFromWorld (Object *obj, Bool add)
 
virtual void killRidersWhoAreNotFreeToExit ()
 
void pruneDeadWanters ()
 
- 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

ContainedItemsList m_containList
 the list of contained objects
 
UnsignedInt m_containListSize
 size of contained list
 

Detailed Description

An open container can actually contain other objects

Definition at line 83 of file OpenContain.h.

Constructor & Destructor Documentation

◆ OpenContain()

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

Definition at line 126 of file OpenContain.cpp.

Member Function Documentation

◆ addOrRemoveObjFromWorld()

void OpenContain::addOrRemoveObjFromWorld ( Object * obj,
Bool add )
protectedvirtual

Definition at line 223 of file OpenContain.cpp.

◆ addToContain()

void OpenContain::addToContain ( Object * rider)
virtual

add 'obj' to contain list

Add 'rider' to the m_containList of objects in this module. This will trigger an onContaining event for the object that this module is a part of and an onContainedBy event for the object being contained

Implements ContainModuleInterface.

Reimplemented in HelixContain, and OverlordContain.

Definition at line 287 of file OpenContain.cpp.

◆ addToContainList()

void OpenContain::addToContainList ( Object * obj)
virtual

The part of AddToContain that inheritors can override (Can't do whole thing because of all the private stuff involved)

Implements ContainModuleInterface.

Reimplemented in CaveContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 367 of file OpenContain.cpp.

◆ asOpenContain()

virtual OpenContain * OpenContain::asOpenContain ( )
inlinevirtual

treat as open container

Implements ContainModuleInterface.

Reimplemented in CaveContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 122 of file OpenContain.h.

◆ attemptBestFirePointPosition() [1/2]

virtual Bool OpenContain::attemptBestFirePointPosition ( Object * source,
Weapon * weapon,
const Coord3D * targetPos )
inlinevirtual

if my object gets selected, then my visible passengers should, too this gets called from

Implements ContainModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 137 of file OpenContain.h.

◆ attemptBestFirePointPosition() [2/2]

virtual Bool OpenContain::attemptBestFirePointPosition ( Object * source,
Weapon * weapon,
Object * victim )
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 136 of file OpenContain.h.

◆ calcBestGarrisonPosition()

virtual Bool OpenContain::calcBestGarrisonPosition ( Coord3D * sourcePos,
const Coord3D * targetPos )
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 135 of file OpenContain.h.

◆ clientVisibleContainedFlashAsSelected()

virtual void OpenContain::clientVisibleContainedFlashAsSelected ( )
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in HelixContain, and OverlordContain.

Definition at line 141 of file OpenContain.h.

◆ containReactToTransformChange()

void OpenContain::containReactToTransformChange ( )
virtual

state change callback

Implements ContainModuleInterface.

Reimplemented in ParachuteContain.

Definition at line 192 of file OpenContain.cpp.

◆ doLoadSound()

void OpenContain::doLoadSound ( )
protectedvirtual

Definition at line 498 of file OpenContain.cpp.

◆ doUnloadSound()

void OpenContain::doUnloadSound ( )
protectedvirtual

Definition at line 522 of file OpenContain.cpp.

◆ enableLoadSounds()

virtual void OpenContain::enableLoadSounds ( Bool enable)
inlinevirtual

Implements ContainModuleInterface.

Definition at line 228 of file OpenContain.h.

◆ exitObjectByBudding()

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

puts new spawn on top of an existing one

Implements ExitInterface.

Reimplemented in GarrisonContain, and RailedTransportContain.

Definition at line 193 of file OpenContain.h.

◆ exitObjectInAHurry()

void OpenContain::exitObjectInAHurry ( Object * exitObj)
virtual

This call is used to evacuate units from a tunnel network via a persistent state (guard tunnel networ). The main difference between this and exitObjectViaDoor is that this exit doesn't change the current ai state, so the guard state doesn't get blown away. jba.

Todo
srj – for now, OpenContain assumes at most one door

<

Todo
This really should be automatically wrapped up in an activation sequence for objects in general

Reimplemented from ExitInterface.

Definition at line 1060 of file OpenContain.cpp.

◆ exitObjectViaDoor()

void OpenContain::exitObjectViaDoor ( Object * exitObj,
ExitDoorType exitDoor )
virtual

This new call is going to replace all game callings of removeFromContain. Consider rFC a 'system' call, while this is a 'game' call. rFC will pull from the contained list and just plop the guy in the world, this function will then override that location with cool game stuff.

Exit and Evacuate can fail, removeAllContain and removeFromContain cannot.

Todo
srj – for now, OpenContain assumes at most one door

<

Todo
This really should be automatically wrapped up in an activation sequence for objects in general

<

Todo
This really should be automatically wrapped up in an activation sequence for objects in general

Implements ExitInterface.

Reimplemented in GarrisonContain, and RailedTransportContain.

Definition at line 939 of file OpenContain.cpp.

◆ friend_getRider()

virtual const Object * OpenContain::friend_getRider ( ) const
inlinevirtual

Damn. The draw order dependency bug for riders means that our draw module needs to cheat to get around it.

Implements ContainModuleInterface.

Reimplemented in HelixContain, OverlordContain, and RiderChangeContain.

Definition at line 177 of file OpenContain.h.

◆ getApparentControllingPlayer()

virtual const Player * OpenContain::getApparentControllingPlayer ( const Player * observingPlayer) const
inlinevirtual

return the player that appears to control this unit, given an observing player. if null, use getObject()->getControllingPlayer() instead.

Implements ContainModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 143 of file OpenContain.h.

◆ getClosestRider()

Object * OpenContain::getClosestRider ( const Coord3D * pos)
virtual

Implements ContainModuleInterface.

Definition at line 586 of file OpenContain.cpp.

◆ getCollide()

virtual CollideModuleInterface * OpenContain::getCollide ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 100 of file OpenContain.h.

◆ getContain()

virtual ContainModuleInterface * OpenContain::getContain ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 99 of file OpenContain.h.

◆ getContainCount()

virtual UnsignedInt OpenContain::getContainCount ( ) const
inlinevirtual

contained count

Implements ContainModuleInterface.

Reimplemented in CaveContain, OverlordContain, and TunnelContain.

Definition at line 175 of file OpenContain.h.

◆ getContainedItemsList()

virtual const ContainedItemsList * OpenContain::getContainedItemsList ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in CaveContain, OverlordContain, and TunnelContain.

Definition at line 176 of file OpenContain.h.

◆ getContainedItemsMass()

Real OpenContain::getContainedItemsMass ( ) const
virtual
Todo
srj – may want to cache this information.

Implements ContainModuleInterface.

Definition at line 767 of file OpenContain.cpp.

◆ getContainExitInterface()

virtual ExitInterface * OpenContain::getContainExitInterface ( )
inlinevirtual

Implements ContainModuleInterface.

Definition at line 200 of file OpenContain.h.

◆ getContainList()

const ContainedItemsList & OpenContain::getContainList ( ) const
inlineprotected

Definition at line 240 of file OpenContain.h.

◆ getContainMax()

Int OpenContain::getContainMax ( ) const
virtual

The max needs to be virtual, but only two inheritors care. -1 means "I don't care".

Implements ContainModuleInterface.

Reimplemented in CaveContain, MobNexusContain, OverlordContain, RiderChangeContain, TransportContain, and TunnelContain.

Definition at line 164 of file OpenContain.cpp.

◆ getDamage()

virtual DamageModuleInterface * OpenContain::getDamage ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 102 of file OpenContain.h.

◆ getDamagePercentageToUnits()

Real OpenContain::getDamagePercentageToUnits ( void )

Definition at line 1490 of file OpenContain.cpp.

◆ getDie()

virtual DieModuleInterface * OpenContain::getDie ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 101 of file OpenContain.h.

◆ getExitPosition()

virtual Bool OpenContain::getExitPosition ( Coord3D & exitPosition) const
inlinevirtual

Reimplemented from ExitInterface.

Definition at line 197 of file OpenContain.h.

◆ getExtraSlotsInUse()

virtual Int OpenContain::getExtraSlotsInUse ( void )
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in MobNexusContain, RiderChangeContain, and TransportContain.

Definition at line 170 of file OpenContain.h.

◆ getInterfaceMask()

static Int OpenContain::getInterfaceMask ( void )
inlinestatic

Definition at line 103 of file OpenContain.h.

◆ getNaturalRallyPoint()

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

access to the "Door" position of the production object

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

Reimplemented from ExitInterface.

Definition at line 1525 of file OpenContain.cpp.

◆ getPlayerWhoEntered()

virtual PlayerMaskType OpenContain::getPlayerWhoEntered ( void ) const
inlinevirtual

Implements ContainModuleInterface.

Definition at line 181 of file OpenContain.h.

◆ getRallyPoint()

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

define a "rally point" for units to move towards

Implements ExitInterface.

Definition at line 1516 of file OpenContain.cpp.

◆ getStealthUnitsContained()

virtual UnsignedInt OpenContain::getStealthUnitsContained ( ) const
inlinevirtual

Implements ContainModuleInterface.

Definition at line 179 of file OpenContain.h.

◆ getWeaponBonusPassedToPassengers()

WeaponBonusConditionFlags OpenContain::getWeaponBonusPassedToPassengers ( ) const
virtual

Implements ContainModuleInterface.

Definition at line 1483 of file OpenContain.cpp.

◆ harmAndForceExitAllContained()

void OpenContain::harmAndForceExitAllContained ( DamageInfo * info)
virtual

Force all contained objects in the contained list to exit, and kick them in the pants on the way out

Implements ContainModuleInterface.

Reimplemented in TunnelContain.

Definition at line 467 of file OpenContain.cpp.

◆ hasObjectsWantingToEnterOrExit()

Bool OpenContain::hasObjectsWantingToEnterOrExit ( ) const
virtual

Implements ContainModuleInterface.

Definition at line 1502 of file OpenContain.cpp.

◆ isAnyRiderAttacking()

Bool OpenContain::isAnyRiderAttacking ( void ) const
virtual

if my object gets selected, then my visible passengers should, too this gets called from

Implements ContainModuleInterface.

Definition at line 1563 of file OpenContain.cpp.

◆ isBustable()

virtual Bool OpenContain::isBustable ( ) const
inlinevirtual

can this container get busted by a bunkerbuster

Implements ContainModuleInterface.

Reimplemented in CaveContain, GarrisonContain, and TunnelContain.

Definition at line 203 of file OpenContain.h.

◆ isCarBombCrateCollide()

virtual Bool OpenContain::isCarBombCrateCollide ( ) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 112 of file OpenContain.h.

◆ isDisplayedOnControlBar()

virtual Bool OpenContain::isDisplayedOnControlBar ( ) const
inlinevirtual

Does this container display its contents on the ControlBar?

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, OverlordContain, RiderChangeContain, TransportContain, and TunnelContain.

Definition at line 169 of file OpenContain.h.

◆ isEnclosingContainerFor()

Bool OpenContain::isEnclosingContainerFor ( const Object * obj) const
virtual

Does this type of Contain Visibly enclose its contents?

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, HelixContain, OverlordContain, and ParachuteContain.

Definition at line 1496 of file OpenContain.cpp.

◆ isExitBusy()

virtual Bool OpenContain::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.

Reimplemented in RiderChangeContain, and TransportContain.

Definition at line 186 of file OpenContain.h.

◆ isGarrisonable()

virtual Bool OpenContain::isGarrisonable ( ) const
inlinevirtual

can this unit be Garrisoned? (ick)

Implements ContainModuleInterface.

Reimplemented in CaveContain, GarrisonContain, OverlordContain, and TunnelContain.

Definition at line 202 of file OpenContain.h.

◆ isHealContain()

virtual Bool OpenContain::isHealContain ( ) const
inlinevirtual

true when container only contains units while healing (not a transport!)

Implements ContainModuleInterface.

Reimplemented in CaveContain, GarrisonContain, HealContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 204 of file OpenContain.h.

◆ isHijackedVehicleCrateCollide()

virtual Bool OpenContain::isHijackedVehicleCrateCollide ( ) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 113 of file OpenContain.h.

◆ isImmuneToClearBuildingAttacks()

virtual Bool OpenContain::isImmuneToClearBuildingAttacks ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 208 of file OpenContain.h.

◆ isKickOutOnCapture()

virtual Bool OpenContain::isKickOutOnCapture ( )
inlinevirtual

By default, yes, all contain modules kick passengers out on capture.

Implements ContainModuleInterface.

Reimplemented in CaveContain, OverlordContain, and TunnelContain.

Definition at line 171 of file OpenContain.h.

◆ isPassengerAllowedToFire()

Bool OpenContain::isPassengerAllowedToFire ( ObjectID id = INVALID_ID) const
virtual

Hey, can I shoot out of this container?

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, HelixContain, OverlordContain, and TransportContain.

Definition at line 1151 of file OpenContain.cpp.

◆ isRailroad()

virtual Bool OpenContain::isRailroad ( ) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 114 of file OpenContain.h.

◆ isRiderChangeContain()

virtual Bool OpenContain::isRiderChangeContain ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in RiderChangeContain, and TransportContain.

Definition at line 206 of file OpenContain.h.

◆ isSabotageBuildingCrateCollide()

virtual Bool OpenContain::isSabotageBuildingCrateCollide ( ) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 116 of file OpenContain.h.

◆ isSalvageCrateCollide()

virtual Bool OpenContain::isSalvageCrateCollide ( ) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 115 of file OpenContain.h.

◆ isSpecialOverlordStyleContainer()

virtual Bool OpenContain::isSpecialOverlordStyleContainer ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, HelixContain, OverlordContain, TransportContain, and TunnelContain.

Definition at line 209 of file OpenContain.h.

◆ isSpecialZeroSlotContainer()

virtual Bool OpenContain::isSpecialZeroSlotContainer ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in ParachuteContain.

Definition at line 207 of file OpenContain.h.

◆ isTunnelContain()

virtual Bool OpenContain::isTunnelContain ( ) const
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, HealContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 205 of file OpenContain.h.

◆ isValidContainerFor()

Bool OpenContain::isValidContainerFor ( const Object * obj,
Bool checkCapacity ) const
virtual

Check to see if we are a valid container for 'obj'

Implements ContainModuleInterface.

Reimplemented in CaveContain, GarrisonContain, HelixContain, MobNexusContain, OverlordContain, ParachuteContain, RiderChangeContain, TransportContain, and TunnelContain.

Definition at line 880 of file OpenContain.cpp.

◆ isWeaponBonusPassedToPassengers()

Bool OpenContain::isWeaponBonusPassedToPassengers ( ) const
virtual

Implements ContainModuleInterface.

Definition at line 1477 of file OpenContain.cpp.

◆ iterateContained()

void OpenContain::iterateContained ( ContainIterateFunc func,
void * userData,
Bool reverse )
virtual

Iterate the contained list and call the callback on each of the objects

Implements ContainModuleInterface.

Reimplemented in CaveContain, OverlordContain, and TunnelContain.

Definition at line 546 of file OpenContain.cpp.

◆ killAllContained()

void OpenContain::killAllContained ( void )
virtual

kill all objects on contain list

Kill all contained objects in the contained list

Implements ContainModuleInterface.

Reimplemented in OverlordContain, and TunnelContain.

Definition at line 435 of file OpenContain.cpp.

◆ killRidersWhoAreNotFreeToExit()

virtual void OpenContain::killRidersWhoAreNotFreeToExit ( )
inlineprotectedvirtual

Reimplemented in RiderChangeContain, and TransportContain.

Definition at line 253 of file OpenContain.h.

◆ markAllPassengersDetected()

void OpenContain::markAllPassengersDetected ( )
virtual

Cool game stuff got added to the system calls since this layer didn't exist, so this regains that functionality.

Implements ContainModuleInterface.

Definition at line 1346 of file OpenContain.cpp.

◆ monitorConditionChanges()

void OpenContain::monitorConditionChanges ( void )
protectedvirtual

check to see if we need to update our occupant postions from a model change or anything else

Check to see if our internal knowledge of the artwork matches the current state of the model being displayed. When changes occur (from changing the time of day or going to a new damage state, we will want to redeploy all our occupants to be at new fire points that are reflected in the new artwork

Definition at line 1172 of file OpenContain.cpp.

◆ onBodyDamageStateChange()

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

healing callback

Implements DamageModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 127 of file OpenContain.h.

◆ onCapture()

virtual void OpenContain::onCapture ( Player * oldOwner,
Player * newOwner )
inlinevirtual

Reimplemented from ObjectModule.

Reimplemented in HelixContain, OverlordContain, RiderChangeContain, TransportContain, and TunnelContain.

Definition at line 107 of file OpenContain.h.

◆ onCollide()

void OpenContain::onCollide ( Object * other,
const Coord3D * loc,
const Coord3D * normal )
virtual

Implements CollideModuleInterface.

Reimplemented in ParachuteContain.

Definition at line 782 of file OpenContain.cpp.

◆ onContaining()

void OpenContain::onContaining ( Object * obj,
Bool wasSelected )
virtual

◆ onDamage()

virtual void OpenContain::onDamage ( DamageInfo * damageInfo)
inlinevirtual

damage callback

Implements DamageModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 125 of file OpenContain.h.

◆ onDelete()

void OpenContain::onDelete ( void )
virtual

Last possible moment cleanup.

Reimplemented from Module.

Reimplemented in HelixContain, OverlordContain, and TunnelContain.

Definition at line 843 of file OpenContain.cpp.

◆ onDie()

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

the die callback

The die callback.

Implements DieModuleInterface.

Reimplemented in CaveContain, HelixContain, OverlordContain, ParachuteContain, and TunnelContain.

Definition at line 857 of file OpenContain.cpp.

◆ onHealing()

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

damage callback

Implements DamageModuleInterface.

Definition at line 126 of file OpenContain.h.

◆ onObjectWantsToEnterOrExit()

void OpenContain::onObjectWantsToEnterOrExit ( Object * obj,
ObjectEnterExitType wants )
virtual

this is used for containers that must do something to allow people to enter or exit... eg, land (for Chinook), open door (whatever)... it's called with wants=WANTS_TO_ENTER when something is in the enter state, and wants=ENTS_NOTHING when the unit has either entered, or given up...

this is used for containers that must do something to allow people to enter or exit... eg, land (for Chinook), open door (whatever)... it's called with wants=WANTS_TO_ENTER when something is in the enter state, and wants=WANTS_NOTHING when the unit has either entered, or given up...

Implements ContainModuleInterface.

Definition at line 1307 of file OpenContain.cpp.

◆ onRemoving()

void OpenContain::onRemoving ( Object * obj)
virtual

◆ onSelling()

void OpenContain::onSelling ( void )
virtual

Container is being sold. Open responds by kicking people out.

Implements ContainModuleInterface.

Reimplemented in GarrisonContain, and TunnelContain.

Definition at line 1370 of file OpenContain.cpp.

◆ orderAllPassengersToExit()

void OpenContain::orderAllPassengersToExit ( CommandSourceType commandSource,
Bool instantly )
virtual

All of the smarts of exiting are in the passenger's AIExit. removeAllFrommContain is a last ditch system call, this is the game Evacuate.

Implements ContainModuleInterface.

Definition at line 1377 of file OpenContain.cpp.

◆ orderAllPassengersToHackInternet()

void OpenContain::orderAllPassengersToHackInternet ( CommandSourceType commandSource)
virtual

Just like it sounds.

Implements ContainModuleInterface.

Definition at line 1420 of file OpenContain.cpp.

◆ orderAllPassengersToIdle()

void OpenContain::orderAllPassengersToIdle ( CommandSourceType commandSource)
virtual

Just like it sounds.

Implements ContainModuleInterface.

Definition at line 1405 of file OpenContain.cpp.

◆ positionContainedObjectsRelativeToContainer()

virtual void OpenContain::positionContainedObjectsRelativeToContainer ( )
inlineprotectedvirtual

Reimplemented in ParachuteContain.

Definition at line 248 of file OpenContain.h.

◆ processDamageToContained()

void OpenContain::processDamageToContained ( Real percentDamage)
virtual

Do our % damage to units now.

Implements ContainModuleInterface.

Definition at line 1441 of file OpenContain.cpp.

◆ pruneDeadWanters()

void OpenContain::pruneDeadWanters ( )
protected

Definition at line 1326 of file OpenContain.cpp.

◆ putObjAtNextFirePoint()

void OpenContain::putObjAtNextFirePoint ( Object * obj)
protectedvirtual

place object at position of the next fire point to use

Place the object at the 3D position of the next fire point to use

Definition at line 1227 of file OpenContain.cpp.

◆ recalcApparentControllingPlayer()

virtual void OpenContain::recalcApparentControllingPlayer ( void )
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in CaveContain, and GarrisonContain.

Definition at line 144 of file OpenContain.h.

◆ redeployOccupants()

void OpenContain::redeployOccupants ( void )
protectedvirtual

redeploy any objects at firepoints due to a model condition change

Reimplemented in GarrisonContain, and HelixContain.

Definition at line 1198 of file OpenContain.cpp.

◆ removeAllContained()

void OpenContain::removeAllContained ( Bool exposeStealthUnits = FALSE)
virtual

remove all objects on contain list

Remove all contained objects from the contained list

Implements ContainModuleInterface.

Reimplemented in CaveContain, GarrisonContain, OverlordContain, and TunnelContain.

Definition at line 418 of file OpenContain.cpp.

◆ removeFromContain()

void OpenContain::removeFromContain ( Object * rider,
Bool exposeStealthUnits = FALSE )
virtual

remove 'obj' from contain list

Remove 'rider' from the m_containList of objects in this module. This will trigger an onRemoving event for the object that this module is a part of and an onRemovedFrom event for the object being removed

Implements ContainModuleInterface.

Reimplemented in CaveContain, HelixContain, OverlordContain, and TunnelContain.

Definition at line 382 of file OpenContain.cpp.

◆ removeFromContainViaIterator()

void OpenContain::removeFromContainViaIterator ( ContainedItemsList::iterator it,
Bool exposeStealthUnits = FALSE )
protected

remove item from contain list

Remove an object from the containment of this module given the item to remove and trigger the proper callback events

place the object in the world at position of the container m_object

Definition at line 630 of file OpenContain.cpp.

◆ removeFromPassengerViaIterator()

void OpenContain::removeFromPassengerViaIterator ( ContainedItemsList::iterator it)
protected

remove item from passenger list

◆ reserveDoorForExit()

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

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.

Reimplemented in MobNexusContain, RiderChangeContain, and TransportContain.

Definition at line 187 of file OpenContain.h.

◆ scatterToNearbyPosition()

void OpenContain::scatterToNearbyPosition ( Object * obj)
protected

Definition at line 688 of file OpenContain.cpp.

◆ setEvacDisposition()

virtual void OpenContain::setEvacDisposition ( EvacDisposition disp)
inlinevirtual

Implements ContainModuleInterface.

Reimplemented in GarrisonContain.

Definition at line 233 of file OpenContain.h.

◆ setOverrideDestination()

virtual void OpenContain::setOverrideDestination ( const Coord3D * )
inlinevirtual

Instead of falling peacefully towards a clear spot, I will now aim here.

Implements ContainModuleInterface.

Reimplemented in ParachuteContain.

Definition at line 168 of file OpenContain.h.

◆ setPassengerAllowedToFire()

virtual void OpenContain::setPassengerAllowedToFire ( Bool permission = TRUE)
inlinevirtual

Hey, can I shoot out of this container?

Implements ContainModuleInterface.

Definition at line 166 of file OpenContain.h.

◆ setRallyPoint()

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

define a "rally point" for units to move towards

Implements ExitInterface.

Definition at line 1509 of file OpenContain.cpp.

◆ unreserveDoorForExit()

virtual void OpenContain::unreserveDoorForExit ( ExitDoorType exitDoor)
inlinevirtual

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.

Reimplemented in MobNexusContain, RiderChangeContain, and TransportContain.

Definition at line 192 of file OpenContain.h.

◆ update()

UpdateSleepTime OpenContain::update ( void )
virtual

called once per frame

Todo
srj – for now, OpenContain assumes at most one door

Implements UpdateModule.

Reimplemented in GarrisonContain, HealContain, HelixContain, MobNexusContain, ParachuteContain, RiderChangeContain, TransportContain, and TunnelContain.

Definition at line 200 of file OpenContain.cpp.

◆ wouldLikeToCollideWith()

virtual Bool OpenContain::wouldLikeToCollideWith ( const Object * other) const
inlinevirtual

Implements CollideModuleInterface.

Definition at line 111 of file OpenContain.h.

Member Data Documentation

◆ m_containList

ContainedItemsList OpenContain::m_containList
protected

the list of contained objects

Definition at line 257 of file OpenContain.h.

◆ m_containListSize

UnsignedInt OpenContain::m_containListSize
protected

size of contained list

Definition at line 258 of file OpenContain.h.


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