UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
building_s Struct Reference

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

#include <cp_building.h>

Data Fields

int idx
 
struct building_stpl
 
struct base_sbase
 
const char * id
 
char * name
 
const char * image
 
const char * mapPart
 
const char * pedia
 
vec2_t size
 
int fixCosts
 
int varCosts
 
float level
 
date_t 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_stech
 
const struct building_sdependsBuilding
 
int capacity
 

Detailed Description

A building with all it's data.

Definition at line 73 of file cp_building.h.

Field Documentation

int building_s::capacity

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

Definition at line 114 of file cp_building.h.

Referenced by B_BuildingDestroy_f(), B_ListBuildings_f(), and B_UpdateBaseCapacities().

const struct building_s* building_s::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().

int building_s::fixCosts
int building_s::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().

const char* building_s::image
float building_s::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().

bool building_s::mandatory
const char * building_s::mapPart

Definition at line 80 of file cp_building.h.

Referenced by B_AssembleMap().

int building_s::maxCount

How many building of the same type allowed?

Definition at line 102 of file cp_building.h.

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

int building_s::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().

char* building_s::onConstruct

Event handler functions

Definition at line 97 of file cp_building.h.

Referenced by B_FireEvent().

char* building_s::onDestroy

Definition at line 98 of file cp_building.h.

Referenced by B_BuildingDestroy(), and B_FireEvent().

char* building_s::onDisable

Definition at line 100 of file cp_building.h.

Referenced by B_BuildingDestroy(), and B_FireEvent().

char* building_s::onEnable

Definition at line 99 of file cp_building.h.

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

const char * building_s::pedia

Definition at line 80 of file cp_building.h.

Referenced by B_BuildingOpenAfterClick_f(), and B_BuildingScriptSanityCheck().

struct technology_s* building_s::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().

struct building_s* building_s::tpl
int building_s::varCosts

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