#include <CaveContain.h>
Inherits OpenContain, CreateModuleInterface, and CaveInterface.
Public Member Functions | |
| CaveContain (Thing *thing, const ModuleData *moduleData) | |
| virtual CreateModuleInterface * | getCreate () |
| virtual CaveInterface * | getCaveInterface () |
| virtual OpenContain * | asOpenContain () |
| treat as open container | |
| 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 void | onContaining (Object *obj, Bool wasSelected) |
| object now contains 'obj' | |
| virtual void | onRemoving (Object *obj) |
| object no longer contains 'obj' | |
| virtual Bool | isValidContainerFor (const Object *obj, Bool checkCapacity) const |
| 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 | recalcApparentControllingPlayer (void) |
| virtual void | iterateContained (ContainIterateFunc func, void *userData, Bool reverse) |
| virtual UnsignedInt | getContainCount () const |
| contained count | |
| virtual Int | getContainMax (void) const |
| The max needs to be virtual, but only two inheritors care. -1 means "I don't care". | |
| virtual const ContainedItemsList * | getContainedItemsList () const |
| virtual Bool | isKickOutOnCapture () |
| Caves and Tunnels don't kick out on capture. | |
| virtual void | onDie (const DamageInfo *damageInfo) |
| the die callback | |
| virtual void | onCreate (void) |
| This is called when you become a code Object. | |
| virtual void | onBuildComplete () |
| This is called when you are a finished game object. | |
| virtual Bool | shouldDoOnBuildComplete () const |
| virtual void | tryToSetCaveIndex (Int newIndex) |
| Called by script as an alternative to instancing separate objects. 'Try', because can fail. | |
| virtual void | setOriginalTeam (Team *oldTeam) |
| This is a distributed Garrison in terms of capturing, so when one node triggers the change, he needs to tell everyone, so anyone can do the un-change. | |
Public Member Functions inherited from OpenContain | |
| OpenContain (Thing *thing, const ModuleData *moduleData) | |
| virtual ContainModuleInterface * | getContain () |
| virtual CollideModuleInterface * | getCollide () |
| virtual DieModuleInterface * | getDie () |
| virtual DamageModuleInterface * | getDamage () |
| 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 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 Player * | getApparentControllingPlayer (const Player *observingPlayer) const |
| 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 void | addToContain (Object *obj) |
| add 'obj' to 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 const Object * | friend_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 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 Coord3D * | getRallyPoint (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 ExitInterface * | getContainExitInterface () |
| 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 Object * | getClosestRider (const Coord3D *pos) |
| virtual void | setEvacDisposition (EvacDisposition disp) |
Public Member Functions inherited from UpdateModule | |
| UpdateModule (Thing *thing, const ModuleData *moduleData) | |
| virtual UpdateModuleInterface * | getUpdate () |
| 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 Object * | friend_getObject () const |
Public Member Functions inherited from BehaviorModule | |
| BehaviorModule (Thing *thing, const ModuleData *moduleData) | |
| virtual BodyModuleInterface * | getBody () |
| virtual DestroyModuleInterface * | getDestroy () |
| virtual SpecialPowerModuleInterface * | getSpecialPower () |
| virtual UpgradeModuleInterface * | getUpgrade () |
| virtual StealthUpdate * | getStealth () |
| virtual SpyVisionUpdate * | getSpyVisionUpdate () |
| virtual ParkingPlaceBehaviorInterface * | getParkingPlaceBehaviorInterface () |
| virtual RebuildHoleBehaviorInterface * | getRebuildHoleBehaviorInterface () |
| virtual BridgeBehaviorInterface * | getBridgeBehaviorInterface () |
| virtual BridgeTowerBehaviorInterface * | getBridgeTowerBehaviorInterface () |
| virtual BridgeScaffoldBehaviorInterface * | getBridgeScaffoldBehaviorInterface () |
| virtual OverchargeBehaviorInterface * | getOverchargeBehaviorInterface () |
| virtual TransportPassengerInterface * | getTransportPassengerInterface () |
| virtual LandMineInterface * | getLandMineInterface () |
| virtual DieModuleInterface * | getEjectPilotDieInterface () |
| virtual ProjectileUpdateInterface * | getProjectileUpdateInterface () |
| virtual AIUpdateInterface * | getAIUpdateInterface () |
| virtual ExitInterface * | getUpdateExitInterface () |
| virtual DockUpdateInterface * | getDockUpdateInterface () |
| virtual RailedTransportDockUpdateInterface * | getRailedTransportDockUpdateInterface (void) |
| virtual SlowDeathBehaviorInterface * | getSlowDeathBehaviorInterface () |
| virtual SpecialPowerUpdateInterface * | getSpecialPowerUpdateInterface () |
| virtual SlavedUpdateInterface * | getSlavedUpdateInterface () |
| virtual ProductionUpdateInterface * | getProductionUpdateInterface () |
| virtual HordeUpdateInterface * | getHordeUpdateInterface () |
| virtual PowerPlantUpdateInterface * | getPowerPlantUpdateInterface () |
| virtual SpawnBehaviorInterface * | getSpawnBehaviorInterface () |
| virtual CountermeasuresBehaviorInterface * | getCountermeasuresBehaviorInterface () |
| virtual const CountermeasuresBehaviorInterface * | getCountermeasuresBehaviorInterface () 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 OpenContain | |
| 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 ModuleData * | friend_newModuleData (INI *ini) |
Protected Member Functions | |
| void | changeTeamOnAllConnectedCaves (Team *newTeam, Bool setOriginalTeams) |
| When one gets captured, all connected ones get captured. DistributedGarrison. | |
Protected Member Functions inherited from OpenContain | |
| 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 ContainedItemsList & | getContainList () 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 | |
| Object * | getObject () |
| const Object * | getObject () const |
Protected Member Functions inherited from Module | |
| const ModuleData * | getModuleData () const |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| Bool | m_needToRunOnBuildComplete |
| Int | m_caveIndex |
| Team * | m_originalTeam |
| our original team before we were garrisoned | |
Protected Attributes inherited from OpenContain | |
| ContainedItemsList | m_containList |
| the list of contained objects | |
| UnsignedInt | m_containListSize |
| size of contained list | |
Definition at line 69 of file CaveContain.h.
| CaveContain::CaveContain | ( | Thing * | thing, |
| const ModuleData * | moduleData ) |
Definition at line 54 of file CaveContain.cpp.
|
virtual |
The part of AddToContain that inheritors can override (Can't do whole thing because of all the private stuff involved)
Reimplemented from OpenContain.
Definition at line 67 of file CaveContain.cpp.
|
inlinevirtual |
treat as open container
Reimplemented from OpenContain.
Definition at line 84 of file CaveContain.h.
When one gets captured, all connected ones get captured. DistributedGarrison.
Definition at line 334 of file CaveContain.cpp.
|
inlinevirtual |
Reimplemented from BehaviorModule.
Definition at line 81 of file CaveContain.h.
|
virtual |
|
virtual |
Reimplemented from OpenContain.
Definition at line 212 of file CaveContain.cpp.
|
virtual |
The max needs to be virtual, but only two inheritors care. -1 means "I don't care".
Reimplemented from OpenContain.
Definition at line 206 of file CaveContain.cpp.
|
inlinevirtual |
Reimplemented from BehaviorModule.
Definition at line 80 of file CaveContain.h.
|
inlinestatic |
Definition at line 82 of file CaveContain.h.
|
inlinevirtual |
can this container get busted by a bunkerbuster
Reimplemented from OpenContain.
Definition at line 86 of file CaveContain.h.
|
inlinevirtual |
can this unit be Garrisoned? (ick)
Reimplemented from OpenContain.
Definition at line 85 of file CaveContain.h.
|
inlinevirtual |
true when container only contains units while healing (not a transport!)
Reimplemented from OpenContain.
Definition at line 87 of file CaveContain.h.
|
inlinevirtual |
Caves and Tunnels don't kick out on capture.
Reimplemented from OpenContain.
Definition at line 107 of file CaveContain.h.
Check to see if we are a valid container for 'obj'
Reimplemented from OpenContain.
Definition at line 194 of file CaveContain.cpp.
|
virtual |
Iterate the contained list and call the callback on each of the objects
Reimplemented from OpenContain.
Definition at line 132 of file CaveContain.cpp.
|
virtual |
This is called when you are a finished game object.
Implements CreateModuleInterface.
Definition at line 245 of file CaveContain.cpp.
object now contains 'obj'
Reimplemented from OpenContain.
Definition at line 139 of file CaveContain.cpp.
|
virtual |
This is called when you become a code Object.
Implements CreateModuleInterface.
Definition at line 239 of file CaveContain.cpp.
|
virtual |
the die callback
The die callback.
Reimplemented from OpenContain.
Definition at line 221 of file CaveContain.cpp.
|
virtual |
object no longer contains 'obj'
place the object in the world at position of the container m_object
Reimplemented from OpenContain.
Definition at line 155 of file CaveContain.cpp.
|
virtual |
return the player that appears to control this unit. if null, use getObject()->getControllingPlayer() instead.
Reimplemented from OpenContain.
Definition at line 278 of file CaveContain.cpp.
remove all objects on contain list
Remove all contained objects from the contained list
Reimplemented from OpenContain.
Definition at line 113 of file CaveContain.cpp.
remove 'obj' from contain list
Remove 'obj' 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
Reimplemented from OpenContain.
Definition at line 78 of file CaveContain.cpp.
|
virtual |
This is a distributed Garrison in terms of capturing, so when one node triggers the change, he needs to tell everyone, so anyone can do the un-change.
Implements CaveInterface.
Definition at line 363 of file CaveContain.cpp.
|
inlinevirtual |
Implements CreateModuleInterface.
Definition at line 114 of file CaveContain.h.
|
virtual |
Called by script as an alternative to instancing separate objects. 'Try', because can fail.
Implements CaveInterface.
Definition at line 260 of file CaveContain.cpp.
|
protected |
Definition at line 125 of file CaveContain.h.
|
protected |
Definition at line 124 of file CaveContain.h.
|
protected |
our original team before we were garrisoned
Definition at line 127 of file CaveContain.h.