2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: marc_book, edited by commy2
|
|
|
|
* Checks if a unit is an engineer.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-18 19:12:40 +00:00
|
|
|
* 0: unit to be checked <OBJECT>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-09-18 19:12:40 +00:00
|
|
|
* is the unit an engineer <BOOL>
|
|
|
|
*
|
2015-09-26 04:36:35 +00:00
|
|
|
* Example:
|
|
|
|
* [player] call ace_common_fnc_isEngineer
|
|
|
|
*
|
2015-09-18 19:12:40 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-18 19:12:40 +00:00
|
|
|
params ["_unit"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2017-06-10 10:41:01 +00:00
|
|
|
private _isEngineer = _unit getVariable ["ACE_isEngineer", _unit getUnitTrait "engineer"];
|
2015-09-26 04:36:35 +00:00
|
|
|
//Handle ace_repair modules setting this to a number
|
2015-11-28 03:23:27 +00:00
|
|
|
if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0};
|
2015-09-26 04:36:35 +00:00
|
|
|
|
|
|
|
_isEngineer
|