|
UFO: Alien Invasion
|
Alien containment class. More...
#include <aliencontainment.h>


Public Member Functions | |
| virtual bool | add (const teamDef_t *team, int alive, int dead) |
| Add aliens to the containment by teamDef. | |
| virtual bool | add (const char *teamId, int alive, int dead) |
| Add aliens to the containment by scripted team ID. | |
| AlienContainment (capacities_t *aliveCapacity, capacities_t *deadCapacity) | |
| Creates and initializes AlienContainment object. | |
| virtual | ~AlienContainment (void) |
| Destroys AlienContainer with it's internal data. | |
| Public Member Functions inherited from AlienCargo | |
| int | getAlive (const teamDef_t *team) const |
| Return number of alive aliens of a type in the cargo. | |
| int | getDead (const teamDef_t *team) const |
| Return number of dead alien bodies of a type in the cargo. | |
| int | getAlive (void) const |
| Return number of all alive aliens in the cargo. | |
| int | getDead (void) const |
| Return number of all dead bodies in the cargo. | |
| linkedList_t * | list (void) const |
| Returns a copy of the cargo list. | |
| bool | load (xmlNode_t *root) |
| Load alien cargo from xml savegame. | |
| bool | save (xmlNode_t *root) const |
| Save alien cargo to xml savegame. | |
| AlienCargo (void) | |
| Creates and initializes AlienCargo object. | |
| AlienCargo (AlienCargo &alienCargo) | |
| Creates and initializes AlienCargo object from another one. | |
| virtual | ~AlienCargo (void) |
| Destroys AlienCargo with it's internal data. | |
Static Public Member Functions | |
| static bool | isLifeSupported (const teamDef_t *team) |
| Returns if storing a specific life form is supported by the containment. | |
| static int | getCapacityNeedForAlien (const teamDef_t *teamDef, const bool isDead) |
| Returns the number of capacity needed for an alien in the containment. | |
Protected Attributes | |
| capacities_t * | aliveCapacity |
| capacities_t * | deadCapacity |
| Protected Attributes inherited from AlienCargo | |
| linkedList_t * | cargo |
| int | sumAlive |
| int | sumDead |
Private Member Functions | |
| void | resetCurrentCapacities (void) |
| Private metod to reset current capacities. | |
Alien containment class.
Definition at line 33 of file aliencontainment.h.
| AlienContainment::AlienContainment | ( | capacities_t * | aliveCapacity, |
| capacities_t * | deadCapacity ) |
Creates and initializes AlienContainment object.
Definition at line 129 of file aliencontainment.cpp.
References aliveCapacity, deadCapacity, and resetCurrentCapacities().
|
virtual |
Destroys AlienContainer with it's internal data.
Definition at line 137 of file aliencontainment.cpp.
References resetCurrentCapacities().
Add aliens to the containment by scripted team ID.
| [in] | teamId | Scripted team ID string |
| [in] | alive | Number of alive aliens |
| [in] | dead | Number of dead aliens |
Reimplemented from AlienCargo.
Definition at line 116 of file aliencontainment.cpp.
Add aliens to the containment by teamDef.
| [in] | team | Pointer to the alien Team Definition |
| [in] | alive | Number of alive aliens |
| [in] | dead | Number of dead aliens |
Reimplemented from AlienCargo.
Definition at line 86 of file aliencontainment.cpp.
References AlienCargo::add(), aliveCapacity, deadCapacity, AlienCargo::getAlive(), getCapacityNeedForAlien(), AlienCargo::getDead(), isLifeSupported(), RS_GetTechForTeam(), and RS_MarkCollected().
Referenced by AC_KillAll_f(), AC_KillExceeding_f(), AC_KillOne_f(), AC_LoadXML(), add(), AL_AddAliens(), TR_EmptyTransferCargo(), and TR_TransferStart().
|
static |
Returns the number of capacity needed for an alien in the containment.
| [in] | teamDef | Pointer to the alien Team Definition |
| [in] | isDead | If the alien to calculate for is dead |
Definition at line 37 of file aliencontainment.cpp.
Referenced by AC_KillExceeding_f(), and add().
|
static |
Returns if storing a specific life form is supported by the containment.
| [in] | team | Pointer to the alien Team Definition |
Definition at line 57 of file aliencontainment.cpp.
References BREATHINGAPPARATUS_TECH, CHRSH_IsTeamDefAlien(), CHRSH_IsTeamDefRobot(), RS_GetTechByID(), and RS_IsResearched_ptr().
Referenced by add(), and AL_AddAliens().
Private metod to reset current capacities.
Definition at line 45 of file aliencontainment.cpp.
References aliveCapacity, and deadCapacity.
Referenced by AlienContainment(), and ~AlienContainment().
|
protected |
Definition at line 35 of file aliencontainment.h.
Referenced by add(), AlienContainment(), and resetCurrentCapacities().
|
protected |
Definition at line 36 of file aliencontainment.h.
Referenced by add(), AlienContainment(), and resetCurrentCapacities().