Commit b04b381c authored by rufix's avatar rufix

always try to add items to uniform first, then vest, then backpack

parent 3e25e496
......@@ -14,8 +14,8 @@ for "_i" from 0 to (_arrayCount - 1) do {
switch (true) do {
case !(_unit canAdd _currentItem): { GVAR(overflowItems) pushBack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
case (_unit canAddItemToVest _currentItem): { _unit addItemToVest _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
};
};
_i = _i + 1;
......@@ -26,8 +26,8 @@ for "_i" from 0 to (_arrayCount - 1) do {
switch (true) do {
case !(_unit canAdd _currentItem): { GVAR(overflowItems) pushBack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
case (_unit canAddItemToVest _currentItem): { _unit addItemToVest _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
};
};
};
......
......@@ -22,9 +22,9 @@ for "_i" from 0 to (_arrayCount - 1) do {
for "_j" from 1 to _itemCount do {
switch (true) do {
case !(_unit canAdd _currentItem): { GVAR(overflowItems) pushBack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
case (_unit canAddItemToVest _currentItem): { _unit addItemToVest _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
};
};
};
......@@ -37,9 +37,9 @@ for "_i" from 0 to (_arrayCount - 1) do {
} else {
switch (true) do {
case !(_unit canAdd _currentItem): { GVAR(overflowItems) pushBack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
case (_unit canAddItemToVest _currentItem): { _unit addItemToVest _currentItem };
case (_unit canAddItemToBackpack _currentItem): { _unit addItemToBackpack _currentItem };
case (_unit canAddItemToUniform _currentItem): { _unit addItemToUniform _currentItem };
};
};
};
......
......@@ -13,6 +13,6 @@ switch (true) do {
switch (true) do {
case !(_unit canAdd _radio): { GVAR(overflowItems) pushBack _radio };
case (_unit canAddItemToUniform _radio): { _unit addItemToUniform _radio };
case (_unit canAddItemToBackpack _radio): { _unit addItemToBackpack _radio };
case (_unit canAddItemToVest _radio): { _unit addItemToVest _radio };
case (_unit canAddItemToBackpack _radio): { _unit addItemToBackpack _radio };
};
......@@ -6,8 +6,8 @@ switch (true) do {
_unit linkItem "ItemRadioAcreFlagged";
switch (true) do {
case !(_unit canAdd _radio): { GVAR(overflowItems) pushBack _radio };
case (_unit canAddItemToVest _radio): { _unit addItemToVest _radio };
case (_unit canAddItemToUniform _radio): { _unit addItemToUniform _radio };
case (_unit canAddItemToVest _radio): { _unit addItemToVest _radio };
case (_unit canAddItemToBackpack _radio): { _unit addItemToBackpack _radio };
};
};
......
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