mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use getUnitTrait for medics, engineers and EOD (#5246)
This commit is contained in:
parent
48b9a61497
commit
a53f68a347
@ -20,4 +20,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable ["ACE_isEOD", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "canDeactivateMines") == 1] // return
|
||||
_unit getVariable ["ACE_isEOD", _unit getUnitTrait "explosiveSpecialist"] // return
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _isEngineer = _unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1];
|
||||
private _isEngineer = _unit getVariable ["ACE_isEngineer", _unit getUnitTrait "engineer"];
|
||||
//Handle ace_repair modules setting this to a number
|
||||
if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_unit", ["_medicN", 1]];
|
||||
|
||||
private _class = _unit getVariable [QGVAR(medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")];
|
||||
private _class = _unit getVariable [QGVAR(medicClass), [0, 1] select (_unit getUnitTrait "medic")];
|
||||
|
||||
if (_class >= _medicN min GVAR(medicSetting)) exitWith {true};
|
||||
if (!GVAR(increaseTrainingInLocations)) exitWith {false};
|
||||
|
@ -20,7 +20,7 @@ params ["_unit", ["_engineerN", 1]];
|
||||
TRACE_2("params",_unit,_engineerN);
|
||||
|
||||
private ["_class"];
|
||||
_class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")];
|
||||
_class = _unit getVariable ["ACE_IsEngineer", _unit getUnitTrait "engineer"];
|
||||
|
||||
// This if statement is here for copmatability with the common variant of isEngineer, which requires a bool.
|
||||
// We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module.
|
||||
|
Loading…
Reference in New Issue
Block a user