diff --git a/addons/main/functions/extract_data/fn_extract_role.sqf b/addons/main/functions/extract_data/fn_extract_role.sqf index da3ab3e..b99ef87 100644 --- a/addons/main/functions/extract_data/fn_extract_role.sqf +++ b/addons/main/functions/extract_data/fn_extract_role.sqf @@ -1,22 +1,18 @@ params["_unit"]; private _role = "Gnd Combat Infantry Rifleman"; -/* - TODO - Provide one of these options using tons of ifs - "Gnd Combat Infantry Rifleman", Nickname: "Rifleman" - "Gnd Combat Infantry grenadier", Nickname: "Grenadier" - "Gnd Combat Infantry Mortar" , Nickname: "Mortar" - "Gnd Combat Infantry MachineGunner (LMG)", Nickname: "LMG" - "Gnd Combat Infantry Medic" , Nickname: "Medic" - "Gnd Combat Infantry Sniper", Nickname: "Sniper" - "Gnd Combat Infantry Recon" , Nickname: "Recon" - "Gnd Combat Infantry anti Tank" , Nickname: "anti Tank" - "Gnd Combat Infantry air defense", Nickname: "AA" - "Gnd Combat Infantry Engineer", Nickname: "Engineer" - "Ground" +if (vehicle _unit != _unit) then { + if (vehicle _unit isKindOf "StaticWeapon") then { + _role = "Gnd Combat Infantry Mortar"; + }; +}; - "Gnd Equip Vehic Civilian", Nickname: Vehicle (OK) - "Gnd Equip Vehic Ambulance": "a-.-G-E-V-m" , Nickname: Ambulance (OK) -*/ +if ([_unit] call ace_common_fnc_isMedic) then { + _role = "Gnd Combat Infantry Medic"; +}; + +if ([_unit] call ace_common_fnc_isEngineer || [_unit] call ace_common_fnc_isEOD) then { + _role = "Gnd Combat Infantry Engineer"; +}; _role \ No newline at end of file