95 assert(base !=
nullptr);
122 #define E_Foreach(employeeType, var) LIST_Foreach(ccs.employees[employeeType], Employee, var)
Employee * E_GetHiredRobot(const base_t *const base, const struct ugv_s *ugvType)
int salary() const
Calculates the employee's actual salary.
A building with all it's data.
QGL_EXTERN GLint GLenum type
bool isAwayFromBase() const
Tells you if a employee is away from his home base (gone in mission).
const struct nation_s * _nation
int E_CountByType(employeeType_t type)
Returns number of employees of a type.
const employeeType_t _type
void E_InitialEmployees(const struct campaign_s *campaign)
bool E_HireEmployeeByType(base_t *base, employeeType_t type)
Hires the first free employee of that type.
Employee * E_GetAssignedEmployee(const base_t *const base, employeeType_t type)
Gets an unassigned employee of a given type from the given base.
Defines a type of UGV/Robot.
int E_CountHiredRobotByType(const base_t *const base, const struct ugv_s *ugvType)
employeeType_t E_GetEmployeeType(const char *type)
Convert string to employeeType_t.
int E_CountAllHired(const base_t *const base, const bool peopleOnly=false)
Counts all hired employees of a given base.
void E_UnhireAllEmployees(base_t *base, employeeType_t type)
Reset the hired flag for all employees of a given type in a given base.
const struct ugv_s * getUGV() const
int E_CountUnhiredRobotsByType(const struct ugv_s *ugvType)
employeeType_t getType() const
void E_DeleteAllEmployees(base_t *base)
Removes all employees completely from the game (buildings + global list) from a given base...
A base with all it's data.
Employee * E_CreateEmployee(employeeType_t type, const struct nation_s *nation, const struct ugv_s *ugvType=nullptr)
bool E_HireRobot(base_t *base, const struct ugv_s *ugvType)
const struct ugv_s * _ugv
Employee * E_GetUnhiredRobot(const struct ugv_s *ugvType)
Employee * E_GetEmployeeByTypeFromChrUCN(employeeType_t type, int uniqueCharacterNumber)
Searches employee from a type for the ucn (character id)
bool E_DeleteEmployee(Employee *employee)
Removes the employee completely from the game (buildings + global list).
void setAssigned(bool assigned)
employeeType_t
The types of employees.
bool E_HireEmployee(base_t *base, Employee *employee)
Hires the employee in a base.
void E_Shutdown(void)
Closing actions for employee-subsystem.
const struct nation_s * getNation() const
Employee(employeeType_t type, const struct nation_s *nation, const struct ugv_s *ugv)
const char * E_GetEmployeeString(employeeType_t type, int n)
Convert employeeType_t to translated string.
Employee * E_GetUnassignedEmployee(const base_t *const base, employeeType_t type)
Gets an assigned employee of a given type from the given base.
bool unassign()
Removes the employee from buildings and aircraft.
bool E_UnhireEmployee(Employee *employee)
void E_InitStartup(void)
This is more or less the initial Bind some of the functions in this file to console-commands that you...
Employee * E_GetEmployeeFromChrUCN(int uniqueCharacterNumber)
Searches all employee for the ucn (character id)
int E_GetHiredEmployees(const base_t *const base, employeeType_t type, linkedList_t **hiredEmployees)
Return a list of hired employees in the given base of a given type.
bool unhire()
Fires an employee.
int E_CountUnhired(employeeType_t type)
Counts unhired employees of a given type in a given base.
bool E_MoveIntoNewBase(Employee *employee, base_t *newBase)
int E_CountUnassigned(const base_t *const base, employeeType_t type)
Counts unassigned employees of a given type in a given base.
Employee * E_GetUnhired(employeeType_t type)
Iterates through unhired employees.
void E_RemoveInventoryFromStorage(Employee *employee)
Removes the items of an employee (soldier) from the base storage (s)he is hired at.
void unequip()
Removes the equipment from an employee.
bool isHiredInBase(const base_t *const base) const
Checks whether the given employee is in the given base.
int E_CountHired(const base_t *const base, employeeType_t type)
Counts hired employees of a given type in a given base.
void E_HireForBuilding(base_t *base, building_t *building, int num)
Hires some employees of appropriate type for a building.
Describes a character with all its attributes.