diff --git a/SQF/dayz_code/actions/cook.sqf b/SQF/dayz_code/actions/cook.sqf index 8f128424f..b7d95eaf1 100644 --- a/SQF/dayz_code/actions/cook.sqf +++ b/SQF/dayz_code/actions/cook.sqf @@ -74,7 +74,7 @@ _cookedmeat = meatcooked; cutText [format[(localize "str_epoch_player_130"),_textraw], "PLAIN DOWN"]; }; }; -} count _rawmeat; +} forEach _rawmeat; s_player_cook = -1; DZE_ActionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/maintain_area.sqf b/SQF/dayz_code/actions/maintain_area.sqf index 4ab4d0976..c7125f783 100644 --- a/SQF/dayz_code/actions/maintain_area.sqf +++ b/SQF/dayz_code/actions/maintain_area.sqf @@ -91,8 +91,8 @@ switch _option do { _temp_removed_array set [count _temp_removed_array,_x]; }; }; - } count magazines player; - } count _requirements; + } forEach magazines player; + } forEach _requirements; // all required items removed from player gear if (_tobe_removed_total == _removed_total) then { diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index dbf0cd740..c8d0f388b 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -80,7 +80,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> }; }; }; -} count _needNear; +} forEach _needNear; if(_abort) exitWith { diff --git a/SQF/dayz_code/actions/player_buildingMaint.sqf b/SQF/dayz_code/actions/player_buildingMaint.sqf index 6478335da..382b13b40 100644 --- a/SQF/dayz_code/actions/player_buildingMaint.sqf +++ b/SQF/dayz_code/actions/player_buildingMaint.sqf @@ -45,7 +45,7 @@ _proceed = true; _countIn = _x select 1; _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; -} count _requirements; +} forEach _requirements; if (_proceed) then { [1,1] call dayz_HungerThirst; @@ -73,9 +73,9 @@ if (_proceed) then { }; }; - } count magazines player; + } forEach magazines player; - } count _requirements; + } forEach _requirements; // all parts removed proceed if (_tobe_removed_total == _removed_total) then { diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 539937537..3b2957990 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -111,7 +111,7 @@ if (_canDo) then { if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } count _selectedRecipeInput; + } forEach _selectedRecipeInput; }; // If all parts proceed @@ -194,9 +194,9 @@ if (_canDo) then { _temp_removed_array set [count _temp_removed_array,_x]; }; }; - } count magazines player; + } forEach magazines player; - } count _selectedRecipeInput; + } forEach _selectedRecipeInput; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 04d4bf120..ac901589c 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -95,7 +95,7 @@ if ((count _upgrade) > 0) then { _countIn = _x select 1; _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } count _requirements; + } forEach _requirements; if (_proceed) then { [1,1] call dayz_HungerThirst; @@ -123,9 +123,9 @@ if ((count _upgrade) > 0) then { }; }; - } count magazines player; + } forEach magazines player; - } count _requirements; + } forEach _requirements; // all parts removed proceed if (_tobe_removed_total == _removed_total) then { diff --git a/SQF/dayz_code/compile/fn_removeItems.sqf b/SQF/dayz_code/compile/fn_removeItems.sqf index c75e2b546..f352d7567 100644 --- a/SQF/dayz_code/compile/fn_removeItems.sqf +++ b/SQF/dayz_code/compile/fn_removeItems.sqf @@ -43,9 +43,9 @@ _tobe_removed_total = 0; _temp_removed_array set [count _temp_removed_array, _x]; }; }; - } count _inventory; + } forEach _inventory; }; -} count _items; +} forEach _items; // all parts removed if (_tobe_removed_total == _removed_total) exitWith { true }; // missing parts diff --git a/SQF/dayz_code/compile/player_projectileNear.sqf b/SQF/dayz_code/compile/player_projectileNear.sqf index 3500ded56..01a9b0c08 100644 --- a/SQF/dayz_code/compile/player_projectileNear.sqf +++ b/SQF/dayz_code/compile/player_projectileNear.sqf @@ -45,7 +45,7 @@ while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do { _x setVariable["startcombattimer", 1]; diag_log("Now in Combat (Crew): " + name _x); }; - } count (crew _nearVehicle); + } forEach (crew _nearVehicle); }; -} count _listNear; +} forEach _listNear; diff --git a/SQF/dayz_code/compile/player_upgradeVehicle.sqf b/SQF/dayz_code/compile/player_upgradeVehicle.sqf index f54562cad..f4583fec9 100644 --- a/SQF/dayz_code/compile/player_upgradeVehicle.sqf +++ b/SQF/dayz_code/compile/player_upgradeVehicle.sqf @@ -50,13 +50,13 @@ if (_IsNearVehicle >= 1) then { _countIn = _x select 1; _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } count _requirementsMagazine; + } forEach _requirementsMagazine; { _itemIn = _x select 0; _countIn = _x select 1; _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgWeapons" >> _x)) == _itemIn) } count weapons player; if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } count _requirementsWeapon; + } forEach _requirementsWeapon; if (_proceed) then { @@ -84,8 +84,8 @@ if (_IsNearVehicle >= 1) then { _temp_removed_array_mag set [count _temp_removed_array_mag,_x]; }; }; - } count magazines player; - } count _requirementsMagazine; + } forEach magazines player; + } forEach _requirementsMagazine; { _removed = 0; @@ -103,8 +103,8 @@ if (_IsNearVehicle >= 1) then { _temp_removed_array_wep set [count _temp_removed_array_wep,_x]; }; }; - } count weapons player; - } count _requirementsWeapon; + } forEach weapons player; + } forEach _requirementsWeapon; // all parts removed proceed if (_tobe_removed_total == _removed_total) then { diff --git a/SQF/dayz_code/compile/player_weaponCheck.sqf b/SQF/dayz_code/compile/player_weaponCheck.sqf index b24654204..38d7a83eb 100644 --- a/SQF/dayz_code/compile/player_weaponCheck.sqf +++ b/SQF/dayz_code/compile/player_weaponCheck.sqf @@ -17,7 +17,7 @@ _newObjects = []; }; _newObjects set [count _newObjects,_type]; }; -} count _currentObjects; +} forEach _currentObjects; //Compare current loadout with old loadout _newObjects = []; @@ -31,6 +31,6 @@ _newObjects = []; }; _newObjects set [count _newObjects,_type]; }; -} count _checkObjects; +} forEach _checkObjects; _change; \ No newline at end of file