linted extract role func

This commit is contained in:
Valmo Trindade
2024-08-27 05:07:56 -03:00
parent 8f33a23327
commit 1c74f9cb94

View File

@@ -4,44 +4,96 @@ private _affiliation = "f";
private _type = "G";
switch (side _unit) do {
case "WEST": { _affiliation = "f"; };
case "EAST": { _affiliation = "h"; };
case "INDEPENDENT": { _affiliation = "n"; };
case "CIVILIAN": { _affiliation = "u"; };
default { _affiliation = "f"; };
case "WEST": {
_affiliation = "f";
};
case "EAST": {
_affiliation = "h";
};
case "INDEPENDENT": {
_affiliation = "n";
};
case "CIVILIAN": {
_affiliation = "u";
};
default {
_affiliation = "f";
};
};
_unit_type = _unit call BIS_fnc_objectType;
switch (_unit_type) do {
case "AT": { _type = "G-U-C-F-R"; };
case "Civilian": { _type = "G-E-V-C"; };
case "Diver": { _type = "U-S"; };
case "Infantry": { _type = "G-U-C-I"; };
case "Medic": { _type = "a-f-G-U-C"; };
case "MG": { _type = "G-U-C-I"; };
case "Officer": { _type = "G-U-C-I"; };
case "Pilot": {_type = "G-U-C-V"; };
case "Sniper": { _type = "G-U-C-R-X"; };
case "SpecialForces": { _type = ""; };
case "UAVPilot": { _type = "G-U-C-V-U"; };
default { _type = "G-U-C-I"; };
case "AT": {
_type = "G-U-C-F-R";
};
case "Civilian": {
_type = "G-E-V-C";
};
case "Diver": {
_type = "U-S";
};
case "Infantry": {
_type = "G-U-C-I";
};
case "Medic": {
_type = "a-f-G-U-C";
};
case "MG": {
_type = "G-U-C-I";
};
case "Officer": {
_type = "G-U-C-I";
};
case "Pilot": {
_type = "G-U-C-V";
};
case "Sniper": {
_type = "G-U-C-R-X";
};
case "SpecialForces": {
_type = "";
};
case "UAVPilot": {
_type = "G-U-C-V-U";
};
default {
_type = "G-U-C-I";
};
};
if (vehicle _unit) then {
if (!isNull vehicle player) then {
_vehicle_type = vehicle _unit call BIS_fnc_objectType;
switch (_vehicle_type) do {
case "Car": { _type = "G-U-C-I-M"; };
case "Helicopter": { _type = "A-M-H"; };
case "Motorcycle": { _type = "G-U-C-I-M"; };
case "Plane": { _type = "A-M-F"; };
case "StaticWeapon": { _type = "G-U-C-F-M"; };
case "Submarine": { _type = "U-S"; };
case "TrackedAPC": { _type = "G-U-C-I-I"; };
case "Tank": { _type = "G-U-C-A-T"; };
case "WheeledAPC": { _type = "a-f-G-U-C-R-V-A"; };
default { _type = "G-U-C-I-M"; };
case "Car": {
_type = "G-U-C-I-M";
};
case "Helicopter": {
_type = "A-M-H";
};
case "Motorcycle": {
_type = "G-U-C-I-M";
};
case "Plane": {
_type = "A-M-F";
};
case "StaticWeapon": {
_type = "G-U-C-F-M";
};
case "Submarine": {
_type = "U-S";
};
case "TrackedAPC": {
_type = "G-U-C-I-I";
};
case "Tank": {
_type = "G-U-C-A-T";
};
case "WheeledAPC": {
_type = "a-f-G-U-C-R-V-A";
};
default {};
};
};