mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3814 from acemod/cbaBinocularMagazineFnc
Use new binocular magazine CBA functions and deprecate ACE functions
This commit is contained in:
commit
94b5cea3cf
@ -15,18 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine");
|
||||
|
||||
private _binocular = binocular _unit;
|
||||
|
||||
scopeName "main";
|
||||
|
||||
{
|
||||
if ((_x select 0) isEqualTo _binocular) then {
|
||||
// note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut.
|
||||
(_x select 4 select 0) breakOut "main";
|
||||
};
|
||||
false
|
||||
} count weaponsitems _unit;
|
||||
|
||||
""
|
||||
_this call CBA_fnc_binocularMagazine
|
||||
|
@ -64,5 +64,5 @@ if (isNull _unit) exitWith {[
|
||||
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
|
||||
assignedItems _unit,
|
||||
binocular _unit,
|
||||
[_unit] call FUNC(binocularMagazine)
|
||||
[_unit] call CBA_fnc_binocularMagazine
|
||||
]
|
||||
|
@ -15,13 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine");
|
||||
|
||||
private _binocular = binocular _unit;
|
||||
private _selectBinocular = currentWeapon _unit == _binocular;
|
||||
|
||||
_unit addWeapon _binocular;
|
||||
|
||||
if (_selectBinocular) then {
|
||||
_unit selectWeapon _binocular;
|
||||
};
|
||||
_this call CBA_fnc_removeBinocularMagazine
|
||||
|
Loading…
Reference in New Issue
Block a user