mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
clean up
This commit is contained in:
parent
7ef02400dc
commit
1302ccb3fe
@ -21,13 +21,8 @@ private ["_weapon", "_items", "_gunbag", "_state"];
|
||||
_gunbag = backpackContainer _target;
|
||||
_state = _gunbag getVariable [QGVAR(GunbagWeapon),[]];
|
||||
|
||||
/*
|
||||
* example returnvalue _state
|
||||
* ["","","optic_Aco","",["arifle_MX_GL_ACO_F","GL_3GL_F"],["30Rnd_65x39_caseless_mag","1Rnd_HE_Grenade_shell"],[30,1]]
|
||||
*/
|
||||
|
||||
if (count _state <= 0) exitWith {
|
||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
_weapon = (_state select 0) select 0;
|
||||
@ -37,12 +32,14 @@ _unit addWeapon _weapon;
|
||||
removeAllPrimaryWeaponItems _unit;
|
||||
|
||||
{
|
||||
_unit addWeaponItem [_weapon, _x];
|
||||
_unit addWeaponItem [_weapon, _x];
|
||||
} forEach _items;
|
||||
|
||||
// remove virtual load
|
||||
[_target, backpackContainer _target, -([_weapon, _items] call FUNC(calculateMass))] call EFUNC(movement,addLoadToUnitContainer);
|
||||
_gunbag setVariable [QGVAR(GunbagWeapon), [], true];
|
||||
|
||||
// play sound
|
||||
if(["ACE_Backpacks"] call EFUNC(common,isModLoaded)) then {
|
||||
[_unit, _target, backpackContainer _target] call EFUNC(backpacks,backpackOpened);
|
||||
[_unit, _target, backpackContainer _target] call EFUNC(backpacks,backpackOpened);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user