Fix duplicate action fix when crafting

This commit is contained in:
icomrade
2016-07-30 10:37:19 -04:00
parent 657830291b
commit 60c37e8b76

View File

@@ -25,7 +25,7 @@ class ItemActions
*/ */
private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"]; private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"];
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;}; if (DZE_ActionInProgress || (r_action_count > 0)) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;};
DZE_ActionInProgress = true; DZE_ActionInProgress = true;
// This is used to find correct recipe based what itemaction was click allows multiple recipes per item. // This is used to find correct recipe based what itemaction was click allows multiple recipes per item.
@@ -65,6 +65,7 @@ if("workshop" in _needNear) then {
if(_abort) exitWith { if(_abort) exitWith {
format[localize "str_epoch_player_149",_reason,_distance] call dayz_rollingMessages; format[localize "str_epoch_player_149",_reason,_distance] call dayz_rollingMessages;
DZE_ActionInProgress = false; DZE_ActionInProgress = false;
r_action_count = 0;
}; };
// diag_log format["Checking for fire: %1", _isFireNear]; // diag_log format["Checking for fire: %1", _isFireNear];
@@ -284,3 +285,4 @@ if (_canDo) then {
localize "str_epoch_player_64" call dayz_rollingMessages; localize "str_epoch_player_64" call dayz_rollingMessages;
}; };
DZE_ActionInProgress = false; DZE_ActionInProgress = false;
r_action_count = 0;