mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
83f46be990
1. Added full repair, 2. Added missing settings to modules and settings framework, 3. added assign engineer module. 4. Fixed animation bug
26 lines
847 B
Plaintext
26 lines
847 B
Plaintext
/*
|
|
* Author: Glowbal, KoffeinFlummi, commy2
|
|
* Check if a unit is any engineer class
|
|
*
|
|
* Arguments:
|
|
* 0: The Unit <OBJECT>
|
|
* 1: Class <NUMBER> <OPTIONAL>
|
|
*
|
|
* ReturnValue:
|
|
* Is in of engineer class <BOOL>
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", ["_engineerN", 1]];
|
|
TRACE_2("params",_unit,_engineerN);
|
|
|
|
private ["_class"];
|
|
_class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "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.
|
|
if (typeName _class == "BOOL") then {_class = 1};
|
|
|
|
_class >= (_engineerN min GVAR(engineerSetting_Repair)); |