mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
refactored extract_role function to use BIS objectType function as param
This commit is contained in:
@@ -8,19 +8,41 @@ switch (side _unit) do {
|
|||||||
case "EAST": { _affiliation = "h"; };
|
case "EAST": { _affiliation = "h"; };
|
||||||
case "INDEPENDENT": { _affiliation = "n"; };
|
case "INDEPENDENT": { _affiliation = "n"; };
|
||||||
case "CIVILIAN": { _affiliation = "u"; };
|
case "CIVILIAN": { _affiliation = "u"; };
|
||||||
default { };
|
default { _affiliation = "f"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
if (vehicle _unit isKindOf "plane") then {
|
_unit_type = _unit call BIS_fnc_objectType;
|
||||||
_type = "A-M-F";
|
|
||||||
|
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"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
if (vehicle _unit isKindOf "Helicopter") then {
|
if (vehicle _unit) then {
|
||||||
_type = "A-M-H";
|
_vehicle_type = vehicle _unit call BIS_fnc_objectType;
|
||||||
};
|
|
||||||
|
|
||||||
if (vehicle _unit isKindOf "tank") then {
|
switch (_vehicle_type) do {
|
||||||
_type = "G-U-C-A-T";
|
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"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_role = "a-" + _affiliation + "-" + _type;
|
_role = "a-" + _affiliation + "-" + _type;
|
||||||
|
|||||||
Reference in New Issue
Block a user