typedef struct building_s
{
// FIXME: This can be a char* name and char* base.... don't it? See bmData in basemanagement.c
char name[MAX_VAR];
char base[MAX_VAR];
char title[MAX_VAR];
char *text, *image, *needs, *depends, *mapPart, *produceType, *pedia;
float energy, workerCosts, produceTime, fixCosts, varCosts;
int production, level, id, timeStart, buildTime, techLevel,
notUpOn, maxWorkers, minWorkers, assignedWorkers;
//if we can build more than one building of the same type:
buildingStatus_t buildingStatus[BASE_SIZE*BASE_SIZE];
int condition[BASE_SIZE*BASE_SIZE];
vec2_t size;
byte visible;
int used;
// event handler functions
char onConstruct[MAX_VAR];
char onAttack[MAX_VAR];
char onDestroy[MAX_VAR];
char onUpgrade[MAX_VAR];
char onRepair[MAX_VAR];
char onClick[MAX_VAR];
//more than one building of the same type allowed?
int moreThanOne;
//how many buildings are there of the same type?
//depends on the value of moreThanOne ^^
int howManyOfThisType;
//position of autobuild
vec2_t pos;
//autobuild when base is set up
byte autobuild;
//autobuild when base is set up
byte firstbase;
//this way we can rename the buildings without loosing the control
byte isLab;
byte isHangar;
struct building_s *dependsBuilding;
struct building_s *prev;
struct building_s *next;
} building_t;
if the isLab flag is set we can use the assignedWorkers (which are scientists in a lab) to get the amount.