mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
revert counts here should fix #1318
This likely was causing issues with crafting also and (performance gain is unknown)
This commit is contained in:
@@ -95,7 +95,7 @@ if (_canDo) then {
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; };
|
||||
} count _selectedRecipeTools;
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
@@ -173,7 +173,7 @@ if (_canDo) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
} count magazines player;
|
||||
} forEach magazines player;
|
||||
|
||||
{
|
||||
_configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x));
|
||||
@@ -205,7 +205,7 @@ if (_canDo) then {
|
||||
_num_removed_weapons = 0;
|
||||
{
|
||||
_num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove);
|
||||
} count _inputWeapons;
|
||||
} forEach _inputWeapons;
|
||||
if (_num_removed_weapons == (count _inputWeapons)) then {
|
||||
if(_randomOutput == 1) then {
|
||||
_outputWeapons = [];
|
||||
@@ -223,7 +223,7 @@ if (_canDo) then {
|
||||
};
|
||||
{
|
||||
player addWeapon _x;
|
||||
} count _outputWeapons;
|
||||
} forEach _outputWeapons;
|
||||
{
|
||||
|
||||
_itemOut = _x select 0;
|
||||
@@ -250,14 +250,14 @@ if (_canDo) then {
|
||||
// sleep here
|
||||
sleep 1;
|
||||
|
||||
} count _selectedRecipeOutput;
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
_tradeComplete = _tradeComplete+1;
|
||||
};
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} count _temp_removed_array;
|
||||
{player addMagazine _x; } forEach _temp_removed_array;
|
||||
|
||||
cutText [format[(localize "str_epoch_player_151"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user