ACE3/addons/medical_treatment/functions/fnc_isMedic.sqf
SilentSpike 9e5c4a7ed9
Move medical settings into their respective components (#6493)
* Transfer medical AI to CBA setting
* Neuter the old settings module

I've left the entry in CfgVehicles so that it doesn't cause errors on
older missions, but it's just a dumb logic now and does nothing.

* Remove medic setting
* Move increaseTraining setting
* Move fnc_adjustPainlevel to medical_status
* Move pain and bleed coefficients to medical_status
* Move advanced bandages to medical_treatment
* Move advanced medication to medical_treatment
* Move advanced diagnose to medical_treatment
* Move wound reopening and screams settings
* Move damage threshold settings
* Move showPain setting
* Move statemachine settings
* Move pain visualisation setting
* Move all treatment usage settings
* Move self IV setting
* Move remaining settings
* Sort treatment setting string categories
2018-08-06 17:08:43 +01:00

31 lines
781 B
Plaintext

#include "script_component.hpp"
/*
* Author: Glowbal, KoffeinFlummi
* Check if a unit is any medical class
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Class <NUMBER> (default: 1)
*
* Return Value:
* Is in of medic class <BOOL>
*
* Example:
* [player] call ace_medical_treatment_fnc_isMedic
*
* Public: No
*/
params ["_unit", ["_medicN", 1]];
private _class = _unit getVariable [QEGVAR(medical,medicClass), [0, 1] select (_unit getUnitTrait "medic")];
if (_class >= _medicN) exitWith {true};
if (!EGVAR(medical,increaseTrainingInLocations)) exitWith {false};
if (([_unit] call FUNC(isInMedicalVehicle)) || {[_unit] call FUNC(isInMedicalFacility)}) then {
_class = _class + 1; //boost by one: untrained becomes medic, medic becomes doctor
};
_class >= _medicN