UFO: Alien Invasion
|
Deals with the Alien Containment stuff. More...
#include "../../cl_shared.h"
#include "cp_campaign.h"
#include "cp_capacity.h"
#include "cp_aliencont_callbacks.h"
#include "save/save_aliencont.h"
#include "aliencargo.h"
#include "aliencontainment.h"
Go to the source code of this file.
Functions | |
bool | AL_AddAlienTypeToAircraftCargo (aircraft_t *aircraft, const teamDef_t *teamDef, int amount, bool dead) |
Adds an alientype to an aircraft cargo. More... | |
void | AL_AddAliens (aircraft_t *aircraft) |
Puts alien cargo into Alien Containment. More... | |
int | AL_CountAll (void) |
Counts live aliens in all bases. More... | |
void | AC_InitStartup (void) |
Defines commands and cvars for the alien containment menu(s). More... | |
bool | AC_LoadXML (xmlNode_t *parent) |
Load callback for savin in XML Format. More... | |
bool | AC_ContainmentAllowed (const base_t *base) |
Returns true if the current base is able to handle captured aliens. More... | |
Deals with the Alien Containment stuff.
Definition in file cp_aliencont.cpp.
bool AC_ContainmentAllowed | ( | const base_t * | base | ) |
Returns true if the current base is able to handle captured aliens.
[in] | base | Pointer to the base to check alien containment at |
Definition at line 227 of file cp_aliencont.cpp.
References base_s::alienContainment.
Referenced by B_BaseInit_f(), and B_BuildingOpenAfterClick_f().
Defines commands and cvars for the alien containment menu(s).
Definition at line 178 of file cp_aliencont.cpp.
References AC_InitCallbacks(), and cgi.
Referenced by CP_InitStartup().
bool AC_LoadXML | ( | xmlNode_t * | parent | ) |
Load callback for savin in XML Format.
[in] | parent | Parent XML node in the savegame |
Definition at line 192 of file cp_aliencont.cpp.
References AlienContainment::add(), base_s::alienContainment, B_GetFoundedBaseByIDX(), CAP_ALIENS, CAP_Get, cgi, FOREACH_XMLNODE, MAX_BASES, SAVE_ALIENCONT_ALIEN, SAVE_ALIENCONT_ALIENCONT, SAVE_ALIENCONT_AMOUNTALIVE, SAVE_ALIENCONT_AMOUNTDEAD, SAVE_ALIENCONT_BASEIDX, SAVE_ALIENCONT_CONT, SAVE_ALIENCONT_TEAMID, cgame_import_s::XML_GetNode(), cgame_import_s::XML_GetString(), and xmlNode_t.
Referenced by SAV_Init().
void AL_AddAliens | ( | aircraft_t * | aircraft | ) |
Puts alien cargo into Alien Containment.
General Collecting aliens functions
[in] | aircraft | Aircraft transporting cargo to homebase. |
Definition at line 69 of file cp_aliencont.cpp.
References _, AlienContainment::add(), AlienCargo::add(), aircraft_s::alienCargo, base_s::alienContainment, ccs_s::campaignStats, CAP_ALIENS, CAP_Get, CAPTURED_ALIENS, CAPTURED_ALIENS_DIED, stats_s::capturedAliens, ccs, cgi, CP_TriggerEvent(), aircraft_s::homebase, aircraft_s::idx, AlienContainment::isLifeSupported(), stats_s::killedAliens, AlienCargo::list(), LIST_Foreach, MS_AddNewMessage(), MSG_DEATH, and aircraft_s::name.
Referenced by B_DumpAircraftToHomeBase().
bool AL_AddAlienTypeToAircraftCargo | ( | aircraft_t * | aircraft, |
const teamDef_t * | teamDef, | ||
int | amount, | ||
bool | dead | ||
) |
Adds an alientype to an aircraft cargo.
Collecting aliens functions for aircraft
[in] | aircraft | The aircraft that owns the alien cargo to add the alien race to |
[in] | teamDef | The team definition of the alien race to add to the alien cargo container of the given aircraft |
[in] | amount | The amount of aliens of the given race (teamDef ) that should be added to the alien cargo |
[in] | dead | true for cases where the aliens should be added as dead to the alien cargo - false for living aliens |
Definition at line 46 of file cp_aliencont.cpp.
References AlienCargo::add(), and aircraft_s::alienCargo.
Referenced by AL_AddAlienTypeToAircraftCargo_(), and AM_AlienCollect().
Counts live aliens in all bases.
Definition at line 128 of file cp_aliencont.cpp.
References base_s::alienContainment, B_GetNext(), and AlienCargo::getAlive().
Referenced by RS_RequirementsMet().