UFO: Alien Invasion
|
Header for base management related stuff. More...
Go to the source code of this file.
Data Structures | |
struct | baseBuildingTile_s |
struct | baseWeapon_s |
struct | base_s |
A base with all it's data. More... | |
struct | baseTemplate_s |
template for creating a base More... | |
Macros | |
#define | MAX_BASES 8 |
#define | MAX_BASETEMPLATES 5 |
#define | MAX_BUILDINGS 32 |
#define | MAX_BASE_SLOT 4 |
#define | BASE_SIZE 5 |
#define | MAX_BASEBUILDINGS BASE_SIZE * BASE_SIZE |
#define | MAX_BLOCKEDFIELDS 4 |
#define | MIN_BLOCKEDFIELDS 1 |
#define | BASE_TILE_SIZE 512 |
#define | BASE_TILE_UNITS (BASE_TILE_SIZE / UNIT_SIZE) |
#define | BASE_INITIALINTEREST 1.0 |
#define | B_IsUnderAttack(base) ((base)->baseStatus == BASE_UNDER_ATTACK) |
#define | B_AtLeastOneExists() (B_GetNext(nullptr) != nullptr) |
#define | B_IsTileBlocked(base, x, y) (base)->map[(int)(y)][(int)(x)].blocked |
#define | B_GetBuildingAt(base, x, y) (base)->map[(int)(y)][(int)(x)].building |
Typedefs | |
typedef struct baseBuildingTile_s | baseBuildingTile_t |
typedef struct baseWeapon_s | baseWeapon_t |
typedef struct base_s | base_t |
A base with all it's data. More... | |
typedef struct baseTemplate_s | baseTemplate_t |
template for creating a base More... | |
Enumerations | |
enum | baseStatus_t { BASE_NOT_USED, BASE_UNDER_ATTACK, BASE_WORKING, BASE_DESTROYED } |
Possible base states. More... | |
Functions | |
void | B_UpdateBuildingConstructions (void) |
Updates base data. More... | |
float | B_GetMaxBuildingLevel (const base_t *base, const buildingType_t type) |
Get the maximum level of a building type in a base. More... | |
void | B_ParseBaseTemplate (const char *name, const char **text) |
Reads a base layout template. More... | |
void | B_BaseResetStatus (base_t *const base) |
Sets the baseStatus to BASE_NOT_USED. More... | |
const building_t * | B_GetBuildingInBaseByType (const base_t *base, buildingType_t type, bool onlyWorking) |
Gets a building of a given type in the given base. More... | |
const baseTemplate_t * | B_GetBaseTemplate (const char *baseTemplateName) |
Returns the baseTemplate in the global baseTemplate list that has the unique name baseTemplateID. More... | |
void | B_InitStartup (void) |
Resets console commands. More... | |
base_t * | B_Build (const struct campaign_s *campaign, const vec2_t pos, const char *name, bool fillBase=false) |
void | B_SetUpFirstBase (const struct campaign_s *campaign, base_t *base) |
base_t * | B_GetNext (base_t *lastBase) |
Iterates through founded bases. More... | |
base_t * | B_GetBaseByIDX (int baseIdx) |
Array bound check for the base index. Will also return unfounded bases as long as the index is in the valid ranges,. More... | |
base_t * | B_GetFoundedBaseByIDX (int baseIdx) |
Array bound check for the base index. More... | |
int | B_GetCount (void) |
Returns the count of founded bases. More... | |
void | B_SelectBase (const base_t *base) |
Select and opens a base. More... | |
void | B_Destroy (base_t *base) |
Destroy a base. More... | |
void | B_Delete (base_t *base) |
Resets a base structure. More... | |
void | B_SetName (base_t *base, const char *name) |
Set the base name. More... | |
base_t * | B_GetFirstUnfoundedBase (void) |
Get the first unfounded base. More... | |
base_t * | B_GetCurrentSelectedBase (void) |
returns the currently selected base More... | |
void | B_SetCurrentSelectedBase (const base_t *base) |
Sets the selected base. More... | |
bool | B_AssembleMap (char *maps, size_t mapsLength, char *coords, size_t coordsLength, const base_t *base) |
Perform the base assembling in case of an alien attack. More... | |
building_t * | B_GetNextBuilding (const base_t *base, building_t *lastBuilding) |
Iterates through buildings in a base. More... | |
building_t * | B_GetNextBuildingByType (const base_t *base, building_t *lastBuilding, buildingType_t buildingType) |
Iterates throught buildings of a type in a base. More... | |
bool | B_CheckBuildingTypeStatus (const base_t *const base, buildingType_t type, buildingStatus_t status, int *cnt) |
Searches the base for a given building type with the given status. More... | |
bool | B_GetBuildingStatus (const base_t *const base, const buildingType_t type) |
Get the status associated to a building. More... | |
void | B_SetBuildingStatus (base_t *const base, const buildingType_t type, bool newStatus) |
Set status associated to a building. More... | |
bool | B_MapIsCellFree (const base_t *base, int col, int row) |
Check a base cell. More... | |
building_t * | B_BuildBuilding (base_t *base, const building_t *buildingTemplate, int col, int row) |
Build a new building to the base. More... | |
bool | B_IsBuildingDestroyable (const building_t *building) |
Returns if a base building is destroyable. More... | |
bool | B_BuildingDestroy (building_t *building) |
Removes a building from the given base. More... | |
building_t * | B_GetFreeBuildingType (buildingType_t type) |
int | B_GetNumberOfBuildingsInBaseByTemplate (const base_t *base, const building_t *type) |
Counts the number of buildings of a particular type in a base. More... | |
int | B_GetNumberOfBuildingsInBaseByBuildingType (const base_t *base, const buildingType_t type) |
Counts the number of buildings of a particular building type in a base. More... | |
bool | B_ItemIsStoredInBaseStorage (const objDef_t *obj) |
Check if an item is stored in storage. More... | |
bool | B_BaseHasItem (const base_t *base, const objDef_t *item) |
Check if an item is available on a base. More... | |
int | B_ItemInBase (const objDef_t *item, const base_t *base) |
Check if the item has been collected (i.e it is in the storage) in the given base. More... | |
int | B_AddToStorage (base_t *base, const objDef_t *obj, int amount) |
Add/remove items to/from the storage. More... | |
void | B_AircraftReturnedToHomeBase (aircraft_t *aircraft) |
Do anything when dropship returns to base. More... | |
void | B_DumpAircraftToHomeBase (aircraft_t *aircraft) |
Will unload all cargo to the homebase. More... | |
void | B_UpdateBaseCapacities (baseCapacities_t cap, base_t *base) |
Updates base capacities. More... | |
baseCapacities_t | B_GetCapacityFromBuildingType (buildingType_t type) |
Get the capacity associated to a building type. More... | |
buildingType_t | B_GetBuildingTypeByCapacity (baseCapacities_t cap) |
Get building type by base capacity. More... | |
void | B_ResetAllStatusAndCapacities (base_t *base, bool firstEnable) |
Recalculate status and capacities of one base. More... | |
int | B_AntimatterInBase (const base_t *base) |
returns the amount of antimatter stored in a base More... | |
int | B_AddAntimatter (base_t *base, int amount) |
Manages antimatter (adding, removing) through Antimatter Storage Facility. More... | |
void | B_SaveBaseSlotsXML (const baseWeapon_t *weapons, const int numWeapons, xmlNode_t *p) |
Saves the missile and laser slots of a base or sam site. More... | |
int | B_LoadBaseSlotsXML (baseWeapon_t *weapons, int numWeapons, xmlNode_t *p) |
Loads the missile and laser slots of a base or sam site. More... | |
bool | B_SaveStorageXML (xmlNode_t *parent, const equipDef_t &equip) |
Saves base storage. More... | |
bool | B_LoadStorageXML (xmlNode_t *parent, equipDef_t *equip) |
Loads base storage. More... | |
int | B_GetInstallationLimit (void) |
Counts the actual installation count limit. More... | |
bool | BS_BuySellAllowed (const base_t *base) |
Returns true if you can buy or sell equipment. More... | |
bool | AIR_AircraftAllowed (const base_t *base) |
Returns true if the current base is able to handle aircraft. More... | |
bool | RS_ResearchAllowed (const base_t *base) |
Returns true if the current base is able to handle research. More... | |
bool | PR_ProductionAllowed (const base_t *base) |
Returns true if the current base is able to produce items. More... | |
bool | E_HireAllowed (const base_t *base) |
Returns true if the current base is able to handle employees. More... | |
bool | AC_ContainmentAllowed (const base_t *base) |
Returns true if the current base is able to handle captured aliens. More... | |
bool | HOS_HospitalAllowed (const base_t *base) |
Returns true if you can enter in the hospital. More... | |
Header for base management related stuff.
Definition in file cp_base.h.
Definition at line 55 of file cp_base.h.
Referenced by CP_CampaignRun(), CP_CheckLostCondition(), E_LoadXML(), GEO_ResetAction(), GEO_SetOverlay(), SAV_GameSaveAllowed(), TEST_F(), and TR_LoadXML().
Definition at line 165 of file cp_base.h.
Referenced by B_AddBlockedTile(), B_AddBlockedTiles(), B_AssembleMap(), B_BuildBuilding(), B_BuildingDestroy_f(), B_BuildingOpenAfterClick_f(), B_FillMap_f(), B_GetNeighbours(), B_MapIsCellFree(), B_SaveXML(), and GAME_CP_DrawBaseLayout().
Definition at line 164 of file cp_base.h.
Referenced by B_AddBlockedTile(), B_AddBlockedTiles(), B_BuildBuilding(), B_FillMap_f(), B_MapIsCellFree(), B_SaveXML(), and GAME_CP_DrawBaseLayout().
#define B_IsUnderAttack | ( | base | ) | ((base)->baseStatus == BASE_UNDER_ATTACK) |
Definition at line 53 of file cp_base.h.
Referenced by AIR_AircraftStatusToName(), AIR_SendAircraftToMission(), AIRFIGHT_CampaignRunBaseDefence(), B_BuildingDestroy_f(), BS_BuySellAllowed(), CP_BaseAttackChooseBase(), E_HireAllowed(), GEO_DrawMapOneBase(), HOS_HospitalAllowed(), MIS_LoadXML(), PR_ProductionAllowed(), and RS_ResearchAllowed().
#define BASE_SIZE 5 |
Definition at line 38 of file cp_base.h.
Referenced by B_AddBlockedTile(), B_AddBlockedTiles(), B_AddMap(), B_AssembleMap(), B_BuildBuilding(), B_BuildBuilding_f(), B_BuildFromTemplate(), B_FillMap_f(), B_MapIsCellFree(), B_ParseBaseTemplate(), B_ParseBuildings(), B_SaveXML(), GAME_CP_DrawBaseLayout(), and TEST_F().
#define BASE_TILE_SIZE 512 |
#define BASE_TILE_UNITS (BASE_TILE_SIZE / UNIT_SIZE) |
Definition at line 49 of file cp_base.h.
Referenced by B_AddMap().
#define MAX_BASE_SLOT 4 |
Definition at line 35 of file cp_base.h.
Referenced by B_LoadXML(), BDEF_AddBattery(), and BDEF_InitialiseBaseSlots().
Definition at line 39 of file cp_base.h.
Referenced by B_ParseBaseTemplate().
#define MAX_BASES 8 |
Definition at line 32 of file cp_base.h.
Referenced by AC_LoadXML(), AIR_LoadAircraftXML(), B_GetBaseByIDX(), B_GetFirstUnfoundedBase(), B_InitCallbacks(), B_SelectBase(), B_SelectBase_f(), B_SetBaseTitle_f(), GEO_Click(), INS_FillTypes_f(), PR_LoadXML(), and RADAR_UpdateBaseRadarCoverage_f().
#define MAX_BASETEMPLATES 5 |
Definition at line 33 of file cp_base.h.
Referenced by B_ParseBaseTemplate().
#define MAX_BLOCKEDFIELDS 4 |
Definition at line 41 of file cp_base.h.
Referenced by B_BuildFromTemplate().
#define MAX_BUILDINGS 32 |
Definition at line 34 of file cp_base.h.
Referenced by B_IsBuildingDestroyable(), B_LoadXML(), B_ParseBaseTemplate(), and B_ParseBuildings().
#define MIN_BLOCKEDFIELDS 1 |
Definition at line 42 of file cp_base.h.
Referenced by B_BuildFromTemplate().
typedef struct baseBuildingTile_s baseBuildingTile_t |
typedef struct baseTemplate_s baseTemplate_t |
template for creating a base
typedef struct baseWeapon_s baseWeapon_t |
enum baseStatus_t |
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().
bool AIR_AircraftAllowed | ( | const base_t * | base | ) |
Returns true if the current base is able to handle aircraft.
Definition at line 2637 of file cp_aircraft.cpp.
References B_GetBuildingStatus(), B_HANGAR, and B_SMALL_HANGAR.
Referenced by AIR_ShowAircraft_f(), B_BaseInit_f(), B_BuildingOpenAfterClick_f(), and BS_Buy_f().
Manages antimatter (adding, removing) through Antimatter Storage Facility.
[in,out] | base | Pointer to the base. |
[in] | amount | quantity of antimatter to add/remove |
Definition at line 2633 of file cp_base.cpp.
References ANTIMATTER_ITEM_ID, B_AntimatterInBase(), CAP_ANTIMATTER, CAP_Get, cgi, capacities_s::cur, ERR_DROP, objDef_s::idx, INVSH_GetItemByIDSilent(), equipDef_s::numItems, and base_s::storage.
Referenced by AIR_Refuel(), CAP_RemoveAntimatterExceedingCapacity(), PR_FinishDisassembly(), PR_UpdateRequiredItemsInBasestorage(), TR_EmptyTransferCargo(), and TR_TransferStart().
Add/remove items to/from the storage.
[in] | base | The base which storage and capacity should be updated |
[in] | obj | The item. |
[in] | amount | Amount to be added to removed |
Definition at line 2574 of file cp_base.cpp.
References B_ItemInBase(), B_ItemIsStoredInBaseStorage(), technology_s::base, CAP_Get, CAP_ITEMS, capacities_s::cur, objDef_s::idx, equipDef_s::numItems, RS_GetTechForItem(), RS_RUNNING, RS_StopResearch(), objDef_s::size, technology_s::statusResearch, and base_s::storage.
Referenced by AII_AddAmmoToSlot(), AII_AddItemToSlot(), AII_ReloadWeapon(), AII_RemoveItemFromSlot(), AII_RemoveNextItemFromSlot(), AIR_TransferItemsCarriedByCharacterToBase(), B_SellOrAddItems(), BS_BuyItem(), BS_BuyUGV(), BS_SellItem(), BS_SellUGV(), E_RemoveInventoryFromStorage(), PR_FinishDisassembly(), PR_FinishProduction(), PR_UpdateRequiredItemsInBasestorage(), TR_EmptyTransferCargo(), and TR_TransferStart().
void B_AircraftReturnedToHomeBase | ( | aircraft_t * | aircraft | ) |
Do anything when dropship returns to base.
[in] | aircraft | Returning aircraft. |
Definition at line 2103 of file cp_base.cpp.
References AII_ReloadAircraftWeapons(), AIRFIGHT_RemoveProjectileAimingAircraft(), B_DumpAircraftToHomeBase(), aircraft_s::radar, and RADAR_InitialiseUFOs().
Referenced by AIR_Move().
returns the amount of antimatter stored in a base
[in] | base | Pointer to the base to check |
Definition at line 2611 of file cp_base.cpp.
References ANTIMATTER_ITEM_ID, B_ItemInBase(), CAP_ANTIMATTER, CAP_GetCurrent, cgi, ERR_DROP, and INVSH_GetItemByID().
Referenced by B_AddAntimatter(), PR_RequirementsInfo(), PR_RequirementsMet(), RS_RequirementsMet(), TR_Add_f(), and TR_FillItems().
bool B_AssembleMap | ( | char * | maps, |
size_t | mapsLength, | ||
char * | coords, | ||
size_t | coordsLength, | ||
const base_t * | base | ||
) |
Perform the base assembling in case of an alien attack.
[out] | maps | The string containing the list of tilenames |
[in] | mapsLength | The maximum length of maps string |
[out] | coords | The string containing the positions of the tiles |
[in] | coordsLength | The maximum length of coords string |
[in,out] | base | The base to assemble |
true
if the assembly was successful, false
if it failed Search a empty field and add a alien craft there
If a building is still under construction, it will be assembled as a finished part. Otherwise we need mapparts for all the maps under construction.
Definition at line 562 of file cp_base.cpp.
References B_AddMap(), B_GetBuildingAt, B_IsBuildingBuiltUp(), BASE_SIZE, cgi, ERR_DROP, building_s::id, building_s::mapPart, building_s::pos, and va().
Referenced by B_AssembleMap_f(), BATTLE_Start(), and TEST_F().
Check if an item is available on a base.
[in] | base | Pointer to the base to check at |
[in] | item | Pointer to the item to check |
Definition at line 2120 of file cp_base.cpp.
References B_ItemInBase(), and objDef_s::isVirtual.
Referenced by AII_AddAmmoToSlot(), AII_AddItemToSlot(), AII_ReloadWeapon(), AIM_AutoEquipAircraft(), AIM_CheckTechnologyIntoSlot(), AIM_CrafttypeFilter(), and AIM_SelectableCraftItem().
Sets the baseStatus to BASE_NOT_USED.
[in] | base | Which base should be reseted? |
Definition at line 1789 of file cp_base.cpp.
References BASE_NOT_USED, and base_s::baseStatus.
base_t* B_Build | ( | const struct campaign_s * | campaign, |
const vec2_t | pos, | ||
const char * | name, | ||
bool | fillBase = false |
||
) |
building_t* B_BuildBuilding | ( | base_t * | base, |
const building_t * | buildingTemplate, | ||
int | col, | ||
int | row | ||
) |
Build a new building to the base.
[in,out] | base | The base to place the building in |
[in] | buildingTemplate | The template of the building to place at the given location |
[in] | row | Set building to row |
[in] | col | Set building to col |
Definition at line 1279 of file cp_base.cpp.
References B_FireEvent(), B_GetBuildingAt, B_GetBuildingByIDX, B_GetBuildingIDX, B_GetNeighbours(), B_IsBuildingBuiltUp(), B_IsTileBlocked, B_ONCONSTRUCT, B_STATUS_UNDER_CONSTRUCTION, building_s::base, BASE_SIZE, BASE_WORKING, base_s::baseStatus, baseBuildingTile_s::building, building_s::buildingStatus, ccs, cgi, CP_CheckCredits(), CP_UpdateCredits(), ccs_s::credits, ccs_s::date, ERR_DROP, building_s::fixCosts, building_s::idx, base_s::idx, LIST_Foreach, base_s::map, ccs_s::numBuildings, building_s::pos, building_s::size, and building_s::timeStart.
Referenced by B_AddBuildingToBasePos(), B_BuildBuilding_f(), and TEST_F().
bool B_BuildingDestroy | ( | building_t * | building | ) |
Removes a building from the given base.
[in] | building | The building to remove |
Definition at line 770 of file cp_base.cpp.
References B_FireEvent(), B_GetCapacityFromBuildingType(), B_GetNumberOfBuildingsInBaseByBuildingType(), B_IsBuildingDestroyable(), B_MISC, B_ONDESTROY, B_ONDISABLE, B_SetBuildingStatus(), B_STATUS_NOT_SET, B_STATUS_WORKING, B_UpdateBaseCapacities(), B_UpdateStatusBuilding(), building_s::base, baseBuildingTile_s::building, ccs_s::buildings, building_s::buildingStatus, building_s::buildingType, CAP_CheckOverflow(), ccs, cgi, CP_UpdateCredits(), ccs_s::credits, ccs_s::curCampaign, DEBUG_CLIENT, ERR_DROP, building_s::fixCosts, i, building_s::idx, base_s::idx, mission_s::idx, campaign_s::liquidationRate, building_s::mandatory, base_s::map, MAX_BUILDING_TYPE, MAX_CAP, ccs_s::numBuildings, building_s::onDestroy, building_s::onDisable, mission_s::pos, building_s::pos, REMOVE_ELEM, building_s::size, and building_s::tpl.
Referenced by B_BuildingDestroy_f(), B_Destroy(), and TEST_F().
bool B_CheckBuildingTypeStatus | ( | const base_t *const | base, |
buildingType_t | type, | ||
buildingStatus_t | status, | ||
int * | cnt | ||
) |
Searches the base for a given building type with the given status.
[in] | base | Base to search |
[in] | type | Building type to search |
[in] | status | The status the building should have |
[out] | cnt | This is a pointer to an int value which will hold the building count of that type with the status you are searching - might also be nullptr if you are not interested in this value |
if (hasBuilding[B_QUARTERS])
check - this should speed things up a lot Definition at line 389 of file cp_base.cpp.
References B_GetNextBuildingByType(), and building_s::buildingStatus.
Referenced by BDEF_UpdateActiveBattery_f().
Resets a base structure.
[in,out] | base | Pointer to base to be deleted. |
Definition at line 897 of file cp_base.cpp.
References base_s::alienContainment.
Referenced by B_Destroy(), and CP_ResetCampaignData().
Destroy a base.
[in,out] | base | Pointer to base to be destroyed. |
Definition at line 913 of file cp_base.cpp.
References AIR_DeleteAircraft(), AIR_ForeachFromBase, base_s::alienInterest, B_BuildingDestroy(), B_Delete(), B_GetBuildingByIDX, B_MoveAircraftOnGeoscapeToOtherBases(), BASE_DESTROYED, base_s::baseStatus, CAP_ITEMS, CAP_SetCurrent(), ccs, CP_MissionNotifyBaseDestroyed(), E_DeleteAllEmployees(), base_s::idx, ccs_s::numBuildings, OBJZERO, and base_s::storage.
Referenced by B_Destroy_AntimaterStorage_f(), CP_BaseAttackMissionDestroyBase(), and TEST_F().
void B_DumpAircraftToHomeBase | ( | aircraft_t * | aircraft | ) |
Will unload all cargo to the homebase.
[in,out] | aircraft | The aircraft to dump |
Definition at line 2085 of file cp_base.cpp.
References AL_AddAliens(), B_SellOrAddItems(), and aircraft_s::maxTeamSize.
Referenced by B_AircraftReturnedToHomeBase(), CP_EndRescueMission(), and CP_MissionEndActions().
Array bound check for the base index. Will also return unfounded bases as long as the index is in the valid ranges,.
[in] | baseIdx | Index to check |
Definition at line 312 of file cp_base.cpp.
References ccs_s::bases, ccs, and MAX_BASES.
Referenced by AIR_LoadAircraftXML(), B_BuildBuilding_f(), B_FillBuildingInfo_f(), B_GetFirstUnfoundedBase(), B_GetFoundedBaseByIDX(), B_ListBuildings_f(), B_LoadXML(), BDEF_AddBattery_f(), BDEF_UpdateActiveBattery_f(), CP_AddItemAsCollected_f(), E_LoadXML(), GAME_CP_DrawBaseLayout(), MIS_LoadXML(), PR_LoadXML(), RS_LoadXML(), and TR_LoadXML().
const baseTemplate_t* B_GetBaseTemplate | ( | const char * | baseTemplateID | ) |
Returns the baseTemplate in the global baseTemplate list that has the unique name baseTemplateID.
[in] | baseTemplateID | The unique id of the building (baseTemplate_t->name). |
Definition at line 1246 of file cp_base.cpp.
References ccs_s::baseTemplates, ccs, cgi, i, baseTemplate_s::id, ccs_s::numBaseTemplates, and Q_streq.
Referenced by B_BuildFromTemplate().
const building_t* B_GetBuildingInBaseByType | ( | const base_t * | base, |
buildingType_t | buildingType, | ||
bool | onlyWorking | ||
) |
Gets a building of a given type in the given base.
[in] | base | The base to search the building in |
[in] | buildingType | What building-type to get. |
[in] | onlyWorking | If we're looking only for working buildings |
Definition at line 1414 of file cp_base.cpp.
References B_GetBuildingStatus(), and B_GetNextBuildingByType().
bool B_GetBuildingStatus | ( | const base_t *const | base, |
const buildingType_t | buildingType | ||
) |
Get the status associated to a building.
[in] | base | The base to search for the given building type |
[in] | buildingType | value of building->buildingType |
Definition at line 477 of file cp_base.cpp.
References B_MISC, cgi, base_s::hasBuilding, and MAX_BUILDING_TYPE.
Referenced by AII_BaseCanShoot(), AIM_AircraftStart_f(), AIR_AircraftAllowed(), AIR_CanIntercept(), AIR_CheckMoveIntoNewHomebase(), AIRFIGHT_CampaignRunBaseDefence(), B_BuildFromTemplate(), B_BuildingOpenAfterClick_f(), B_CheckBuildingDependencesStatus(), B_CheckUpdateBuilding(), B_GetBuildingInBaseByType(), B_GetInstallationLimit(), B_GetMaxBuildingLevel(), B_ResetAllStatusAndCapacities(), B_UpdateStatusBuilding(), BS_Buy_f(), BS_BuySellAllowed(), CL_PopupInterceptClick_f(), CP_BaseAttackChooseBase(), E_HireAllowed(), HOS_HospitalAllowed(), HOS_HospitalRun(), HOS_Init_f(), PR_ProductionAllowed(), RS_ResearchAllowed(), TEST_F(), TR_EmptyTransferCargo(), and UFO_CampaignCheckEvents().
buildingType_t B_GetBuildingTypeByCapacity | ( | baseCapacities_t | cap | ) |
Get building type by base capacity.
[in] | cap | Enum type of baseCapacities_t. |
Definition at line 446 of file cp_base.cpp.
References B_ALIEN_CONTAINMENT, B_ANTIMATTER, B_HANGAR, B_LAB, B_QUARTERS, B_SMALL_HANGAR, B_STORAGE, B_WORKSHOP, CAP_AIRCRAFT_BIG, CAP_AIRCRAFT_SMALL, CAP_ALIENS, CAP_ANTIMATTER, CAP_EMPLOYEES, CAP_ITEMS, CAP_LABSPACE, CAP_WORKSPACE, and MAX_BUILDING_TYPE.
Referenced by AIR_CheckMoveIntoNewHomebase(), B_ResetAllStatusAndCapacities(), B_UpdateBaseCapacities(), CAP_CheckOverflow(), and UP_AircraftDescription().
baseCapacities_t B_GetCapacityFromBuildingType | ( | buildingType_t | type | ) |
Get the capacity associated to a building type.
[in] | type | The type of the building |
Definition at line 415 of file cp_base.cpp.
References B_ALIEN_CONTAINMENT, B_ANTIMATTER, B_HANGAR, B_LAB, B_QUARTERS, B_SMALL_HANGAR, B_STORAGE, B_WORKSHOP, CAP_AIRCRAFT_BIG, CAP_AIRCRAFT_SMALL, CAP_ALIENS, CAP_ANTIMATTER, CAP_EMPLOYEES, CAP_ITEMS, CAP_LABSPACE, CAP_WORKSPACE, and MAX_CAP.
Referenced by AIR_GetHangarCapacityType(), B_BuildingDestroy(), B_BuildingDestroy_f(), B_ListBuildings_f(), B_UpdateAllBaseBuildingStatus(), and TR_DestinationCapacityList_f().
Returns the count of founded bases.
Definition at line 276 of file cp_base.cpp.
References ccs, and ccs_s::numBases.
Referenced by B_BaseInit_f(), B_BuildBase_f(), B_BuildingDestroy_f(), B_BuildingOpenAfterClick_f(), B_GetFoundedBaseByIDX(), B_GetNext(), B_InitCallbacks(), B_LoadXML(), B_SelectBase(), B_SetBaseTitle_f(), BDEF_RemoveBattery_f(), GEO_Click(), GEO_GetGeoscapeAngle(), and INS_FillTypes_f().
returns the currently selected base
Definition at line 1578 of file cp_base.cpp.
References B_GetNext(), and base_s::selected.
Referenced by AC_Init_f(), AC_KillAll_f(), AC_KillOne_f(), AIM_AircraftEquipAddItem_f(), AIM_AircraftEquipMenuUpdate(), AIM_AircraftEquipRemoveItem_f(), AIM_AircraftEquipSlotSelect_f(), AIM_AircraftEquipZoneSelect_f(), AIM_AircraftReturnToBase_f(), AIM_AircraftStart_f(), AIM_SelectAircraft_f(), AIM_UpdateItemDescription(), AIR_AircraftFillList_f(), AIR_ChangeAircraftName_f(), B_BaseInit_f(), BDEF_AddItem_f(), BDEF_BaseDefenceMenuUpdate_f(), BDEF_ChangeAutoFire(), BDEF_RemoveItem_f(), BDEF_SelectItem_f(), BS_Buy_f(), BS_FillMarket_f(), CP_TEAM_AssignSoldierByUCN_f(), CP_TEAM_DeEquipActor_f(), CP_TEAM_FillBDEFEmployeeList_f(), CP_TEAM_FillEmployeeList_f(), CP_TEAM_FillEquipSoldierList_f(), CP_TEAM_SelectActorByUCN_f(), E_EmployeeHire_f(), E_EmployeeList_f(), E_EmployeeSelect(), E_UpdateGUICount_f(), PR_ProductionDecrease_f(), PR_ProductionDown_f(), PR_ProductionIncrease_f(), PR_ProductionList_f(), PR_ProductionListClick_f(), PR_ProductionListRightClick_f(), PR_ProductionStop_f(), PR_ProductionType_f(), PR_ProductionUp_f(), RS_Change_f(), RS_FillTechnologyList_f(), RS_Max_f(), RS_Stop_f(), TR_Add_f(), TR_Fill_f(), TR_Init_f(), TR_InitBaseList(), TR_SelectBase_f(), TR_TransferListClear_f(), and TR_TransferStart_f().
Get the first unfounded base.
Definition at line 1537 of file cp_base.cpp.
References B_GetBaseByIDX(), base_s::founded, and MAX_BASES.
Referenced by B_Build().
Array bound check for the base index.
[in] | baseIdx | Index to check |
Definition at line 325 of file cp_base.cpp.
References B_GetBaseByIDX(), and B_GetCount().
Referenced by AC_Init_f(), AC_KillAll_f(), AC_KillExceeding_f(), AC_KillOne_f(), AC_LoadXML(), AIR_ShowAircraft_f(), B_AssembleMap_f(), B_BaseInit_f(), B_BuildingDestroy_f(), B_BuildingOpenAfterClick_f(), B_ChangeBaseName_f(), B_Destroy_AntimaterStorage_f(), B_FillMap_f(), B_SelectBase_f(), BDEF_RemoveBattery_f(), BS_Buy_f(), BS_FillMarket_f(), CL_PopupChangeHomebase_f(), E_GetCounts_f(), GAME_CP_DrawBaseLayoutTooltip(), HOS_Init_f(), PR_ShowActiveProduction_f(), RADAR_UpdateBaseRadarCoverage_f(), RS_ShowActiveResearch_f(), TR_DestinationCapacityList_f(), and TR_SelectBase_f().
building_t* B_GetFreeBuildingType | ( | buildingType_t | type | ) |
Counts the actual installation count limit.
Definition at line 1153 of file cp_base.cpp.
References B_COMMAND, B_GetBuildingStatus(), B_GetNext(), and MAX_INSTALLATIONS_PER_BASE.
Referenced by INS_BuildInstallation_f(), INS_FillTypes_f(), INS_SelectType_f(), INS_UpdateInstallationLimit_f(), and TEST_F().
float B_GetMaxBuildingLevel | ( | const base_t * | base, |
const buildingType_t | type | ||
) |
Get the maximum level of a building type in a base.
[in] | base | Pointer to base. |
[in] | type | Building type to get the maximum level for. |
Definition at line 518 of file cp_base.cpp.
References B_GetBuildingStatus(), B_GetNextBuildingByType(), B_STATUS_WORKING, building_s::buildingStatus, and building_s::level.
Referenced by B_Build(), B_LoadXML(), and RADAR_UpdateBaseRadarCoverage_f().
Iterates through founded bases.
[in] | lastBase | Pointer of the base to iterate from. call with nullptr to get the first one. |
Definition at line 285 of file cp_base.cpp.
References B_GetCount(), ccs_s::bases, and ccs.
Referenced by AB_UpdateStealthForAllBase(), AII_RepairAircraft(), AII_UpdateInstallationDelay(), AIR_AircraftsNotifyUFORemoved(), AIRFIGHT_CampaignRunBaseDefence(), AL_CountAll(), B_GetCurrentSelectedBase(), B_GetInstallationLimit(), B_MoveAircraftOnGeoscapeToOtherBases(), B_PostLoadInitCapacity(), B_SaveXML(), B_SetCurrentSelectedBase(), B_UpdateBuildingConstructions(), BDEF_AutoSelectTarget(), CAP_CheckOverflow(), CL_DisplayHomebasePopup(), CL_DisplayPopupInterceptUFO(), CL_PopupInterceptBaseClick_f(), CP_BaseAttackChooseBase(), CP_ResetCampaignData(), GEO_Click(), GEO_DrawMarkers(), GEO_GetGeoscapeAngle(), GEO_PositionCloseToBase(), NAT_HandleBudget(), PR_PostLoadInitProgress(), PR_ProductionBase(), PR_ProductionRun(), PR_SaveXML(), RADAR_AddDetectedUFOToEveryRadar(), RADAR_CheckRadarSensored(), RADAR_DeactivateRadarOverlay(), RADAR_NotifyUFORemoved(), RADAR_UpdateStaticRadarCoverage(), RS_MarkStoryLineEventResearched(), STAT_GetExpenses_f(), TR_Init_f(), TR_InitBaseList(), UFO_CampaignCheckEvents(), and UFO_UpdateAlienInterestForAllBasesAndInstallations().
building_t* B_GetNextBuilding | ( | const base_t * | base, |
building_t * | lastBuilding | ||
) |
Iterates through buildings in a base.
[in] | base | Pointer to the base which buildings asked |
[in] | lastBuilding | Pointer to the building iterate from. Call with nullptr to get the first one. |
Definition at line 338 of file cp_base.cpp.
References B_GetBuildingByIDX, ccs_s::buildings, ccs, base_s::idx, and ccs_s::numBuildings.
Referenced by B_GetNextBuildingByType(), B_GetNumberOfBuildingsInBaseByTemplate(), B_IsBuildingDestroyable(), B_ResetAllStatusAndCapacities(), B_SaveXML(), B_UpdateBuildingConstructions(), B_UpdateStatusBuilding(), and CP_GetSalaryUpKeepBase().
building_t* B_GetNextBuildingByType | ( | const base_t * | base, |
building_t * | lastBuilding, | ||
buildingType_t | buildingType | ||
) |
Iterates throught buildings of a type in a base.
[in] | base | Pointer to the base which buildings asked |
[in] | lastBuilding | Pointer to the building iterate from. Call with nullptr to get the first one. |
[in] | buildingType | Type of the buildings to search |
Definition at line 366 of file cp_base.cpp.
References B_GetNextBuilding(), and building_s::buildingType.
Referenced by B_CheckBuildingTypeStatus(), B_GetBuildingInBaseByType(), B_GetMaxBuildingLevel(), B_GetNumberOfBuildingsInBaseByBuildingType(), B_UpdateBaseCapacities(), and BDEF_RemoveBattery_f().
int B_GetNumberOfBuildingsInBaseByBuildingType | ( | const base_t * | base, |
const buildingType_t | buildingType | ||
) |
Counts the number of buildings of a particular building type in a base.
[in] | base | Which base to count in. |
[in] | buildingType | Building type value. |
Definition at line 1386 of file cp_base.cpp.
References B_GetNextBuildingByType(), B_STATUS_NOT_SET, building_s::buildingStatus, cgi, and MAX_BUILDING_TYPE.
Referenced by B_BuildingDestroy(), and CP_BaseAttackStartMission().
int B_GetNumberOfBuildingsInBaseByTemplate | ( | const base_t * | base, |
const building_t * | tpl | ||
) |
Counts the number of buildings of a particular type in a base.
[in] | base | Which base to count in. |
[in] | tpl | The template type in the ccs.buildingTemplates list. |
Definition at line 1353 of file cp_base.cpp.
References B_GetNextBuilding(), B_STATUS_NOT_SET, building_s::buildingStatus, cgi, and building_s::tpl.
Referenced by B_FillBuildingInfo_f(), and B_ListBuildings_f().
Resets console commands.
Definition at line 1971 of file cp_base.cpp.
References cgi.
Referenced by CP_InitStartup().
bool B_IsBuildingDestroyable | ( | const building_t * | building | ) |
Returns if a base building is destroyable.
[in] | building | Pointer to the building to check |
Definition at line 223 of file cp_base.cpp.
References B_GetNeighbours(), B_GetNextBuilding(), building_s::base, BASE_DESTROYED, base_s::baseStatus, ccs, cgi, linkedList_t::data, i, building_s::idx, base_s::idx, LIST_Foreach, MAX_BUILDINGS, ccs_s::numBuildings, and OBJZERO.
Referenced by B_BuildingDestroy(), and B_BuildingDestroy_f().
Check if the item has been collected (i.e it is in the storage) in the given base.
[in] | item | The item to check |
[in] | base | The base to search in. |
Definition at line 2134 of file cp_base.cpp.
References objDef_s::idx, objDef_s::isVirtual, equipDef_s::numItems, and base_s::storage.
Referenced by AIM_UpdateAircraftItemList(), AIR_Refuel(), B_AddToStorage(), B_AntimatterInBase(), B_BaseHasItem(), B_UpdateAntimatterCap(), BS_Buy_f(), BS_FillMarket_f(), BS_SellItem(), CAP_UpdateStorageCap(), PR_RequirementsInfo(), PR_RequirementsMet(), PR_UpdateProductionList(), RS_RequirementsMet(), TR_Add_f(), and TR_FillItems().
bool B_ItemIsStoredInBaseStorage | ( | const objDef_t * | obj | ) |
Check if an item is stored in storage.
[in] | obj | Pointer to the item to check. |
Definition at line 2558 of file cp_base.cpp.
References ANTIMATTER_ITEM_ID, objDef_s::id, objDef_s::isVirtual, and Q_streq.
Referenced by B_AddToStorage(), CAP_UpdateStorageCap(), CP_ItemsSanityCheck(), TR_Add_f(), TR_EmptyTransferCargo(), TR_FillItems(), and TR_TransferStart().
int B_LoadBaseSlotsXML | ( | baseWeapon_t * | weapons, |
int | max, | ||
xmlNode_t * | p | ||
) |
Loads the missile and laser slots of a base or sam site.
[out] | weapons | Defence weapons array |
[out] | max | Number of entries in weapons array |
[in] | p | XML Node structure, where we load the information from |
Definition at line 2348 of file cp_base.cpp.
References AII_LoadOneSlotXML(), baseWeapon_s::autofire, cgi, i, SAVE_BASES_AUTOFIRE, SAVE_BASES_TARGET, SAVE_BASES_WEAPON, baseWeapon_s::target, UFO_GetByIDX(), cgame_import_s::XML_GetNextNode(), cgame_import_s::XML_GetNode(), and xmlNode_t.
Referenced by B_LoadXML(), and INS_LoadXML().
bool B_LoadStorageXML | ( | xmlNode_t * | parent, |
equipDef_t * | equip | ||
) |
Loads base storage.
[in] | parent | XML Node structure, where we get the information from |
[out] | equip | Storage to load |
Definition at line 2388 of file cp_base.cpp.
References cgi, objDef_s::idx, INVSH_GetItemByID(), equipDef_s::numItems, equipDef_s::numItemsLoose, SAVE_BASES_ITEM, SAVE_BASES_NUM, SAVE_BASES_NUMLOOSE, SAVE_BASES_ODS_ID, cgame_import_s::XML_GetNextNode(), cgame_import_s::XML_GetNode(), cgame_import_s::XML_GetString(), and xmlNode_t.
Referenced by B_LoadXML().
Check a base cell.
Definition at line 1263 of file cp_base.cpp.
References B_GetBuildingAt, B_IsTileBlocked, and BASE_SIZE.
void B_ParseBaseTemplate | ( | const char * | name, |
const char ** | text | ||
) |
Reads a base layout template.
[in] | name | The script id of the base template |
[in] | text | The script block to parse |
Definition at line 1435 of file cp_base.cpp.
References BASE_SIZE, ccs_s::baseTemplates, baseBuildingTile_s::building, baseTemplate_s::buildings, ccs_s::buildingTemplates, ccs, cgi, cgame_import_s::Com_EParse(), Com_Parse(), cp_campaignPool, linkedList_t::data, ERR_DROP, i, building_s::id, baseTemplate_s::id, building_s::mandatory, MAX_BASEBUILDINGS, MAX_BASETEMPLATES, MAX_BUILDINGS, building_s::maxCount, linkedList_t::next, ccs_s::numBaseTemplates, baseTemplate_s::numBuildings, ccs_s::numBuildingTemplates, OBJZERO, cgame_import_s::PoolStrDup(), mission_s::pos, baseBuildingTile_s::posX, baseBuildingTile_s::posY, Q_streq, and V_POS.
Referenced by CP_ParseScriptSecond().
Recalculate status and capacities of one base.
[in] | base | Pointer to the base where status and capacities must be recalculated |
[in] | firstEnable | true if this is the first time the function is called for this base |
Definition at line 705 of file cp_base.cpp.
References B_CheckUpdateBuilding(), B_FireEvent(), B_GetBuildingStatus(), B_GetBuildingTypeByCapacity(), B_GetNextBuilding(), B_MISC, B_ONENABLE, B_SetBuildingStatus(), B_UpdateAntimatterCap(), B_UpdateBaseCapacities(), building_s::buildingType, CAP_ANTIMATTER, CAP_EMPLOYEES, CAP_GetFreeCapacity(), CAP_ITEMS, CAP_LABSPACE, CAP_SetCurrent(), CAP_UpdateStorageCap(), CAP_WORKSPACE, cgi, DEBUG_CLIENT, E_CountAllHired(), i, MAX_BUILDING_TYPE, MAX_CAP, base_s::name, PR_UpdateProductionCap(), RS_CountScientistsInBase(), and type.
Referenced by B_Build(), and B_PostLoadInitCapacity().
void B_SaveBaseSlotsXML | ( | const baseWeapon_t * | weapons, |
const int | numWeapons, | ||
xmlNode_t * | node | ||
) |
Saves the missile and laser slots of a base or sam site.
[in] | weapons | Defence weapons array |
[in] | numWeapons | Number of entries in weapons array |
[out] | node | XML Node structure, where we write the information to |
Definition at line 2229 of file cp_base.cpp.
References AII_SaveOneSlotXML(), cgi, i, SAVE_BASES_AUTOFIRE, SAVE_BASES_TARGET, SAVE_BASES_WEAPON, cgame_import_s::XML_AddNode(), and xmlNode_t.
Referenced by B_SaveXML(), and INS_SaveXML().
bool B_SaveStorageXML | ( | xmlNode_t * | parent, |
const equipDef_t & | equip | ||
) |
Saves base storage.
[out] | parent | XML Node structure, where we write the information to |
[in] | equip | Storage to save |
Definition at line 2245 of file cp_base.cpp.
References cgi, cgame_import_s::csi, objDef_s::id, INVSH_GetItemByIDX(), equipDef_s::numItems, equipDef_s::numItemsLoose, csi_s::numODs, SAVE_BASES_ITEM, SAVE_BASES_NUM, SAVE_BASES_NUMLOOSE, SAVE_BASES_ODS_ID, cgame_import_s::XML_AddNode(), and xmlNode_t.
Referenced by B_SaveXML().
Select and opens a base.
[in] | base | If this is nullptr we want to build a new base |
Definition at line 1592 of file cp_base.cpp.
References B_GetCount(), B_SetCurrentSelectedBase(), ccs, cgi, DEBUG_CLIENT, GEO_IsRadarOverlayActivated(), GEO_ResetAction(), GEO_SetOverlay(), base_s::idx, MA_NEWBASE, MA_NONE, ccs_s::mapAction, MAX_BASES, and va().
Referenced by B_BuildBase_f(), B_SelectBase_f(), CL_PopupInterceptRClick_f(), and CP_CampaignInit().
void B_SetBuildingStatus | ( | base_t *const | base, |
const buildingType_t | buildingType, | ||
bool | newStatus | ||
) |
Set status associated to a building.
[in] | base | Base to check |
[in] | buildingType | value of building->buildingType |
[in] | newStatus | New value of the status |
Definition at line 498 of file cp_base.cpp.
References B_MISC, cgi, DEBUG_CLIENT, base_s::hasBuilding, and MAX_BUILDING_TYPE.
Referenced by B_BuildingDestroy(), B_CheckUpdateBuilding(), and B_ResetAllStatusAndCapacities().
Sets the selected base.
[in] | base | The base that is going to be selected |
Definition at line 1553 of file cp_base.cpp.
References AIR_GetFirstFromBase(), base_s::aircraftCurrent, B_GetNext(), base_s::baseStatus, cgi, cgame_import_s::Cvar_Set(), INS_SetCurrentSelectedInstallation(), base_s::name, and base_s::selected.
Referenced by B_Build(), B_SelectBase(), CP_BaseAttackPrepareBattle(), and INS_SelectInstallation().
Set the base name.
[out] | base | The base to set the name for |
[in] | name | The name for the base. This might already be in utf-8 as it's the user input from the UI |
Definition at line 1173 of file cp_base.cpp.
References base_s::name, and Q_strncpyz().
Referenced by B_Build(), B_ChangeBaseName_f(), and TEST_F().
void B_SetUpFirstBase | ( | const struct campaign_s * | campaign, |
base_t * | base | ||
) |
void B_UpdateBaseCapacities | ( | baseCapacities_t | cap, |
base_t * | base | ||
) |
Updates base capacities.
[in] | cap | Enum type of baseCapacities_t. |
[in] | base | Pointer to the base. |
< Update Aliens capacity in base.
< Update employees capacity in base.
< Update laboratory space capacity in base.
< Update workshop space capacity in base.
< Update items capacity in base.
< Update aircraft capacity in base.
< Update aircraft capacity in base.
< Update antimatter capacity in base.
< Update all capacities in base.
Definition at line 2161 of file cp_base.cpp.
References base_s::alienContainment, B_GetBuildingTypeByCapacity(), B_GetNextBuildingByType(), B_STATUS_CONSTRUCTION_FINISHED, B_UpdateBaseCapacities(), building_s::buildingStatus, ccs_s::buildingTemplates, building_s::buildingType, CAP_AddMax(), CAP_AIRCRAFT_BIG, CAP_AIRCRAFT_SMALL, CAP_ALIENS, CAP_ANTIMATTER, CAP_EMPLOYEES, CAP_Get, CAP_GetMax, CAP_ITEMS, CAP_LABSPACE, CAP_SetMax(), CAP_WORKSPACE, building_s::capacity, ccs, cgi, capacities_s::cur, DEBUG_CLIENT, ERR_DROP, i, building_s::id, capacities_s::max, and ccs_s::numBuildingTemplates.
Referenced by B_BuildingDestroy(), B_ResetAllStatusAndCapacities(), B_UpdateAllBaseBuildingStatus(), and B_UpdateBaseCapacities().
Updates base data.
Definition at line 2010 of file cp_base.cpp.
References _, B_CheckBuildingConstruction(), B_GetNext(), B_GetNextBuilding(), Com_sprintf(), cp_messageBuffer, lengthof, MSO_CheckAddNewMessage(), building_s::name, base_s::name, and NT_BUILDING_FINISHED.
Referenced by CP_CampaignRun(), and TEST_F().
bool BS_BuySellAllowed | ( | const base_t * | base | ) |
Returns true if you can buy or sell equipment.
[in] | base | Pointer to base to check on |
Definition at line 655 of file cp_market.cpp.
References B_GetBuildingStatus(), B_IsUnderAttack, and B_STORAGE.
Referenced by B_BaseInit_f(), and B_BuildingOpenAfterClick_f().
bool E_HireAllowed | ( | const base_t * | base | ) |
Returns true if the current base is able to handle employees.
Definition at line 985 of file cp_employee.cpp.
References B_GetBuildingStatus(), B_IsUnderAttack, and B_QUARTERS.
Referenced by B_BaseInit_f(), and B_BuildingOpenAfterClick_f().
bool HOS_HospitalAllowed | ( | const base_t * | base | ) |
Returns true if you can enter in the hospital.
Definition at line 210 of file cp_hospital.cpp.
References B_GetBuildingStatus(), B_HOSPITAL, and B_IsUnderAttack.
Referenced by B_BaseInit_f(), and B_BuildingOpenAfterClick_f().
bool PR_ProductionAllowed | ( | const base_t * | base | ) |
Returns true if the current base is able to produce items.
[in] | base | Pointer to the base. |
Definition at line 595 of file cp_produce.cpp.
References B_GetBuildingStatus(), B_IsUnderAttack, B_WORKSHOP, E_CountHired(), and EMPL_WORKER.
Referenced by B_BaseInit_f(), B_BuildingOpenAfterClick_f(), PR_ProductionRun(), PR_ShowActiveProduction_f(), PR_UpdateProductionCap(), TEST_F(), and TR_TransferStart().
bool RS_ResearchAllowed | ( | const base_t * | base | ) |
Returns true if the current base is able to handle research.
Definition at line 1835 of file cp_research.cpp.
References B_GetBuildingStatus(), B_IsUnderAttack, B_LAB, E_CountHired(), and EMPL_SCIENTIST.
Referenced by B_BaseInit_f(), B_BuildingOpenAfterClick_f(), RS_ResearchRun(), RS_ShowActiveResearch_f(), and TR_TransferStart().