Commit 6340e47e authored by rufix's avatar rufix

Add support for infinite attachments

parent 4404e87d
......@@ -5,7 +5,7 @@ if ((_array select 0) isEqualType []) then {
_array = selectRandom _array;
};
_array params ["_gun", ["_attachment0", ""], ["_attachment1", ""], ["_attachment2", ""], ["_attachment3", ""]];
_array params ["_gun"];
if (_gun != secondaryWeapon _unit) then {
_unit removeWeapon (secondaryWeapon _unit);
......@@ -14,4 +14,4 @@ if (_gun != secondaryWeapon _unit) then {
{ _unit removeSecondaryWeaponItem _x; false } count (secondaryWeaponItems _unit);
{ _unit removeSecondaryWeaponItem _x; false } count (secondaryWeaponMagazine _unit);
{ _unit addSecondaryWeaponItem _x; false } count [_attachment0, _attachment1, _attachment2, _attachment3];
{ _unit addSecondaryWeaponItem _x; false } count (_array select [1, 100]);
......@@ -5,7 +5,7 @@ if ((_array select 0) isEqualType []) then {
_array = selectRandom _array;
};
_array params ["_gun", ["_attachment0", ""], ["_attachment1", ""], ["_attachment2", ""], ["_attachment3", ""]];
_array params ["_gun"];
if (_gun != primaryWeapon _unit) then {
_unit removeWeapon (primaryWeapon _unit);
......@@ -14,4 +14,4 @@ if (_gun != primaryWeapon _unit) then {
removeAllPrimaryWeaponItems _unit;
{ _unit removePrimaryWeaponItem _x; false } count (primaryWeaponMagazine _unit);
{ _unit addPrimaryWeaponItem _x; false } count [_attachment0, _attachment1, _attachment2, _attachment3];
{ _unit addPrimaryWeaponItem _x; false } count (_array select [1, 100]);
......@@ -5,7 +5,7 @@ if ((_array select 0) isEqualType []) then {
_array = selectRandom _array;
};
_array params ["_gun", ["_attachment0", ""], ["_attachment1", ""], ["_attachment2", ""], ["_attachment3", ""]];
_array params ["_gun"];
if (_gun != handgunWeapon _unit) then {
_unit removeWeapon (handgunWeapon _unit);
......@@ -14,4 +14,4 @@ if (_gun != handgunWeapon _unit) then {
removeAllHandgunItems _unit;
{ _unit removeHandgunItem _x; false } count (handgunMagazine _unit);
{ _unit addHandgunItem _x; false } count [_attachment0, _attachment1, _attachment2, _attachment3];
{ _unit addHandgunItem _x; false } count (_array select [1, 100]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment