Allow crafting with dull knife

Output is still reduced for dull knife when gutting animals.
This commit is contained in:
ebaydayz
2016-11-07 17:37:12 -05:00
parent fb734e30c7
commit 261dc4b373

View File

@@ -70,7 +70,6 @@ if(_abort) exitWith {
// diag_log format["Checking for fire: %1", _isFireNear]; // diag_log format["Checking for fire: %1", _isFireNear];
if (_canDo) then { if (_canDo) then {
_selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools"); _selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools");
_selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output"); _selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output");
_selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input"); _selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input");
@@ -92,19 +91,19 @@ if (_canDo) then {
_tradeComplete = 0; _tradeComplete = 0;
while {_craft_doLoop} do { while {_craft_doLoop} do {
_temp_removed_array = []; _temp_removed_array = [];
_missing = ""; _missing = "";
_missingTools = false; _missingTools = false;
{ {
_hastoolweapon = _x in weapons player; _hastoolweapon = _x in weapons player;
if (_x == "ItemKnife") then {
{if (_x in Dayz_Gutting) exitWith {_hastoolweapon = true};} forEach (items player);
};
if (!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; if (!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; };
} forEach _selectedRecipeTools; } forEach _selectedRecipeTools;
if (!_missingTools) then { if (!_missingTools) then {
// Dry run to see if all parts are available. // Dry run to see if all parts are available.
_proceed = true; _proceed = true;
if (count _selectedRecipeInput > 0) then { if (count _selectedRecipeInput > 0) then {
@@ -121,7 +120,6 @@ if (_canDo) then {
// If all parts proceed // If all parts proceed
if (_proceed) then { if (_proceed) then {
localize "str_epoch_player_62" call dayz_rollingMessages; localize "str_epoch_player_62" call dayz_rollingMessages;
["Working",0,[20,40,15,0]] call dayz_NutritionSystem; ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
@@ -154,7 +152,6 @@ if (_canDo) then {
r_doLoop = false; r_doLoop = false;
if (_finished) then { if (_finished) then {
_removed_total = 0; // count total of removed items _removed_total = 0; // count total of removed items
_tobe_removed_total = 0; // count total of all to be removed items _tobe_removed_total = 0; // count total of all to be removed items
_waterLevel_lowest = 0; // find the lowest _waterLevel _waterLevel_lowest = 0; // find the lowest _waterLevel