Header file for Alien Containment stuff. More...
Go to the source code of this file.
Data Structures | |
struct | aliensCont_s |
Defines | |
#define | MAX_ALIENCONT_CAP 32 |
#define | BREATHINGAPPARATUS_TECH "rs_alien_breathing" |
#define | AL_GetAircraftAlienCargo(a) (a)->alienCargo |
#define | AL_GetAircraftAlienCargoTypes(a) ((a)->alienCargoTypes) |
#define | AL_SetAircraftAlienCargoTypes(a, i) (a)->alienCargoTypes = (i) |
Typedefs | |
typedef struct aliensCont_s | aliensCont_t |
Enumerations | |
enum | alienCalcType_t { AL_RESEARCH, AL_KILL, AL_KILLONE, AL_ADDALIVE, AL_ADDDEAD } |
Functions | |
void | AL_FillInContainment (struct base_s *base) |
Prepares Alien Containment - names, states, and zeroed amount. | |
const char * | AL_AlienTypeToName (int teamDescIdx) |
Index of alien race to its name. | |
void | AL_CollectingAliens (struct aircraft_s *aircraft) |
Collecting stunned aliens and alien bodies after the mission. | |
void | AL_AddAliens (struct aircraft_s *aircraft) |
Puts alien cargo into Alien Containment. | |
void | AL_RemoveAliens (struct base_s *base, const teamDef_t *alienType, int amount, const alienCalcType_t action) |
Removes alien(s) from Alien Containment. | |
int | AL_GetAlienGlobalIDX (int idx) |
Returns global alien index. | |
int | AL_GetAlienAmount (const teamDef_t *alienType, requirementType_t reqtype, const struct base_s *base) |
void | AL_ChangeAliveAlienNumber (struct base_s *base, aliensCont_t *containment, int num) |
Add / Remove live aliens to Alien Containment. | |
qboolean | AL_CheckAliveFreeSpace (const struct base_s *base, const aliensCont_t *containment, const int num) |
int | AL_CountInBase (const struct base_s *base) |
qboolean | AL_AddAlienTypeToAircraftCargo (struct aircraft_s *aircraft, const teamDef_t *teamDef, int amount, qboolean dead) |
Adds an alientype to an aircraft cargo. | |
int | AL_CountAll (void) |
Counts live aliens in all bases. | |
void | AC_InitStartup (void) |
Defines commands and cvars for the alien containment menu(s). | |
void | AC_KillAll (struct base_s *base) |
Kill all aliens in given base. |
Header file for Alien Containment stuff.
Definition in file cp_aliencont.h.
#define AL_GetAircraftAlienCargo | ( | a | ) | (a)->alienCargo |
Definition at line 65 of file cp_aliencont.h.
Referenced by AIR_LoadAircraftXML(), AIR_SaveAircraftXML(), AL_AddAliens(), AL_AddAlienTypeToAircraftCargo(), AL_GetCargoIndexForTeamDefintion(), B_DumpAircraftToHomeBase(), TR_CountStunnedAliensInCargo(), and TR_TransferAlienAfterMissionStart().
#define AL_GetAircraftAlienCargoTypes | ( | a | ) | ((a)->alienCargoTypes) |
Definition at line 66 of file cp_aliencont.h.
Referenced by AIR_SaveAircraftXML(), AL_AddAliens(), AL_AddAlienTypeToAircraftCargo(), AL_GetCargoIndexForTeamDefintion(), and TR_TransferAlienAfterMissionStart().
Definition at line 67 of file cp_aliencont.h.
Referenced by AIR_LoadAircraftXML(), AL_AddAliens(), AL_AddAlienTypeToAircraftCargo(), B_DumpAircraftToHomeBase(), and TR_TransferAlienAfterMissionStart().
#define BREATHINGAPPARATUS_TECH "rs_alien_breathing" |
Definition at line 32 of file cp_aliencont.h.
Referenced by AL_AddAliens(), and TR_TransferAlienAfterMissionStart().
#define MAX_ALIENCONT_CAP 32 |
Definition at line 29 of file cp_aliencont.h.
Referenced by AC_LoadXML(), AC_SaveXML(), AL_CountForMenu(), and AL_FillInContainment().
typedef struct aliensCont_s aliensCont_t |
structure of Alien Containment being a member of base_t
enum alienCalcType_t |
cases of alien amount calculation
Definition at line 35 of file cp_aliencont.h.
void AC_InitStartup | ( | void | ) |
Defines commands and cvars for the alien containment menu(s).
Definition at line 687 of file cp_aliencont.c.
References AC_InitCallbacks(), and Cmd_AddCommand().
Referenced by CP_InitStartup().
void AC_KillAll | ( | base_t * | base | ) |
Kill all aliens in given base.
[in] | base | The base in which you want to kill all aliens |
Definition at line 601 of file cp_aliencont.c.
References AL_KILL, AL_RemoveAliens(), base_s::alienscont, aliensCont_s::amountAlive, ccs, i, ccs_s::numAliensTD, qfalse, and qtrue.
Referenced by AC_KillAll_f(), and B_UpdateOneBaseBuildingStatusOnDisable().
void AL_AddAliens | ( | aircraft_t * | aircraft | ) |
Puts alien cargo into Alien Containment.
[in] | aircraft | Aircraft transporting cargo to homebase. |
Definition at line 171 of file cp_aliencont.c.
References _, AII_CollectItem(), AL_ChangeAliveAlienNumber(), AL_CheckAliveFreeSpace(), AL_GetAircraftAlienCargo, AL_GetAircraftAlienCargoTypes, AL_SetAircraftAlienCargoTypes, base_s::alienscont, aliensCont_s::amountAlive, aliensTmp_s::amountAlive, aliensTmp_s::amountDead, aliensCont_s::amountDead, B_ALIEN_CONTAINMENT, B_GetBuildingStatus(), BREATHINGAPPARATUS_TECH, ccs_s::breathingMailSent, CAP_ALIENS, base_s::capacities, ccs, CHRSH_IsTeamDefRobot(), Cmd_ExecuteString(), Com_DPrintf(), Com_Error(), cap_maxcur_s::cur, DEBUG_CLIENT, ERR_DROP, aircraft_s::homebase, i, INVSH_GetItemByID(), cap_maxcur_s::max, MS_AddNewMessage(), MSG_DEATH, MSG_STANDARD, teamDef_s::name, ccs_s::numAliensTD, technology_s::provides, qfalse, qtrue, RS_GetTechByID(), RS_IsResearched_ptr(), RS_MarkCollected(), Sys_Error(), aliensTmp_s::teamDef, aliensCont_s::teamDef, and aliensCont_s::tech.
Referenced by B_DumpAircraftToHomeBase().
qboolean AL_AddAlienTypeToAircraftCargo | ( | aircraft_t * | aircraft, | |
const teamDef_t * | teamDef, | |||
int | amount, | |||
qboolean | dead | |||
) |
Adds an alientype to an aircraft cargo.
[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 72 of file cp_aliencont.c.
References AL_GetAircraftAlienCargo, AL_GetAircraftAlienCargoTypes, AL_GetCargoIndexForTeamDefintion(), AL_SetAircraftAlienCargoTypes, aliensTmp_s::amountAlive, aliensTmp_s::amountDead, qtrue, and aliensTmp_s::teamDef.
Referenced by AL_CollectingAliens(), and CL_AutoMissionAlienCollect().
const char* AL_AlienTypeToName | ( | int | teamDefIdx | ) |
Index of alien race to its name.
[in] | teamDefIdx | Index of alien race in teamDef array. |
Definition at line 133 of file cp_aliencont.c.
References Com_Printf(), csi, teamDef_s::name, csi_s::numTeamDefs, and csi_s::teamDef.
Referenced by TR_CargoList(), and TR_TransferSelect().
void AL_ChangeAliveAlienNumber | ( | base_t * | base, | |
aliensCont_t * | containment, | |||
int | num | |||
) |
Add / Remove live aliens to Alien Containment.
[in] | base | Pointer to the base where Alien Cont. should be checked. |
[in] | containment | Pointer to the containment |
[in] | num | Number of alien to be added/removed |
num
is negative? Definition at line 515 of file cp_aliencont.c.
References AL_CheckAliveFreeSpace(), AL_CountInBase(), aliensCont_s::amountAlive, B_ALIEN_CONTAINMENT, B_GetBuildingStatus(), CAP_ALIENS, base_s::capacities, Com_Error(), Com_Printf(), cap_maxcur_s::cur, ERR_DROP, and cap_maxcur_s::max.
Referenced by AL_AddAliens(), AL_RemoveAliens(), TR_CargoListSelect_f(), TR_EmptyTransferCargo(), TR_TransferListClear_f(), and TR_TransferListSelect_f().
qboolean AL_CheckAliveFreeSpace | ( | const struct base_s * | base, | |
const aliensCont_t * | containment, | |||
const int | num | |||
) |
void AL_CollectingAliens | ( | aircraft_t * | aircraft | ) |
Collecting stunned aliens and alien bodies after the mission.
[in] | aircraft | Pointer to the aircraft with cargo. |
Definition at line 148 of file cp_aliencont.c.
References AL_AddAlienTypeToAircraftCargo(), LE_GetNextInUse(), LE_IsActor(), LE_IsAlien, LE_IsDead, LE_IsStunned, qfalse, qtrue, and le_s::teamDef.
Referenced by GAME_CP_Results().
int AL_CountAll | ( | void | ) |
Counts live aliens in all bases.
Menu functions
Menu functions
Definition at line 577 of file cp_aliencont.c.
References base_s::alienscont, aliensCont_s::amountAlive, B_ALIEN_CONTAINMENT, B_GetBuildingStatus(), B_GetFoundedBaseByIDX(), ccs, i, MAX_BASES, ccs_s::numAliensTD, and aliensCont_s::teamDef.
Referenced by RS_RequirementsMet().
int AL_CountInBase | ( | const struct base_s * | base | ) |
void AL_FillInContainment | ( | base_t * | base | ) |
Prepares Alien Containment - names, states, and zeroed amount.
Collecting aliens functions.
General Collecting aliens functions
[in] | base | Pointer to the base with AC. |
Definition at line 100 of file cp_aliencont.c.
References base_s::alienscont, aliensCont_s::amountAlive, aliensCont_s::amountDead, CAP_ALIENS, base_s::capacities, ccs, CHRSH_IsTeamDefAlien(), Com_DPrintf(), Com_Error(), csi, cap_maxcur_s::cur, DEBUG_CLIENT, ERR_DROP, i, technology_s::idx, teamDef_s::idx, MAX_ALIENCONT_CAP, teamDef_s::name, csi_s::numTeamDefs, td, aliensCont_s::teamDef, csi_s::teamDef, ccs_s::teamDefTechs, and aliensCont_s::tech.
Referenced by AC_LoadXML(), and B_BuildBase_f().
int AL_GetAlienAmount | ( | const teamDef_t * | alienType, | |
requirementType_t | reqtype, | |||
const struct base_s * | base | |||
) |
int AL_GetAlienGlobalIDX | ( | int | idx | ) |
Returns global alien index.
[in] | idx | Alien index in Alien Containment. |
Definition at line 439 of file cp_aliencont.c.
References CHRSH_IsTeamDefAlien(), Com_Printf(), csi, i, csi_s::numTeamDefs, and csi_s::teamDef.
Referenced by TR_CargoList(), and TR_TransferSelect().
void AL_RemoveAliens | ( | base_t * | base, | |
const teamDef_t * | alienType, | |||
int | amount, | |||
const alienCalcType_t | action | |||
) |
Removes alien(s) from Alien Containment.
[in,out] | base | Pointer to the base where we will perform action (remove, add, ... aliens). |
[in] | alienType | Type of the alien (a teamDef_t pointer) |
[in] | amount | Amount of aliens to be removed. |
[in] | action | Type of action (see alienCalcType_t). |
Definition at line 296 of file cp_aliencont.c.
References AL_ChangeAliveAlienNumber(), AL_KILL, AL_KILLONE, AL_RESEARCH, base_s::alienscont, aliensCont_s::amountAlive, aliensCont_s::amountDead, ccs, Com_Printf(), ccs_s::numAliensTD, and Sys_Error().
Referenced by AC_KillAll(), AC_KillOne_f(), and B_BuildingOnDestroy_f().