A building with all it's data. More...
#include <cp_base.h>
Data Fields | |
int | idx |
struct building_s * | tpl |
struct base_s * | base |
char * | id |
char * | name |
char * | image |
char * | mapPart |
char * | pedia |
char * | needs |
int | fixCosts |
int | varCosts |
float | level |
int | timeStart |
int | buildTime |
buildingStatus_t | buildingStatus |
qboolean | visible |
char | onConstruct [MAX_VAR] |
char | onAttack [MAX_VAR] |
char | onDestroy [MAX_VAR] |
int | maxCount |
vec2_t | pos |
qboolean | mandatory |
int | maxEmployees |
buildingType_t | buildingType |
technology_t * | tech |
struct building_s * | dependsBuilding |
int | capacity |
A building with all it's data.
Definition at line 150 of file cp_base.h.
struct base_s* building_s::base |
The base this building is located in.
Definition at line 153 of file cp_base.h.
Referenced by B_LoadXML(), B_ParseBuildings(), and B_SetBuildingByClick().
[BASE_SIZE*BASE_SIZE];
Definition at line 170 of file cp_base.h.
Referenced by B_BuildingDestroy(), B_BuildingStatus(), B_CheckBuildingConstruction(), B_CheckBuildingStatusForMenu_f(), B_CheckBuildingTypeStatus(), B_CheckUpdateBuilding(), B_ConstructBuilding(), B_DrawBuilding(), B_GetMaxBuildingLevel(), B_GetNumberOfBuildingsInBaseByBuildingType(), B_GetNumberOfBuildingsInBaseByTemplate(), B_LoadXML(), B_MarkBuildingDestroy(), B_NewBuilding(), B_SaveXML(), B_UpdateAllBaseBuildingStatus(), B_UpdateBaseCapacities(), BaseSummary_Init(), BDEF_RemoveBattery_f(), CP_GetSalaryUpKeepBase(), and UI_BaseMapNodeDraw().
This way we can rename the buildings without loosing the control.
Definition at line 187 of file cp_base.h.
Referenced by B_BuildFromTemplate(), B_BuildingDestroy(), B_BuildingOpenAfterClick(), B_CheckBuildingDependencesStatus(), B_CheckBuildingStatusForMenu_f(), B_CheckUpdateBuilding(), B_GetNextBuildingByType(), B_MarkBuildingDestroy(), B_ParseBuildings(), B_ResetAllStatusAndCapacities(), B_UpdateAllBaseBuildingStatus(), B_UpdateBaseCapacities(), B_UpdateStatusBuilding(), BaseSummary_Init(), and E_HireForBuilding().
Definition at line 168 of file cp_base.h.
Referenced by B_CheckBuildingConstruction(), B_CheckBuildingStatusForMenu_f(), B_DrawBuilding(), B_LoadXML(), B_SaveXML(), BaseSummary_Init(), UI_BaseMapNodeDraw(), and UP_BuildingDescription().
Capacity of this building (used in calculate base capacities).
Definition at line 191 of file cp_base.h.
Referenced by B_MarkBuildingDestroy(), and B_UpdateBaseCapacities().
If the building needs another one to work (= to be buildable).
Definition at line 189 of file cp_base.h.
Referenced by B_BuildingStatus(), B_CheckBuildingDependencesStatus(), B_CheckBuildingStatusForMenu_f(), B_DrawBuilding(), B_ParseBuildings(), B_UpdateStatusBuilding(), UI_BaseMapNodeDrawTooltip(), and UP_BuildingDescription().
Definition at line 160 of file cp_base.h.
Referenced by B_ConstructBuilding(), B_DrawBuilding(), B_SetBuildingByClick(), and UP_BuildingDescription().
char* building_s::id |
Definition at line 155 of file cp_base.h.
Referenced by B_AddBuildingToBasePos(), B_AssembleMap(), B_ConstructBuilding(), B_GetBuildingTemplate(), B_ParseBaseTemplate(), B_ParseBuildings(), B_SaveXML(), B_ScriptSanityCheck(), B_UpdateBaseCapacities(), and RS_InitTree().
int building_s::idx |
Index in in the base buildings list.
Definition at line 151 of file cp_base.h.
Referenced by B_AssembleMap(), B_BuildingDestroy(), B_LoadXML(), B_ParseBuildings(), B_SaveXML(), B_SetBuildingByClick(), E_SaveXML(), and UI_BaseMapNodeDraw().
char* building_s::image |
Definition at line 157 of file cp_base.h.
Referenced by B_DrawBuilding(), B_ScriptSanityCheck(), RS_InitTree(), and UI_BaseMapNodeDraw().
float building_s::level |
level of the building.
Definition at line 166 of file cp_base.h.
Referenced by B_GetMaxBuildingLevel(), B_LoadXML(), and B_SaveXML().
Definition at line 182 of file cp_base.h.
Referenced by B_BuildFromTemplate(), and B_ParseBaseTemplate().
char * building_s::mapPart |
Definition at line 157 of file cp_base.h.
Referenced by B_AssembleMap(), and B_ScriptSanityCheck().
How many building of the same type allowed?
Definition at line 179 of file cp_base.h.
Referenced by B_BuildingInit(), B_ParseBaseTemplate(), and B_ParseBuildings().
How many employees to hire on construction in the first base
Definition at line 185 of file cp_base.h.
Referenced by E_HireForBuilding().
char* building_s::name |
translatable name of the building
Definition at line 156 of file cp_base.h.
Referenced by B_BuildingAddToList(), B_BuildingStatus(), B_CheckBuildingStatusForMenu_f(), B_CheckUpdateBuilding(), B_DrawBuilding(), B_ScriptSanityCheck(), B_UpdateBaseData(), BaseSummary_Init(), RS_InitTree(), UI_BaseMapNodeDrawTooltip(), and UP_BuildingDescription().
char* building_s::needs |
"needs" determines the second building part.
Definition at line 159 of file cp_base.h.
Referenced by B_AssembleMap(), B_BuildingDestroy(), B_SetBuildingByClick(), UI_BaseMapNodeClick(), and UI_BaseMapNodeDraw().
char building_s::onAttack[MAX_VAR] |
char building_s::onConstruct[MAX_VAR] |
Event handler functions
Definition at line 175 of file cp_base.h.
Referenced by B_AddBuildingToBasePos(), and B_CheckBuildingConstruction().
char building_s::onDestroy[MAX_VAR] |
Definition at line 177 of file cp_base.h.
Referenced by B_BuildingDestroy().
char * building_s::pedia |
Definition at line 157 of file cp_base.h.
Referenced by B_BuildingInfoClick_f(), B_BuildingOpenAfterClick(), and B_ScriptSanityCheck().
location in the base.
Definition at line 181 of file cp_base.h.
Referenced by B_AddBuildingToBasePos(), B_BuildingDestroy(), B_LoadXML(), B_SaveXML(), and B_SetBuildingByClick().
Link to the building-technology.
Definition at line 188 of file cp_base.h.
Referenced by B_BuildingInit(), B_ParseBuildings(), and BaseSummary_Init().
Definition at line 168 of file cp_base.h.
Referenced by B_CheckBuildingConstruction(), B_CheckBuildingStatusForMenu_f(), B_ConstructBuilding(), B_LoadXML(), B_SaveXML(), BaseSummary_Init(), and UI_BaseMapNodeDraw().
struct building_s* building_s::tpl |
Self link in "buildingTemplates" list.
Definition at line 152 of file cp_base.h.
Referenced by B_BuildingAddToList(), B_BuildingDestroy(), B_BuildingStatus(), B_CheckBuildingDependencesStatus(), B_GetNumberOfBuildingsInBaseByTemplate(), B_ParseBuildings(), and B_SaveXML().
Definition at line 160 of file cp_base.h.
Referenced by B_DrawBuilding(), CP_GetSalaryUpKeepBase(), and UP_BuildingDescription().
Is this building visible in the building list.
Definition at line 172 of file cp_base.h.
Referenced by B_BuildingInit(), B_ParseBuildings(), and B_ScriptSanityCheck().