diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 1ce5d62407..091c817f1e 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -23,7 +23,7 @@ _vehicle = [_player] call FUNC(findNearestVehicle); if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x}; - } foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); + } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); }; if (isNull _vehicle) exitWith {false}; diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index be2e9edc3f..23c5631fa6 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -73,11 +73,11 @@ _refresh = { _ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000]; _position = switch (_setting) do { - case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; - case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]}; - case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; - case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]}; - default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]}; + case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]}; + default {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; }; _ctrl ctrlSetPosition _position; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 255a014b6f..39c23ce53b 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -23,9 +23,9 @@ if (typeName _text != "TEXT") then { if (count _text > 0) then { { if (typeName _x == "STRING" && {isLocalized _x}) then { - _text set [_foreachIndex, localize _x]; + _text set [_forEachIndex, localize _x]; }; - }foreach _text; + }forEach _text; _text = format _text; }; }; diff --git a/addons/common/functions/fnc_errorMessage.sqf b/addons/common/functions/fnc_errorMessage.sqf index f06aa2d30d..5159b2eff0 100644 --- a/addons/common/functions/fnc_errorMessage.sqf +++ b/addons/common/functions/fnc_errorMessage.sqf @@ -92,7 +92,7 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b _xPos set [1, _bottomPosY]; _x ctrlSetPosition _xPos; _x ctrlCommit 0; -} foreach [ +} forEach [ _ctrlBackgroundButtonOK, _ctrlBackgroundButtonMiddle, _ctrlBackgroundButtonCancel, diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index d1fdb30b29..8d58525a9d 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -60,4 +60,4 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); // Update the variable globaly and Force [_settingName, _settingValue, true, true] call FUNC(setSetting); }; -} foreach _paramsArray; +} forEach _paramsArray; diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index 799e776926..9bbec92d40 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -25,7 +25,7 @@ _elements = []; { _theElement = toArray (_x select _elementN); - _indexes pushBack _foreachIndex; + _indexes pushBack _forEachIndex; _elements pushBack _theElement; } forEach _array; diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 41050eb9b9..5d04e3dc5d 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -57,7 +57,7 @@ if (_mode == 0) then { if (count _no > 0) exitWith { _found = true; //diag_log "found"; }; - } foreach _wireCheckPosAr; + } forEach _wireCheckPosAr; // Double coil found! if (_found) then { _mode = 1; diff --git a/addons/explosives/functions/fnc_addToSpeedDial.sqf b/addons/explosives/functions/fnc_addToSpeedDial.sqf index bf409d5462..40cd813b5f 100644 --- a/addons/explosives/functions/fnc_addToSpeedDial.sqf +++ b/addons/explosives/functions/fnc_addToSpeedDial.sqf @@ -29,7 +29,7 @@ if ((_code) == "") exitWith { }; { if ((_x select 0) == _name) exitWith { - _speedDial set [_foreachindex, _this]; + _speedDial set [_forEachindex, _this]; _found = true; }; } forEach _speedDial; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 8b8ae963d9..a3d6333395 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -116,7 +116,7 @@ _angle = _centerAngle - _angleSpan / 2; private ["_offset","_newPos"]; _newPos = if (GVAR(UseListMenu)) then { [(_sPos select 0) + _scaleX, - (_sPos select 1) + _scaleY * (_foreachindex - _numChildren/2 + 0.5)]; + (_sPos select 1) + _scaleY * (_forEachindex - _numChildren/2 + 0.5)]; } else { [(_sPos select 0) - _scaleX * (cos _angle), (_sPos select 1) + _scaleY * (sin _angle)]; diff --git a/addons/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf index e63b18bcfc..dd62bd51a5 100644 --- a/addons/kestrel4500/functions/fnc_updateDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_updateDisplay.sqf @@ -23,7 +23,7 @@ private ["_outputData"]; _outputData = [] call FUNC(generateOutputData); { - ctrlSetText [_x , _outputData select _foreachindex]; + ctrlSetText [_x , _outputData select _forEachindex]; } forEach [74100, 74200, 74201, 74300, 74301, 74302, 74303, 74304, 74305, 74400, 74401, 74500, 74600, 74601, 74602, 74603, 74604, 74605]; if (GVAR(referenceHeadingMenu) == 1) then { diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index a7444003ec..d62f3ccba3 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -34,10 +34,10 @@ if (count _log >= 8) then { _newLog = []; { // ensure the first element will not be added - if (_foreachIndex > 0) then { + if (_forEachIndex > 0) then { _newLog pushBack _x; }; - } foreach _log; + } forEach _log; _log = _newLog; }; _log pushBack [_message, _moment, _type, _arguments]; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 0576500341..8a08bdd98a 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -27,15 +27,15 @@ _amount = 1; { if ((_x select 0) == _newItem) exitWith { private "_info"; - _info = _log select _foreachIndex; + _info = _log select _forEachIndex; _info set [1,(_info select 1) + 1]; _info set [2, ACE_gameTime]; - _log set [_foreachIndex, _info]; + _log set [_forEachIndex, _info]; _amount = (_info select 1); _inList = true; }; -} foreach _log; +} forEach _log; if (!_inList) then { _log pushBack [_newItem, 1, ACE_gameTime]; diff --git a/addons/medical/functions/fnc_addUnconsciousCondition.sqf b/addons/medical/functions/fnc_addUnconsciousCondition.sqf index 3ded97f355..fac63a1829 100644 --- a/addons/medical/functions/fnc_addUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_addUnconsciousCondition.sqf @@ -20,5 +20,5 @@ if (typeName _this == typeName []) then { if (typeName _x == typeName {}) then { GVAR(unconsciousConditions) pushBack _x; }; - } foreach _this; + } forEach _this; }; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 93a114599c..7870683aa1 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -96,6 +96,6 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI }; }; }; -} foreach _locations; +} forEach _locations; _return; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 4e68edd124..a001f36402 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -83,8 +83,8 @@ _createdLitter = []; if (typeName _x == "STRING") then { [_target, _x] call _createLitter; }; - } foreach _litterOptions; + } forEach _litterOptions; }; }; }; -} foreach _litter; +} forEach _litter; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 77f5c690cb..760cddb0db 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -80,7 +80,7 @@ if (_show) then { if !(isNil "_value") then { _totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); }; - } foreach GVAR(IVBags); + } forEach GVAR(IVBags); if (_totalIvVolume >= 1) then { _genericMessages pushBack [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; }; @@ -108,7 +108,7 @@ if (_show) then { }; }; }; - } foreach _openWounds; + } forEach _openWounds; _bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []]; { @@ -129,7 +129,7 @@ if (_show) then { }; }; }; - } foreach _bandagedwounds; + } forEach _bandagedwounds; } else { _damaged = [true, true, true, true, true, true]; { @@ -175,23 +175,23 @@ if (_show) then { //_blue = _green; }; }; - (_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0]; - } foreach _selectionBloodLoss; + (_display displayCtrl (_availableSelections select _forEachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0]; + } forEach _selectionBloodLoss; _lbCtrl = (_display displayCtrl 200); lbClear _lbCtrl; { _x params ["_add", "_color"]; _lbCtrl lbAdd _add; - _lbCtrl lbSetColor [_foreachIndex, _color]; - } foreach _genericMessages; + _lbCtrl lbSetColor [_forEachIndex, _color]; + } forEach _genericMessages; _amountOfGeneric = count _genericMessages; { _x params ["_add", "_color"]; _lbCtrl lbAdd _add; - _lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _color]; - } foreach _allInjuryTexts; + _lbCtrl lbSetColor [_forEachIndex + _amountOfGeneric, _color]; + } forEach _allInjuryTexts; if (count _allInjuryTexts == 0) then { _lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart)); }; @@ -210,12 +210,12 @@ if (_show) then { { if (typeName _x == "STRING" && {isLocalized _x}) then { - _arguments set [_foreachIndex, localize _x]; + _arguments set [_forEachIndex, localize _x]; }; - } foreach _arguments; + } forEach _arguments; _message = format([_message] + _arguments); _logCtrl lbAdd format["%1 %2", _moment, _message]; - } foreach _logs; + } forEach _logs; _triageStatus = [_target] call FUNC(getTriageStatus); (_display displayCtrl 303) ctrlSetText (_triageStatus select 0); diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index b691b3db4b..76ad990d00 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -55,14 +55,14 @@ if (_show) then { }; }; _triageCardTexts pushBack format["%1x - %2", _amount, _message]; - } foreach _log; + } forEach _log; if (count _triageCardTexts == 0) then { _lbCtrl lbAdd (localize LSTRING(TriageCard_NoEntry)); }; { _lbCtrl lbAdd _x; - } foreach _triageCardTexts; + } forEach _triageCardTexts; _triageStatus = [_target] call FUNC(getTriageStatus); diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index a3fdbd5b94..110f85ee82 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -33,12 +33,12 @@ if (GVAR(level) >= 2) then { // (((BLOODLOSS_SMALL_WOUNDS * (_x select 0))) + ((BLOODLOSS_MEDIUM_WOUNDS * (_x select 1))) + ((BLOODLOSS_LARGE_WOUNDS * (_x select 2))) * (_cardiacOutput / DEFAULT_CARDIAC_OUTPUT)); }; - } foreach _openWounds; + } forEach _openWounds; _internalWounds = _unit getvariable [QGVAR(internalWounds), []]; { _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); - } foreach _internalWounds; + } forEach _internalWounds; // cap the blood loss to be no greater as the current cardiac output //(_totalBloodLoss min _cardiacOutput); diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index 3524e15cb5..3d71ea0c44 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -41,13 +41,13 @@ if (_bloodVolume < 100.0) then { _ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND; _unit setvariable [_x,_ivVolume]; }; - } foreach GVAR(IVBags); + } forEach GVAR(IVBags); } else { { if ((_unit getvariable [_x, 0]) > 0) then { _unit setvariable [_x, 0]; // lets get rid of exessive IV volume }; - } foreach GVAR(IVBags); + } forEach GVAR(IVBags); }; _bloodVolumeChange; diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf index d46733452a..cf9f7a417a 100644 --- a/addons/medical/functions/fnc_getHeartRateChange.sqf +++ b/addons/medical/functions/fnc_getHeartRateChange.sqf @@ -35,18 +35,18 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { if ( (_time - 1) <= 0) then { _time = 0; - _adjustment set [_foreachIndex, ObjNull]; + _adjustment set [_forEachIndex, ObjNull]; [_unit] call _callBack; } else { _time = _time - 1; - _adjustment set [_foreachIndex, [_values - _change, _time]]; + _adjustment set [_forEachIndex, [_values - _change, _time]]; }; } else { - _adjustment set [_foreachIndex, ObjNull]; + _adjustment set [_forEachIndex, ObjNull]; [_unit] call _callBack; }; - } foreach _adjustment; + } forEach _adjustment; _adjustment = _adjustment - [ObjNull]; _unit setvariable [QGVAR(heartRateAdjustments), _adjustment]; diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index 19d1c85020..68ea98f80a 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -25,6 +25,6 @@ _return = false; if (typeName _x == typeName {} && {([_unit] call _x)}) exitWith { _return = true; }; -} foreach GVAR(unconsciousConditions); +} forEach GVAR(unconsciousConditions); _return diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index a16d1fdd44..557c52cedd 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -60,11 +60,11 @@ _bandagedInjury = []; _exist = true; _existingInjury = _x; _existingInjury set [3, (_existingInjury select 3) + _impact]; - _bandagedWounds set [_foreachIndex, _existingInjury]; + _bandagedWounds set [_forEachIndex, _existingInjury]; _bandagedInjury = _existingInjury; }; -} foreach _bandagedWounds; +} forEach _bandagedWounds; if !(_exist) then { // [ID, classID, bodypart, percentage treated, bloodloss rate] @@ -97,9 +97,9 @@ if (random(1) <= _reopeningChance) then { _exist = true; _existingInjury = _x; _existingInjury set [3, ((_existingInjury select 3) - _impact) max 0]; - _bandagedWounds set [_foreachIndex, _existingInjury]; + _bandagedWounds set [_forEachIndex, _existingInjury]; }; - } foreach _bandagedWounds; + } forEach _bandagedWounds; if (_exist) then { _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 54de72db01..9db65db732 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -52,7 +52,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { { deleteVehicle _x; } forEach _objects; - GVAR(allCreatedLitter) set[_foreachIndex, objNull]; + GVAR(allCreatedLitter) set[_forEachIndex, objNull]; }; } forEach GVAR(allCreatedLitter); GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index a54de43696..d159f7a52b 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -29,7 +29,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c if (_part < 0) exitWith {}; private ["_newDamage", "_pain"]; - _newDamage = (_cache_damages select _foreachIndex); + _newDamage = (_cache_damages select _forEachIndex); _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts]; @@ -43,7 +43,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); _unit setVariable [QGVAR(pain), _pain min 1, true]; }; -}foreach _cache_params; +}forEach _cache_params; // We broadcast the value across the net here, in order to avoid broadcasting it multiple times earlier in the above code block _target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; @@ -56,5 +56,5 @@ _target setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95] _target setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; { - _target setHitPointDamage [_x, (_damageBodyParts select _foreachIndex) min 0.95]; -}foreach GVAR(HITPOINTS); + _target setHitPointDamage [_x, (_damageBodyParts select _forEachIndex) min 0.95]; +}forEach GVAR(HITPOINTS); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index b3f82e7397..d6e72845da 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -85,9 +85,9 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t _cache_params = _unit getVariable [QGVAR(cachedHandleDamageParams), []]; _cache_damages = _unit getVariable QGVAR(cachedDamages); { - _params = _x + [_cache_damages select _foreachIndex]; + _params = _x + [_cache_damages select _forEachIndex]; _params call FUNC(handleDamage_advanced); - } foreach _cache_params; + } forEach _cache_params; [_unit] call FUNC(handleDamage_advancedSetDamage); }; [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index e95cc7f0e1..311314221e 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -38,9 +38,9 @@ _foundIndex = -1; { // Check if we have an id of the given class on the given bodypart already if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { - _foundIndex = _foreachIndex; + _foundIndex = _forEachIndex; }; - } foreach _openWounds; + } forEach _openWounds; if (_foundIndex < 0) then { // Since it is a new injury, we will have to add it to the open wounds array to store it @@ -50,7 +50,7 @@ _foundIndex = -1; _injury = _openWounds select _foundIndex; _injury set [3, (_injury select 3) + 1]; }; -} foreach _woundsCreated; +} forEach _woundsCreated; _unit setvariable [QGVAR(openWounds), _openWounds, true]; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index ab2afc13d4..d791fc424e 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -59,7 +59,7 @@ _allPossibleInjuries = []; // Find the wound which has the highest minimal damage, so we can use this later on for adding the correct injuries if (_minDamage > _highestPossibleDamage) then { - _highestPossibleSpot = _foreachIndex; + _highestPossibleSpot = _forEachIndex; _highestPossibleDamage = _minDamage; }; @@ -67,7 +67,7 @@ _allPossibleInjuries = []; _allPossibleInjuries pushBack _x; }; }; -} foreach _allInjuriesForDamageType; +} forEach _allInjuriesForDamageType; // No possible wounds available for this damage type or damage amount. if (_highestPossibleSpot < 0) exitWith {}; @@ -93,9 +93,9 @@ _woundsCreated = []; { // Check if we have an id of the given class on the given bodypart already if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { - _foundIndex = _foreachIndex; + _foundIndex = _forEachIndex; }; - } foreach _openWounds; + } forEach _openWounds; }; _injury = []; @@ -120,7 +120,7 @@ _woundsCreated = []; _painToAdd = _painToAdd + (_toAddInjury select 3); }; }; -} foreach (_injuryTypeInfo select 0); // foreach damage thresholds +} forEach (_injuryTypeInfo select 0); // forEach damage thresholds _unit setvariable [QGVAR(openWounds), _openWounds, true]; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index 8d52355b7c..a0c4c365e1 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -187,6 +187,6 @@ if (GVAR(level) >= 2) then { if !(isNil "_value") then { _unit setvariable [_x,(_unit getvariable [_x, 0]), true]; }; - } foreach GVAR(IVBags); + } forEach GVAR(IVBags); }; }; diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index bc154fa792..3eb2f1e5f0 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -36,7 +36,7 @@ if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)} if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith { _return = true; }; - } foreach _crew; + } forEach _crew; }; _return diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf index f033b0b6c0..c0c1c5f68e 100644 --- a/addons/medical/functions/fnc_hasItems.sqf +++ b/addons/medical/functions/fnc_hasItems.sqf @@ -27,6 +27,6 @@ _return = true; if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith { _return = false; }; -}foreach _items; +}forEach _items; _return diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index bd97203f33..d276676669 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -71,13 +71,13 @@ private ["_allUsedMedication", "_logs"]; _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []]; { _unit setvariable [_x select 0, nil]; -} foreach _allUsedMedication; +} forEach _allUsedMedication; _unit setVariable [QGVAR(allUsedMedication), [], true]; _logs = _unit getvariable [QGVAR(allLogs), []]; { _unit setvariable [_x, nil]; -} foreach _logs; +} forEach _logs; _unit setvariable [QGVAR(allLogs), [], true]; // items diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index 9c4b15eb2d..330a1e5ea3 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -42,13 +42,13 @@ _objects = (lineIntersectsWith [_unit modelToWorldVisual [0, 0, (_eyePos select if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; -} foreach _objects; +} forEach _objects; if (!_isInBuilding) then { _objects = position _unit nearObjects 7.5; { if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; - } foreach _objects; + } forEach _objects; }; _isInBuilding; diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 1fcfc08e0f..5810c22d88 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -25,6 +25,6 @@ _openWounds = _unit getvariable [QGVAR(openWounds), []]; { // total bleeding ratio * percentage of injury left _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); -} foreach _openWounds; +} forEach _openWounds; (_totalBloodLoss == 0); diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index e324a75859..3c6c535e1d 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -38,4 +38,4 @@ _openWounds = _target getvariable [QGVAR(openWounds), []]; if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; }; -} foreach _openWounds; +} forEach _openWounds; diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf index 7a219f2559..970cc19ca7 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -24,7 +24,7 @@ if (!isNull _logic) then { if (local _x) then { _x setvariable[QGVAR(isMedicalFacility), true, true]; }; - } foreach _objects; + } forEach _objects; }; true; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 22186ef0d9..f16caad75c 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -29,12 +29,12 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; if !(_className in _allMedsFromClassname) then { _allMedsFromClassname pushBack _className; _x set [1, _allMedsFromClassname]; - _allUsedMedication set [_foreachIndex, _x]; + _allUsedMedication set [_forEachIndex, _x]; _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; }; _foundEntry = true; }; -} foreach _allUsedMedication; +} forEach _allUsedMedication; if (!_foundEntry) then { _allUsedMedication pushBack [_variable, [_className]]; @@ -55,8 +55,8 @@ _hasOverDosed = 0; if ({_x == _med} count _classNamesUsed > _limit) then { _hasOverDosed = _hasOverDosed + 1; }; - } foreach _allUsedMedication; -} foreach _incompatabileMeds; + } forEach _allUsedMedication; +} forEach _incompatabileMeds; if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then { _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication"); diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index d88813e300..deb333fdd3 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -25,9 +25,9 @@ if (!local _unit) then { { if (_x select 0 == _injuryID) exitWith { _exists = true; - _openWounds set [_foreachIndex, _injury]; + _openWounds set [_forEachIndex, _injury]; }; - } foreach _openWounds; + } forEach _openWounds; if (!_exists) then { _openWounds pushBack _injury; diff --git a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf index 091bea7ef8..11b13a9ad0 100644 --- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf +++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf @@ -20,5 +20,5 @@ if (local _unit && !(local _originOfrequest)) then { _openWounds = _unit getvariable [QGVAR(openWounds), []]; { ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent); - } foreach _openWounds; + } forEach _openWounds; }; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 95b378cd4f..5e36a56a87 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -109,7 +109,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); if (_type in (_x select 5)) then { _woundTypes pushBack _x; }; - } foreach _allWoundClasses; + } forEach _allWoundClasses; _typeThresholds = _thresholds; _selectionSpecificType = _selectionSpecific; if (isClass(_damageTypesConfig >> _x)) then { @@ -129,11 +129,11 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); _minDamageThresholds = _minDamageThresholds + ":"; _amountThresholds = _amountThresholds + ":"; }; - } foreach _typeThresholds; + } forEach _typeThresholds; - "ace_medical" callExtension format ["addDamageType,%1,%2,%3,%4,%5", _type, GVAR(minLethalDamages) select _foreachIndex, _minDamageThresholds, _amountThresholds, _selectionSpecificType]; + "ace_medical" callExtension format ["addDamageType,%1,%2,%3,%4,%5", _type, GVAR(minLethalDamages) select _forEachIndex, _minDamageThresholds, _amountThresholds, _selectionSpecificType]; -} foreach _allFoundDamageTypes; +} forEach _allFoundDamageTypes; // Extension loading @@ -151,7 +151,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); if (_forEachIndex < (count _selections) - 1) then { _allowedSelections = _allowedSelections + ":"; }; - } foreach _selections; + } forEach _selections; _causes = ""; @@ -160,11 +160,11 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); if (_forEachIndex < (count _causesArray) - 1) then { _causes = _causes + ":"; }; - } foreach _causesArray; + } forEach _causesArray; _classDisplayName = _x select 6; "ace_medical" callExtension format["addInjuryType,%1,%2,%3,%4,%5,%6,%7,%8,%9", _classID, _className, _allowedSelections, _bloodLoss, _pain, _minDamage, _maxDamage, _causes, _classDisplayName]; -} foreach _allWoundClasses; +} forEach _allWoundClasses; "ace_medical" callExtension "ConfigComplete"; diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 50f34f765a..e0ea58e1c4 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -108,7 +108,7 @@ if ("All" in _locations) then { }; }; }; - } foreach _locations; + } forEach _locations; }; if !(_return) exitWith {false}; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index ed572fda62..2d9c383902 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -31,6 +31,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitWith { if (_x != "") then { [_target, _x] call FUNC(addToTriageCard); }; -}foreach _items;*/ +}forEach _items;*/ true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 2a93769930..81ffd1bd20 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -60,7 +60,7 @@ _exit = false; TRACE_2("Wound classes: ", _specificClass, _classID); if (_specificClass == _classID) exitWith { _effectivenessFound = _woundEffectivenss; - _mostEffectiveSpot = _foreachIndex; + _mostEffectiveSpot = _forEachIndex; _mostEffectiveInjury = _x; _exit = true; }; @@ -68,12 +68,12 @@ _exit = false; // Check if this is the currently most effective found. if (_woundEffectivenss * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then { _effectivenessFound = _woundEffectivenss; - _mostEffectiveSpot = _foreachIndex; + _mostEffectiveSpot = _forEachIndex; _mostEffectiveInjury = _x; }; }; if (_exit) exitWith {}; -} foreach _openWounds; +} forEach _openWounds; if (_effectivenessFound == -1) exitWith {}; // Seems everything is patched up on this body part already.. diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index 7791e249e9..8f27901eaa 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -63,7 +63,7 @@ if (alive _target) exitWith { _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; { _target setvariable [_x select 0, nil]; - } foreach _allUsedMedication; + } forEach _allUsedMedication; // Resetting damage _target setDamage 0; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index b5b0af1401..e551eb4afe 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -27,7 +27,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items"]; [_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog); [_target, "activity_view", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog); }; -} foreach _items; +} forEach _items; true; diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index c79008799c..7e85900a59 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -44,7 +44,7 @@ _target setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95] _target setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; { - _target setHitPointDamage [_x, (_damageBodyParts select _foreachIndex) min 0.95]; -}foreach GVAR(HITPOINTS); + _target setHitPointDamage [_x, (_damageBodyParts select _forEachIndex) min 0.95]; +}forEach GVAR(HITPOINTS); true; diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index 4aac0eda6a..b0c0c5c5ad 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -55,7 +55,7 @@ if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") { _x params ["_unit", "_item"]; _unit addItem _item; -} foreach _usersOfItems; +} forEach _usersOfItems; // Record specific callback _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className); diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index e9be5cf359..7abf80c464 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -41,7 +41,7 @@ if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) _return = [true, _x]; [[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - } foreach _crew; + } forEach _crew; }; _return diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index f82c46b2ea..47cee71e20 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -25,7 +25,7 @@ _itemsUsedBy = []; { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; - } foreach _x; + } forEach _x; }; // handle required item @@ -33,6 +33,6 @@ _itemsUsedBy = []; _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; }; -} foreach _items; +} forEach _items; [count _items == count _itemsUsedBy, _itemsUsedBy]; diff --git a/addons/medical_menu/functions/fnc_updateActivityLog.sqf b/addons/medical_menu/functions/fnc_updateActivityLog.sqf index 92e8474b4b..b647254d61 100644 --- a/addons/medical_menu/functions/fnc_updateActivityLog.sqf +++ b/addons/medical_menu/functions/fnc_updateActivityLog.sqf @@ -32,7 +32,7 @@ lbClear _logCtrl; { if (typeName _x == "STRING" && {isLocalized _x}) then { - _arguments set [_foreachIndex, localize _x]; + _arguments set [_forEachIndex, localize _x]; }; } forEach _arguments; diff --git a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf index 49da12e7f4..dd38bb22b1 100644 --- a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf +++ b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf @@ -32,7 +32,7 @@ lbClear _logCtrl; { if (typeName _x == "STRING" && {isLocalized _x}) then { - _arguments set [_foreachIndex, localize _x]; + _arguments set [_forEachIndex, localize _x]; }; } forEach _arguments; diff --git a/addons/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf index 3db8c607ac..4736d72623 100644 --- a/addons/optionsmenu/XEH_postInit.sqf +++ b/addons/optionsmenu/XEH_postInit.sqf @@ -7,5 +7,5 @@ if !(_x select 8 in GVAR(categories)) then { GVAR(categories) pushBack (_x select 8); }; - }foreach EGVAR(common,settings); + }forEach EGVAR(common,settings); }] call EFUNC(common,addEventHandler); diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf index 87532aaf86..dfffbca6a6 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf @@ -57,7 +57,7 @@ if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { _settingsValue = [0, 1] select _settingsValue; } else { lbClear 400; - { lbAdd [400, _x]; } foreach _possibleValues; + { lbAdd [400, _x]; } forEach _possibleValues; }; (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; }; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf index fc745c37be..140f76446b 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf @@ -50,7 +50,7 @@ switch (GVAR(optionMenu_openTab)) do { _added = _ctrlList lnbAddRow [_settingName, _settingsText]; _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - }foreach GVAR(serverSideOptions); + }forEach GVAR(serverSideOptions); }; case (MENU_TAB_SERVER_COLORS): { { @@ -70,7 +70,7 @@ switch (GVAR(optionMenu_openTab)) do { _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - }foreach GVAR(serverSideColors); + }forEach GVAR(serverSideColors); }; case (MENU_TAB_SERVER_VALUES): { { @@ -87,7 +87,7 @@ switch (GVAR(optionMenu_openTab)) do { _added = _ctrlList lnbAddRow [_settingName, _settingsValue]; _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - }foreach GVAR(serverSideValues); + }forEach GVAR(serverSideValues); }; }; if (_updateKeyView) then { diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf index 64f45121e5..defef99395 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf @@ -58,7 +58,7 @@ if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { _settingsValue = [0, 1] select _settingsValue; } else { lbClear 400; - { lbAdd [400, _x]; } foreach _possibleValues; + { lbAdd [400, _x]; } forEach _possibleValues; }; (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; }; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf index 96a45a1b83..cd5e1499ff 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf @@ -43,7 +43,7 @@ switch (GVAR(optionMenu_openTab)) do { _added = _ctrlList lnbAddRow [_settingName, _settingsText]; _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - } foreach GVAR(clientSideOptions); + } forEach GVAR(clientSideOptions); }; case (MENU_TAB_COLORS): { { @@ -59,7 +59,7 @@ switch (GVAR(optionMenu_openTab)) do { _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - }foreach GVAR(clientSideColors); + }forEach GVAR(clientSideColors); }; }; if (_updateKeyView) then { diff --git a/addons/optionsmenu/functions/fnc_stringEscape.sqf b/addons/optionsmenu/functions/fnc_stringEscape.sqf index 1493f76445..09e1357a31 100644 --- a/addons/optionsmenu/functions/fnc_stringEscape.sqf +++ b/addons/optionsmenu/functions/fnc_stringEscape.sqf @@ -25,7 +25,7 @@ _isEven = { if (_forEachIndex <= _index && {_x == 39}) then { _count = _count + 1; }; - }foreach _array; + }forEach _array; _count %2 == 0; }; @@ -35,9 +35,9 @@ _isEven = { _array = toArray _str; { if (_x == 34) then { - _array set [_foreachIndex, 39]; + _array set [_forEachIndex, 39]; }; -}foreach _array; +}forEach _array; _maxIndex = count _array; for "_i" from 0 to _maxIndex /* step +1 */ do { @@ -52,8 +52,8 @@ for "_i" from 0 to _maxIndex /* step +1 */ do { { if (_x == 34) then { - _array set [_foreachIndex, 39]; + _array set [_forEachIndex, 39]; }; -}foreach _array; +}forEach _array; toString _array; diff --git a/addons/optionsmenu/functions/fnc_updateSetting.sqf b/addons/optionsmenu/functions/fnc_updateSetting.sqf index 25fa06c604..370aa1f766 100644 --- a/addons/optionsmenu/functions/fnc_updateSetting.sqf +++ b/addons/optionsmenu/functions/fnc_updateSetting.sqf @@ -38,7 +38,7 @@ switch (_type) do { } ; }; - } foreach GVAR(clientSideOptions); + } forEach GVAR(clientSideOptions); }; case (MENU_TAB_COLORS): { { @@ -46,7 +46,7 @@ switch (_type) do { _changed = true; _x set [9, _newValue]; }; - } foreach GVAR(clientSideColors); + } forEach GVAR(clientSideColors); }; case (MENU_TAB_SERVER_OPTIONS): { { @@ -62,7 +62,7 @@ switch (_type) do { } ; }; - } foreach GVAR(serverSideOptions); + } forEach GVAR(serverSideOptions); }; case (MENU_TAB_SERVER_COLORS): { { @@ -70,7 +70,7 @@ switch (_type) do { _changed = true; _x set [9, _newValue]; }; - } foreach GVAR(serverSideColors); + } forEach GVAR(serverSideColors); }; case (MENU_TAB_SERVER_VALUES): { { @@ -78,7 +78,7 @@ switch (_type) do { _changed = true; _x set [9, _newValue]; }; - } foreach GVAR(serverSideValues); + } forEach GVAR(serverSideValues); }; }; diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 562bf731b4..a21799fe72 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -35,7 +35,7 @@ _newOptics = [_player] call FUNC(getOptics); { if (_newOptics select _forEachIndex != _x) then { // The optic for this weapon changed, set adjustment to zero - if (!((_adjustment select _foreachindex) isEqualTo [0, 0, 0])) then { + if (!((_adjustment select _forEachindex) isEqualTo [0, 0, 0])) then { _adjustment set [_forEachIndex, [0, 0, 0]]; [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); }; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 6f87e5d684..c79310217c 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -21,4 +21,4 @@ if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {} { _x addCuratorEditableObjects [[_object], true]; -}foreach allCurators; +}forEach allCurators; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index c4be62101b..aa7b91b753 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -86,7 +86,7 @@ if (_activated) then { _addonsList = []; { _addonsList = _addonsList + (unitaddons typeOf _x); - } foreach (entities "all"); + } forEach (entities "all"); removeallcuratoraddons _logic; _logic addcuratoraddons _addonsList; }; @@ -141,7 +141,7 @@ if (_activated) then { case (_ownerUID > 0): { { if (getplayeruid _x == _ownerVar) exitWith {_player = _x;}; - } foreach playableunits; + } forEach playableunits; }; default { _player = missionnamespace getvariable [_ownerVar,objnull]; @@ -155,7 +155,7 @@ if (_activated) then { //--- Add radio channels { _x radiochanneladd [_player]; - } foreach (_logic getvariable ["channels",[]]); + } forEach (_logic getvariable ["channels",[]]); // Added by ace_zeus to delay ascension message at mission start [{ @@ -168,7 +168,7 @@ if (_activated) then { if (isplayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; }; - } foreach (curatoreditableobjects _logic); + } forEach (curatoreditableobjects _logic); }; },[_logic,_player]] call EFUNC(common,execNextFrame); @@ -199,7 +199,7 @@ if (_activated) then { //--- Add radio channels { _x radiochannelremove [_player]; - } foreach (_logic getvariable ["channels",[]]); + } forEach (_logic getvariable ["channels",[]]); //--- Unassign waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; @@ -216,10 +216,10 @@ if (_activated) then { if !(_x in _addons) then {_addons set [count _addons,_x];}; { if !(_x in _addons) then {_addons set [count _addons,_x];}; - } foreach (unitaddons _x); - } foreach _paramAddons; + } forEach (unitaddons _x); + } forEach _paramAddons; }; - } foreach (synchronizedobjects _logic); + } forEach (synchronizedobjects _logic); _addons call bis_fnc_activateaddons; // Added by ace_zeus to delay bird code diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 3418139b32..d652a1535f 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -32,7 +32,7 @@ if (_activated) then { { _side = (getassignedcuratorunit _x) call bis_fnc_objectSide; _side revealmine _explosive; - } foreach (objectcurators _logic); + } forEach (objectcurators _logic); if (GVAR(revealMines) > 1) then { //--- Mark minefields in the map diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 013e746f8b..5154844eb7 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -110,7 +110,7 @@ if (_activated) then { }; }; }; - } foreach _entities; + } forEach _entities; }; }; if (count _hint > 0) then {