/** * @brief Checks health status of all employees in all bases. * @sa CP_CampaignRun * @note Called every day. */ void HOS_HospitalRun (void) { int i; for (i = 0; i < MAX_EMPL; i++) { employeeType_t type = (employeeType_t)i; E_Foreach(type, employee) { if (!employee->isHired()) continue; if (B_GetBuildingStatus(employee->baseHired, B_HOSPITAL)) HOS_HealCharacter(&(employee->chr), true); else HOS_HealCharacter(&(employee->chr), false); } } }
/** * @brief Checks health status of all employees in all bases. * @sa CP_CampaignRun * @note Called every day. */ void HOS_HospitalRun (void) { for (int i = 0; i < MAX_EMPL; i++) { const employeeType_t type = (employeeType_t)i; E_Foreach(type, employee) { if (!employee->isHired()) continue; const bool hospital = B_GetBuildingStatus(employee->baseHired, B_HOSPITAL); HOS_HealCharacter(&(employee->chr), hospital); CHRSH_UpdateImplants(employee->chr); } } }
/** * @brief Callback for HOS_HealCharacter() in hospital. * @param[in] employee Pointer to the employee to heal. * @sa HOS_HealCharacter * @sa HOS_HealAll */ bool HOS_HealEmployee (Employee* employee) { assert(employee); return HOS_HealCharacter(&employee->chr, true); }