mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
9e5c4a7ed9
* 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
31 lines
781 B
Plaintext
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
|