Skip to content

Commit

Permalink
Fixed 2 Issues, with Medicla macro & binos
Browse files Browse the repository at this point in the history
  • Loading branch information
AdlerSalbei committed Jun 27, 2022
1 parent ea52f60 commit 39f96ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
11 changes: 4 additions & 7 deletions addons/getLoadoutsFromUnits/functions/fnc_createBaseClass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ _baseLoadout set [9, [_map, _gps, _radio, _compass, _watch, _nvgoggles]];
["_backpackClass", []],
["_headgearClass", ""],
["_googlesClass", ""],
["_binocluarClass", []],
["_binocularClass", []],
["_itemsClass", []]
];

Expand Down Expand Up @@ -330,10 +330,8 @@ _baseLoadout set [9, [_map, _gps, _radio, _compass, _watch, _nvgoggles]];
};
};

if (_binocularClass isNotEqualTo []) then {
if (_binocularClass select 0 isEqualTo _binocular) then {
_binocularClass set [0, nil];
};
if (_binocularClass isNotEqualTo [] && {(_binocularClass select 0) isEqualTo _binoculars}) then {
_binocularClass = [];
};

if (_itemsClass isNotEqualTo []) then {
Expand All @@ -357,8 +355,7 @@ _baseLoadout set [9, [_map, _gps, _radio, _compass, _watch, _nvgoggles]];
};
};


[_loadoutHash, _x, [_primaryWeaponClass, _secondaryWeaponClass, _handgunWeaponClass, _uniformClass, _vestClass, _backpackClass, _headgearClass, _googlesClass, _binocluarClass, _itemsClass]] call CBA_fnc_hashSet;
[_loadoutHash, _x, [_primaryWeaponClass, _secondaryWeaponClass, _handgunWeaponClass, _uniformClass, _vestClass, _backpackClass, _headgearClass, _googlesClass, _binocularClass, _itemsClass]] call CBA_fnc_hashSet;
};
}forEach _types;

Expand Down
18 changes: 15 additions & 3 deletions addons/getLoadoutsFromUnits/functions/fnc_getLoadoutAndFormat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,25 @@ if (!(_loadout select 5 isEqualTo []) && {!(_loadout select 5 select 1 isEqualTo
_x params ["_medicalTyp", "_index"];

if (_medicalTyp isEqualTo _type) exitWith {
_return pushBack "";
_return pushBack (_tripleTab + (["GRAD_FACTIONS_MEDICITEMS_CFR", "GRAD_FACTIONS_MEDICITEMS_SQ", "GRAD_FACTIONS_MEDICITEMS_PT"] select _index));
_return append [
"",
_tripleTab + "class Rank {",
_tripleTab + _tab + "class PRIVATE {",
_tripleTab + _tab + _tab + (["GRAD_FACTIONS_MEDICITEMS_CFR", "GRAD_FACTIONS_MEDICITEMS_SQ", "GRAD_FACTIONS_MEDICITEMS_PT"] select _index),
_tripleTab + _tab + "};",
_tripleTab + _tab + "class CORPORAL: PRIVATE {}",
_tripleTab + _tab + "class SERGEANT: PRIVATE {}",
_tripleTab + _tab + "class LIEUTENANT: PRIVATE {}",
_tripleTab + _tab + "class CAPTAIN: PRIVATE {}",
_tripleTab + _tab + "class MAJOR: PRIVATE {}",
_tripleTab + _tab + "class COLONEL: PRIVATE {}",
_tripleTab + "}",
""
];
};
}forEach _typesMedical;

_return pushBack (_tab + _tab + "};");

_return = _return select {!isNil "_x" };

_return

0 comments on commit 39f96ef

Please sign in to comment.