UFO: Alien Invasion
Loading...
Searching...
No Matches
building_t Struct Reference

A building with all it's data. More...

#include <cp_building.h>

Collaboration diagram for building_t:
Collaboration graph

Data Fields

int idx
struct building_s * tpl
struct base_s * base
const char * id
char * name
const char * image
const char * mapPart
const char * pedia
vec2_t size
int fixCosts
int varCosts
float level
class DateTime timeStart
int buildTime
buildingStatus_t buildingStatus
char * onConstruct
char * onDestroy
char * onEnable
char * onDisable
int maxCount
vec2_t pos
bool mandatory
int maxEmployees
buildingType_t buildingType
struct technology_s * tech
const struct building_s * dependsBuilding
int capacity

Detailed Description

A building with all it's data.

Definition at line 73 of file cp_building.h.

Field Documentation

◆ base

◆ buildingStatus

◆ buildingType

◆ buildTime

◆ capacity

int building_t::capacity

Capacity of this building (used in calculate base capacities).

Definition at line 114 of file cp_building.h.

Referenced by B_BuildingDestroy_f(), and B_UpdateBaseCapacities().

◆ dependsBuilding

const struct building_s* building_t::dependsBuilding

If the building needs another one to work (= to be buildable).

See also
"buildingTemplates" list

Definition at line 112 of file cp_building.h.

Referenced by B_CheckBuildingDependencesStatus(), B_FillBuildingInfo_f(), B_ParseBuildings(), B_UpdateStatusBuilding(), and UP_BuildingDescription().

◆ fixCosts

int building_t::fixCosts

◆ id

◆ idx

int building_t::idx

Index in in the base buildings list.

Definition at line 74 of file cp_building.h.

Referenced by B_BuildBuilding(), B_BuildingDestroy(), B_IsBuildingDestroyable(), B_LoadXML(), B_ParseBuildings(), and B_SaveXML().

◆ image

const char* building_t::image

◆ level

float building_t::level

level of the building.

Note
This value depends on the implementation of the affected building might e.g. be a factor

Definition at line 89 of file cp_building.h.

Referenced by B_GetMaxBuildingLevel(), B_LoadXML(), and B_SaveXML().

◆ mandatory

bool building_t::mandatory

◆ mapPart

const char * building_t::mapPart

Definition at line 80 of file cp_building.h.

Referenced by B_AssembleMap().

◆ maxCount

int building_t::maxCount

How many building of the same type allowed?

Definition at line 102 of file cp_building.h.

Referenced by B_FillBuildingInfo_f(), B_ParseBaseTemplate(), and B_ParseBuildings().

◆ maxEmployees

int building_t::maxEmployees

How many employees to hire on construction in the first base

Definition at line 108 of file cp_building.h.

Referenced by E_HireForBuilding().

◆ name

◆ onConstruct

char* building_t::onConstruct

Event handler functions

Definition at line 97 of file cp_building.h.

Referenced by B_FireEvent().

◆ onDestroy

char* building_t::onDestroy

Definition at line 98 of file cp_building.h.

Referenced by B_BuildingDestroy(), and B_FireEvent().

◆ onDisable

char* building_t::onDisable

Definition at line 100 of file cp_building.h.

Referenced by B_BuildingDestroy(), and B_FireEvent().

◆ onEnable

char* building_t::onEnable

Definition at line 99 of file cp_building.h.

Referenced by B_AddBuildingToBasePos(), B_CheckBuildingConstruction(), and B_FireEvent().

◆ pedia

const char * building_t::pedia

Definition at line 80 of file cp_building.h.

Referenced by B_BuildingOpenAfterClick_f(), and B_BuildingScriptSanityCheck().

◆ pos

◆ size

◆ tech

struct technology_s* building_t::tech

Link to the building-technology.

Definition at line 111 of file cp_building.h.

Referenced by B_ListBuildings_f(), B_ParseBuildings(), and TR_DestinationCapacityList_f().

◆ timeStart

◆ tpl

struct building_s* building_t::tpl

Self link in "buildingTemplates" list.

Definition at line 75 of file cp_building.h.

Referenced by B_BuildingDestroy(), B_GetNumberOfBuildingsInBaseByTemplate(), B_ListBuildings_f(), B_ParseBuildings(), and B_SaveXML().

◆ varCosts

int building_t::varCosts

The documentation for this struct was generated from the following file: