From ca9b909e75d9d6b866df82d4a04407c76e37cd76 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 16:45:20 +0100 Subject: [PATCH 01/18] fix CBA_fnc capitalization --- .../functions/fnc_displayProtractor.sqf | 2 +- .../fnc_initializeTerrainExtension.sqf | 2 +- .../atragmx/functions/fnc_create_dialog.sqf | 2 +- .../atragmx/functions/fnc_on_close_dialog.sqf | 2 +- .../fnc_target_speed_assist_timer.sqf | 2 +- .../functions/fnc_doEscortCaptive.sqf | 2 +- addons/dagr/initKeybinds.sqf | 4 ++-- .../functions/fnc_replaceATWeapon.sqf | 2 +- .../explosives/functions/fnc_dialingPhone.sqf | 2 +- addons/fcs/initKeybinds.sqf | 6 ++--- addons/finger/XEH_postInit.sqf | 2 +- addons/frag/functions/fnc_doExplosions.sqf | 10 ++++---- addons/frag/functions/fnc_doReflections.sqf | 8 +++---- addons/frag/functions/fnc_findReflections.sqf | 24 +++++++++---------- addons/frag/functions/fnc_stopTracing.sqf | 2 +- addons/frag/functions/fnc_trackTrace.sqf | 2 +- addons/huntir/functions/fnc_cam.sqf | 2 +- addons/huntir/functions/fnc_huntir.sqf | 2 +- addons/interact_menu/XEH_clientInit.sqf | 4 ++-- addons/javelin/functions/fnc_onOpticDraw.sqf | 2 +- addons/javelin/initKeybinds.sqf | 4 ++-- addons/laser/functions/fnc_laserTargetPFH.sqf | 2 +- .../functions/fnc_guidancePFH.sqf | 2 +- .../functions/fnc_moduleAmbianceSound.sqf | 2 +- .../mk6mortar/functions/fnc_handleFired.sqf | 2 +- addons/movement/XEH_postInit.sqf | 2 +- addons/nametags/XEH_postInit.sqf | 2 +- addons/nightvision/XEH_postInitClient.sqf | 4 ++-- addons/overheating/XEH_postInit.sqf | 2 +- .../overheating/functions/fnc_jamWeapon.sqf | 2 +- addons/parachute/XEH_postInit.sqf | 2 +- addons/parachute/functions/fnc_doLanding.sqf | 2 +- .../parachute/functions/fnc_onEachFrame.sqf | 10 ++++---- .../parachute/functions/fnc_showAltimeter.sqf | 4 ++-- addons/reload/XEH_postInit.sqf | 2 +- addons/scopes/XEH_postInit.sqf | 18 +++++++------- addons/scopes/functions/fnc_showZeroing.sqf | 2 +- .../switchunits/functions/fnc_switchBack.sqf | 2 +- .../switchunits/functions/fnc_switchUnit.sqf | 2 +- addons/vehicles/XEH_postInit.sqf | 2 +- .../weather/functions/fnc_displayWindInfo.sqf | 2 +- 41 files changed, 78 insertions(+), 78 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 9debec1dc8..1f7e2ecde7 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -36,7 +36,7 @@ GVAR(Protractor) = true; if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith { GVAR(Protractor) = false; 1 cutText ["", "PLAIN"]; - [_idPFH] call cba_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; 1 cutRsc ["RscProtractor", "PLAIN", 1, false]; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 53ac6aa874..02468d0349 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -40,7 +40,7 @@ GVAR(currentGrid) = 0; #ifdef DEBUG_MODE_FULL systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)]; #endif - [_idPFH] call cba_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; for "_i" from 1 to 50 do { diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf index aad591581a..07b93eb2da 100644 --- a/addons/atragmx/functions/fnc_create_dialog.sqf +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -54,7 +54,7 @@ GVAR(active) = true; GVAR(DialogPFH) = [{ if (!GVAR(active)) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; + [_this select 1] call CBA_fnc_removePerFrameHandler; }; __ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))]; }, 60, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/atragmx/functions/fnc_on_close_dialog.sqf b/addons/atragmx/functions/fnc_on_close_dialog.sqf index 46cbbfc146..1f254c646a 100644 --- a/addons/atragmx/functions/fnc_on_close_dialog.sqf +++ b/addons/atragmx/functions/fnc_on_close_dialog.sqf @@ -2,4 +2,4 @@ uiNamespace setVariable ['ATragMX_Display', nil]; GVAR(active) = false; -[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler; \ No newline at end of file +[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index 9bc5b7e34f..0f42f9637c 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -37,7 +37,7 @@ if !(ctrlVisible 9000) then { false call FUNC(show_target_speed_assist_timer); true call FUNC(show_target_speed_assist); - [_this select 1] call cba_fnc_removePerFrameHandler; + [_this select 1] call CBA_fnc_removePerFrameHandler; }; ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)]; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index 08b64195f3..484151853b 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -45,7 +45,7 @@ if (_state) then { }; if (!(_unit getVariable [QGVAR(isEscorting), false])) then { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; [objNull, _target, false] call EFUNC(common,claim); detach _target; _unit removeAction _actionID; diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf index 4575401feb..66bd08190e 100644 --- a/addons/dagr/initKeybinds.sqf +++ b/addons/dagr/initKeybinds.sqf @@ -14,7 +14,7 @@ true }, {false}, -[0, [false, true, false]], false] call cba_fnc_addKeybind; // (empty default key) +[0, [false, true, false]], false] call CBA_fnc_addKeybind; // (empty default key) ["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR", { @@ -27,7 +27,7 @@ true }, {false}, -[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key) +[0, [false, false, false]], false] call CBA_fnc_addKeybind; // (empty default key) //Add deviceKey entry: private ["_conditonCode", "_toggleCode", "_closeCode"]; diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index ec56f42ff4..f0cee0a048 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -52,7 +52,7 @@ if !([_unit] call EFUNC(common,isPlayer)) then { //don't do anything until projectile is null (exploded/max range) if (isNull _projectile) then { //Remove PFEH: - [_idPFH] call cba_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; //If (tube is dropped) OR (is dead) OR (is player) just exit if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {}; diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index cb9d7f5450..bc57ddd4b2 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -30,7 +30,7 @@ private "_explosive"; _explosive = [_code] call FUNC(getSpeedDialExplosive); if (_i >= (count _arr + 2)) then { - [_pfID] call CALLSTACK(cba_fnc_removePerFrameHandler); + [_pfID] call CALLSTACK(CBA_fnc_removePerFrameHandler); if ((count _explosive) > 0) then { [_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive); }; diff --git a/addons/fcs/initKeybinds.sqf b/addons/fcs/initKeybinds.sqf index 3b22cb2262..a302776741 100644 --- a/addons/fcs/initKeybinds.sqf +++ b/addons/fcs/initKeybinds.sqf @@ -28,7 +28,7 @@ [vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp); false }, -[15, [false, false, false]], false] call cba_fnc_addKeybind; //Tab Key +[15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key ["ACE3 Vehicles", QGVAR(adjustRangeUp), localize LSTRING(AdjustRangeUp), { @@ -42,7 +42,7 @@ true }, {false}, -[201, [false, false, false]], false] call cba_fnc_addKeybind; //PageUp Key +[201, [false, false, false]], false] call CBA_fnc_addKeybind; //PageUp Key ["ACE3 Vehicles", QGVAR(adjustRangDown), localize LSTRING(AdjustRangeDown), { @@ -56,4 +56,4 @@ true }, {false}, -[209, [false, false, false]], false] call cba_fnc_addKeybind; //PageDown Key +[209, [false, false, false]], false] call CBA_fnc_addKeybind; //PageDown Key diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf index 5d2fa5a261..394c0cfd3b 100644 --- a/addons/finger/XEH_postInit.sqf +++ b/addons/finger/XEH_postInit.sqf @@ -19,5 +19,5 @@ GVAR(pfeh_id) = -1; _this call FUNC(keyPress); }, {false}, - [41, [true, false, false]], true] call cba_fnc_addKeybind; // Shift + Tilda (hold) + [41, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + Tilda (hold) }] call EFUNC(common,addEventHandler); diff --git a/addons/frag/functions/fnc_doExplosions.sqf b/addons/frag/functions/fnc_doExplosions.sqf index 749c4bd2ec..f6daee1c06 100644 --- a/addons/frag/functions/fnc_doExplosions.sqf +++ b/addons/frag/functions/fnc_doExplosions.sqf @@ -1,7 +1,7 @@ -//fnc_doExplosions.sqf -#include "script_component.hpp" - -private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"]; +//fnc_doExplosions.sqf +#include "script_component.hpp" + +private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"]; _params = _this select 0; _explosions = _params select 0; _index = _params select 1; @@ -20,7 +20,7 @@ for "_i" from _index to ((_index+2) min (count _explosions)) do { }; _index = _index + 2; if(_index >= (count _explosions)) then { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; } else { _params set[1, _index]; }; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index b0e24f0972..7702e34fd5 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -1,7 +1,7 @@ -//fnc_doReflections.sqf -#include "script_component.hpp" - -private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"]; +//fnc_doReflections.sqf +#include "script_component.hpp" + +private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"]; _pos = _this select 0; _ammo = _this select 1; diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index 193e1e7154..7f8fd2a13c 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -1,6 +1,6 @@ -//fnc_findReflections.sqf -#include "script_component.hpp" - +//fnc_findReflections.sqf +#include "script_component.hpp" + private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"]; _params = _this select 0; @@ -21,15 +21,15 @@ _indirectHit = _explosiveInfo select 1; _distanceCount = (floor _indirectHitRange*4) min 100; if(_zIndex < 5) then { - _lastPos = _pos; - _zAng = _zIndex*20+2; - if(_zAng > 80) then { - _radi = 1; - _zAng = 90; + _lastPos = _pos; + _zAng = _zIndex*20+2; + if(_zAng > 80) then { + _radi = 1; + _zAng = 90; }; for "_i" from 0 to _radi do { _test = true; - _vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call cba_fnc_polar2vect; + _vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect; for "_x" from 1 to _distanceCount do { _testPos = _pos vectorAdd (_vec vectorMultiply _x); // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; @@ -43,7 +43,7 @@ if(_zIndex < 5) then { // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; // TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]]; - }; + }; // if(terrainIntersectASL [_pos, _testPos]) exitWith {}; _lastPos = _testPos; }; @@ -106,7 +106,7 @@ if(_zIndex < 5) then { _range = _range - (_range%2); if(_hit >= 10 && _range > 0) then { - // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]]; + // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]]; // TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]]; _refExp = format["ace_explosion_reflection_%1_%2", _range, _hit]; // _refExp createVehicle (ASLtoATL _bpos); @@ -122,5 +122,5 @@ if(_zIndex < 5) then { // _dirvec = _dirvec vectorMultiply 100; // _can setVelocity _dirvec; [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler; - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/frag/functions/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf index 13c8f31f33..f8ddf42084 100644 --- a/addons/frag/functions/fnc_stopTracing.sqf +++ b/addons/frag/functions/fnc_stopTracing.sqf @@ -1,5 +1,5 @@ #include "script_component.hpp" if(GVAR(tracesStarted)) then { GVAR(tracesStarted) = false; - [GVAR(traceID)] call cba_fnc_removePerFrameHandler; + [GVAR(traceID)] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/frag/functions/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf index b87892ab15..24910db163 100644 --- a/addons/frag/functions/fnc_trackTrace.sqf +++ b/addons/frag/functions/fnc_trackTrace.sqf @@ -10,5 +10,5 @@ if (alive _tracerObj && (count GVAR(traces)) > 0) then { _positions = _data select 4; _positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]]; } else { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 9426de13fd..2eb7611a6a 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -93,7 +93,7 @@ GVAR(no_cams) sort true; GVAR(pos) = getPosVisual GVAR(huntIR); if ((!dialog) || (count GVAR(no_cams) == 0) || ((GVAR(pos) select 2) <= 20)) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; + [_this select 1] call CBA_fnc_removePerFrameHandler; GVAR(stop) = true; diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index b1c269533d..e06ada87ea 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -48,7 +48,7 @@ createDialog "ace_huntir_cam_dialog_off"; _nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; if ((!dialog) || GVAR(done)) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; + [_this select 1] call CBA_fnc_removePerFrameHandler; if (dialog && GVAR(state) == "connected") then { [_nearestHuntIRs select 0] call FUNC(cam); diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index 59fb01a353..1dd1401a7d 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -41,14 +41,14 @@ GVAR(ParsedTextCached) = []; // Statement [0] call FUNC(keyDown) },{[0,false] call FUNC(keyUp)}, -[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key +[219, [false, false, false]], false] call CBA_fnc_addKeybind; //Left Windows Key ["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)), { // Statement [1] call FUNC(keyDown) },{[1,false] call FUNC(keyUp)}, -[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg +[219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg // Listens for the falling unconscious event, just in case the menu needs to be closed diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index cf02d5359e..8be68be5b5 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -55,7 +55,7 @@ if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1}) _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); }; - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; GVAR(pfehID) = -1; }; diff --git a/addons/javelin/initKeybinds.sqf b/addons/javelin/initKeybinds.sqf index 15215466e8..10b5e2813d 100644 --- a/addons/javelin/initKeybinds.sqf +++ b/addons/javelin/initKeybinds.sqf @@ -19,7 +19,7 @@ [ACE_player] call FUNC(lockKeyUp); false }, -[15, [false, false, false]], false] call cba_fnc_addKeybind; //Tab Key +[15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key ["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode), { false }, @@ -27,4 +27,4 @@ [ACE_player] call FUNC(cycleFireMode); false }, -[15, [false, true, false]], false] call cba_fnc_addKeybind; //Ctrl+Tab Key \ No newline at end of file +[15, [false, true, false]], false] call CBA_fnc_addKeybind; //Ctrl+Tab Key \ No newline at end of file diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index 4c4f242482..6d993b07de 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -10,7 +10,7 @@ _shooter = _args select 1; _uuid = _args select 2; if(isNull _laserTarget || !alive _shooter) exitWith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; REM(GVAR(VanillaLasers), _laserTarget); // Remove laseron diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 78f48250dd..122d690bae 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -13,7 +13,7 @@ _args = _this select 0; EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; }; _launchParams = _args select 1; diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 26f605e347..8e1de2cb3d 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -71,7 +71,7 @@ if (_activated && local _logic) then { _args params ["_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers", "_lastTimePlayed"]; if (!alive _logic) exitWith { - [_pfhHandle] call cba_fnc_removePerFrameHandler; + [_pfhHandle] call CBA_fnc_removePerFrameHandler; }; if (ACE_time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then { diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 6c2875d75e..8c40e65409 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -60,7 +60,7 @@ if (_newMuzzleVelocityCoefficent != 1) then { EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity); if (isNull _shell || {!alive _shell}) exitwith { - [_pfID] call cba_fnc_removePerFrameHandler; + [_pfID] call CBA_fnc_removePerFrameHandler; }; _deltaT = ACE_time - _time; diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf index ebe97e879d..108dc56792 100644 --- a/addons/movement/XEH_postInit.sqf +++ b/addons/movement/XEH_postInit.sqf @@ -32,4 +32,4 @@ if (!hasInterface) exitWith {}; true }, {false}, -[47, [false, true, false]], false] call cba_fnc_addKeybind; //DIK_V + CTRL//STRG +[47, [false, true, false]], false] call CBA_fnc_addKeybind; //DIK_V + CTRL//STRG diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index b828d70005..894521d74a 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -20,7 +20,7 @@ GVAR(showNamesTime) = -10; false }, {false}, -[29, [false, false, false]], false] call cba_fnc_addKeybind; //LeftControl Key +[29, [false, false, false]], false] call CBA_fnc_addKeybind; //LeftControl Key // Monitor the assigned teams, and propegate them appropriately for the player // This allows for assigned team colors to match across the entire group diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf index 2839f6e5f9..4e14403ea8 100644 --- a/addons/nightvision/XEH_postInitClient.sqf +++ b/addons/nightvision/XEH_postInitClient.sqf @@ -49,7 +49,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; true }, {false}, -[201, [false, false, true]], false] call cba_fnc_addKeybind; //PageUp + ALT +[201, [false, false, true]], false] call CBA_fnc_addKeybind; //PageUp + ALT ["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), { @@ -63,4 +63,4 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; true }, {false}, -[209, [false, false, true]], false] call cba_fnc_addKeybind; //PageDown + ALT +[209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 1b64d7f0b0..c1212af0e8 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -18,4 +18,4 @@ if (!hasInterface) exitWith {}; true }, {false}, -[19, [true, false, false]], false] call cba_fnc_addKeybind; //R Key +[19, [true, false, false]], false] call CBA_fnc_addKeybind; //R Key diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index fd3081f7eb..000cd44021 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -34,7 +34,7 @@ _fnc_stopCurrentBurst = { if (diag_frameno == _startFrame) exitWith {}; // Remove the PFH on the second execution - [_pfhId] call cba_fnc_removePerFrameHandler; + [_pfhId] call CBA_fnc_removePerFrameHandler; _unit setAmmo [_weapon, _ammo]; }; diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 46dd21b99c..598661a3da 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -30,7 +30,7 @@ if (!hasInterface) exitWith {}; true }, {false}, -[24, [false, false, false]], false] call cba_fnc_addKeybind; +[24, [false, false, false]], false] call CBA_fnc_addKeybind; GVAR(PFH) = false; ["playerVehicleChanged",{ diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf index 7a90a1f12c..cc32724e9d 100644 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ b/addons/parachute/functions/fnc_doLanding.sqf @@ -22,6 +22,6 @@ _unit setVariable [QGVAR(chuteIsCut), false, true]; [{ if (ACE_time >= ((_this select 0) select 0) + 1) then { ((_this select 0) select 1) playActionNow "Crouch"; - [(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler); + [(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler); }; }, 1, [ACE_time,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_onEachFrame.sqf b/addons/parachute/functions/fnc_onEachFrame.sqf index dbfab16452..94d5a99748 100644 --- a/addons/parachute/functions/fnc_onEachFrame.sqf +++ b/addons/parachute/functions/fnc_onEachFrame.sqf @@ -16,16 +16,16 @@ #include "script_component.hpp" private "_player"; _player = ACE_player; -if (!GVAR(PFH)) exitWith {[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);}; -if (isNull _player) exitWith {[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);GVAR(PFH) = false;}; -if !((vehicle _player) isKindOf "ParachuteBase") exitWith {[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);GVAR(PFH) = false;}; -if (isTouchingGround _player) exitWith {[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);GVAR(PFH) = false;}; +if (!GVAR(PFH)) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);}; +if (isNull _player) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; +if !((vehicle _player) isKindOf "ParachuteBase") exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; +if (isTouchingGround _player) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; private ["_pos"]; _pos = getPosASL (vehicle _player); if ((lineIntersects [_pos, _pos vectorAdd [0,0,-0.5], vehicle _player, _player]) || {((ASLtoATL _pos) select 2) < 0.75}) then { - [(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler); + [(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler); GVAR(PFH) = false; // I believe this will not work for Zeus units. deleteVehicle (vehicle _player); diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 6f4159e85d..466abfb77e 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -23,10 +23,10 @@ if (isNull (uiNamespace getVariable ["ACE_Altimeter", displayNull])) exitWith {} GVAR(AltimeterActive) = true; [{ - if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler)}; + if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameEventHandler)}; disableSerialization; (_this select 0) params ["_display", "_unit", "_oldHeight", "_prevTime"]; - if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler); call FUNC(hideAltimeter)}; + if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameEventHandler); call FUNC(hideAltimeter)}; private ["_height", "_hour", "_minute", "_descentRate","_HeightText", "_DecendRate", "_TimeText", "_curTime", "_timeDiff"]; diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf index e1dc9e8d51..bd26583668 100644 --- a/addons/reload/XEH_postInit.sqf +++ b/addons/reload/XEH_postInit.sqf @@ -16,7 +16,7 @@ if (!hasInterface) exitWith {}; true }, {false}, -[19, [false, true, false]], false] call cba_fnc_addKeybind; +[19, [false, true, false]], false] call CBA_fnc_addKeybind; ["setAmmoSync", { //To propagate the setAmmo change, do it on all clients diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index bd81a0935b..41e7d53e17 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -25,7 +25,7 @@ if (!hasInterface) exitWith {}; if !(isNil QGVAR(fadePFH)) then { - [GVAR(fadePFH)] call cba_fnc_removePerFrameHandler; + [GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler; GVAR(fadePFH) = nil; }; }; @@ -44,7 +44,7 @@ if (!hasInterface) exitWith {}; [ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[201, [false, false, false]], true] call cba_fnc_addKeybind; +[201, [false, false, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), { @@ -57,7 +57,7 @@ if (!hasInterface) exitWith {}; [ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[209, [false, false, false]], true] call cba_fnc_addKeybind; +[209, [false, false, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), { @@ -70,7 +70,7 @@ if (!hasInterface) exitWith {}; [ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[209, [false, true, false]], true] call cba_fnc_addKeybind; +[209, [false, true, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), { @@ -83,7 +83,7 @@ if (!hasInterface) exitWith {}; [ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[201, [false, true, false]], true] call cba_fnc_addKeybind; +[201, [false, true, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), { @@ -96,7 +96,7 @@ if (!hasInterface) exitWith {}; [ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[201, [true, false, false]], true] call cba_fnc_addKeybind; +[201, [true, false, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), { @@ -109,7 +109,7 @@ if (!hasInterface) exitWith {}; [ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[209, [true, false, false]], true] call cba_fnc_addKeybind; +[209, [true, false, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), { @@ -122,7 +122,7 @@ if (!hasInterface) exitWith {}; [ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[209, [true, true, false]], true] call cba_fnc_addKeybind; +[209, [true, true, false]], true] call CBA_fnc_addKeybind; ["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), { @@ -135,4 +135,4 @@ if (!hasInterface) exitWith {}; [ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope); }, {false}, -[201, [true, true, false]], true] call cba_fnc_addKeybind; +[201, [true, true, false]], true] call CBA_fnc_addKeybind; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index dd302ff333..43595bde87 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -58,6 +58,6 @@ GVAR(fadePFH) = [{ _layer cutFadeOut 2; GVAR(fadePFH) = nil; - [_pfhId] call cba_fnc_removePerFrameHandler; + [_pfhId] call CBA_fnc_removePerFrameHandler; }; }, 0.1, []] call CBA_fnc_addPerFrameHandler diff --git a/addons/switchunits/functions/fnc_switchBack.sqf b/addons/switchunits/functions/fnc_switchBack.sqf index c3cb99588a..5aab2c9aee 100644 --- a/addons/switchunits/functions/fnc_switchBack.sqf +++ b/addons/switchunits/functions/fnc_switchBack.sqf @@ -32,6 +32,6 @@ params ["_originalPlayerUnit"]; _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; _layer cuttext ["","plain"]; - [_pfhId] call cba_fnc_removePerFrameHandler; + [_pfhId] call CBA_fnc_removePerFrameHandler; }; }, 0.2, _this] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 793e72bb71..49c3e97e42 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -76,6 +76,6 @@ if (_leave) exitWith { [localize LSTRING(SwitchedUnit)] call EFUNC(common,displayTextStructured); - [_pfhId] call cba_fnc_removePerFrameHandler; + [_pfhId] call CBA_fnc_removePerFrameHandler; }; }, 0.2, [_unit, player]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/vehicles/XEH_postInit.sqf b/addons/vehicles/XEH_postInit.sqf index a8ec2fb75f..4be21d1ed1 100644 --- a/addons/vehicles/XEH_postInit.sqf +++ b/addons/vehicles/XEH_postInit.sqf @@ -18,4 +18,4 @@ if (!hasInterface) exitWith {}; true }, {false}, -[211, [false, false, false]], false] call cba_fnc_addKeybind; //DELETE Key +[211, [false, false, false]], false] call CBA_fnc_addKeybind; //DELETE Key diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index 44a5b0696c..98d9026c1c 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -33,7 +33,7 @@ GVAR(WindInfo) = true; if !(GVAR(WindInfo) && !(underwater ACE_player) && vehicle ACE_player == ACE_player) exitWith { GVAR(WindInfo) = false; 0 cutText ["", "PLAIN"]; - [_this select 1] call cba_fnc_removePerFrameHandler; + [_this select 1] call CBA_fnc_removePerFrameHandler; }; _windIndex = 12; From 43bda9c462aa8663174a4ab7b2d76a6cec011082 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 16:52:20 +0100 Subject: [PATCH 02/18] fix Cfg capitalization --- .../functions/fnc_handleFired.sqf | 2 +- addons/attach/functions/fnc_placeApprove.sqf | 2 +- addons/common/define.hpp | 30 +++++++++---------- addons/common/functions/fnc_getChildren.sqf | 4 +-- addons/common/functions/fnc_getItemType.sqf | 12 ++++---- .../common/functions/fnc_getMapGridData.sqf | 10 +++---- addons/common/functions/fnc_isModLoaded.sqf | 6 ++-- addons/disarming/gui_disarm.hpp | 2 +- addons/explosives/XEH_postInit.sqf | 2 +- .../fnc_userActions_getHouseActions.sqf | 4 +-- .../functions/fnc_drawMapGestures.sqf | 2 +- .../functions/fnc_initInsertMarker.sqf | 2 +- addons/medical/config.cpp | 2 +- .../nametags/functions/fnc_initIsSpeaking.sqf | 4 +-- addons/optics/CfgWeapons.hpp | 2 +- .../functions/fnc_handleFired.sqf | 2 +- addons/zeus/config.cpp | 2 +- .../zeus/functions/fnc_bi_moduleCurator.sqf | 8 ++--- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- .../functions/fnc_bi_moduleProjectile.sqf | 10 +++---- .../functions/fnc_bi_moduleRemoteControl.sqf | 10 +++---- .../functions/fnc_handleZeusUnitAssigned.sqf | 16 +++++----- 22 files changed, 68 insertions(+), 68 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 8d9cb73509..90eacf2928 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea if (_abort || !(GVAR(extensionAvailable))) exitWith { if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; + EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; }; }; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index b8e2cc17fb..922136107e 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -10,7 +10,7 @@ * Arguments: * 0: Unit (player) * 1: attachToVehicle - * 2: Item Classname (cfgWeapon/cfgMagazine) + * 2: Item Classname (CfgWeapon/CfgMagazine) * 3: Light Vehicle Classname * 4: On Attach Text * 5: Starting Pos of dummy item diff --git a/addons/common/define.hpp b/addons/common/define.hpp index f1cc009864..6ac781eea2 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -261,20 +261,20 @@ class ACE_gui_listBoxBase : RscListBox{ soundExpand[] = {"",0.1,1}; soundCollapse[] = {"",0.1,1}; class ListScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; width = 0; }; class ScrollBar { @@ -335,20 +335,20 @@ class ACE_gui_listNBox { thumb = "#(argb,8,8,3)color(1,1,1,1)"; }; class ListScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; width = 0; }; }; @@ -386,26 +386,26 @@ class ACE_gui_comboBoxBase: RscCombo { color[] = {0.3,0.3,0.3,0.6}; colorActive[] = {0.3,0.3,0.3,1}; colorDisabled[] = {0.3,0.3,0.3,0.3}; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; border = ""; }; class ComboScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; color[] = {0.3,0.3,0.3,0.6}; colorActive[] = {0.3,0.3,0.3,1}; colorDisabled[] = {0.3,0.3,0.3,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; width = 0; }; }; diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index d5212dd9a5..1845c9b9d5 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -12,9 +12,9 @@ */ #include "script_component.hpp" -params ["_name", "_cfgClass"]; +params ["_name", "_CfgClass"]; private "_classes"; -_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass); +_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _CfgClass); [_classes, {configName _this}] call FUNC(map) // return diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index ec20b46f74..98ed7a5049 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -15,15 +15,15 @@ params ["_item"]; -private ["_cfgType", "_config", "_type", "_simulation", "_default"]; +private ["_CfgType", "_config", "_type", "_simulation", "_default"]; -_cfgType = [_item] call FUNC(getConfigType); +_CfgType = [_item] call FUNC(getConfigType); -if (_cfgType == "") exitWith {["", ""]}; +if (_CfgType == "") exitWith {["", ""]}; -if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]}; +if (_CfgType == "CfgGlasses") exitWith {["item", "glasses"]}; -_config = configFile >> _cfgType >> _item; +_config = configFile >> _CfgType >> _item; _type = getNumber (_config >> "type"); _simulation = getText (_config >> "simulation"); @@ -31,7 +31,7 @@ if (isNumber (_config >> "ItemInfo" >> "type")) then { _type = getNumber (_config >> "ItemInfo" >> "type"); }; -_default = ["item", "magazine"] select (_cfgType == "CfgMagazines"); +_default = ["item", "magazine"] select (_CfgType == "CfgMagazines"); switch (true) do { case (_type == 0): {[_default, "unknown"]}; diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index c74f378d75..758bc57289 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -19,12 +19,12 @@ GVAR(mapGridData) = []; -private ["_cfgGrid", "_offsetX", "_offsetY", "_zoomMax", "_formatX", "_formatY", "_stepX", "_stepY", "_zoom", "_letterGrid", "_heightOffset", "_startGrid", "_originGrid", "_realOffsetY"]; +private ["_CfgGrid", "_offsetX", "_offsetY", "_zoomMax", "_formatX", "_formatY", "_stepX", "_stepY", "_zoom", "_letterGrid", "_heightOffset", "_startGrid", "_originGrid", "_realOffsetY"]; //--- Extract grid values from world config (Borrowed from BIS_fnc_gridToPos) -_cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; -_offsetX = getNumber (_cfgGrid >> "offsetX"); -_offsetY = getNumber (_cfgGrid >> "offsetY"); +_CfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; +_offsetX = getNumber (_CfgGrid >> "offsetX"); +_offsetY = getNumber (_CfgGrid >> "offsetY"); _zoomMax = 1e99; _formatX = ""; _formatY = ""; @@ -41,7 +41,7 @@ _stepY = 1e10; _stepY = getNumber (_x >> "stepY"); }; false -} count configProperties [_cfgGrid, "isClass _x", false]; +} count configProperties [_CfgGrid, "isClass _x", false]; _letterGrid = false; diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index e5f94b202d..42f20dffb3 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -1,9 +1,9 @@ /* * Author: Glowbal - * Check in cfgPatches if modification is loaded + * Check in CfgPatches if modification is loaded * * Arguments: - * 0: Mod Name or Classname of the mod in cfgPatches + * 0: Mod Name or Classname of the mod in CfgPatches * * Return Value: * if modification is loaded @@ -14,4 +14,4 @@ params ["_modName"]; -isClass (configFile >> "cfgPatches" >> _modName) // return +isClass (configFile >> "CfgPatches" >> _modName) // return diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 0961b809ed..1a75ff0001 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -132,7 +132,7 @@ class GVAR(remoteInventory) { }; class GroundName: RscText { idc = -1; - text = "$STR_cfgVehicles_WeaponHolder0"; //"ground" + text = "$STR_CfgVehicles_WeaponHolder0"; //"ground" x = X_PART(1); y = Y_PART(1); w = W_PART(12); diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index b6dc5049d9..af105b5879 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -43,7 +43,7 @@ GVAR(CurrentSpeedDial) = 0; GVAR(placeAction) = PLACE_CANCEL; }; - //Show defuse actions on cfgAmmos (allMines): + //Show defuse actions on CfgAmmos (allMines): _this call FUNC(interactEH); }] call EFUNC(common,addEventHandler); diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index dee82fd939..0cff461463 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -111,7 +111,7 @@ _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders" _actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition _actionDisplayName = localize "str_action_ladderup"; - _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderup_ca.paa"; + _iconImage = "\A3\ui_f\data\igui\Cfg\actions\ladderup_ca.paa"; //Ladder Up Action: _actionOffset = [_ladderBottomMemPoint] call _fnc_getMemPointOffset; _actionOffset = _actionOffset vectorAdd [0,0,1]; @@ -120,7 +120,7 @@ _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders" (_memPointsActions select _memPointIndex) pushBack _action; _actionDisplayName = localize "str_action_ladderdown"; - _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderdown_ca.paa"; + _iconImage = "\A3\ui_f\data\igui\Cfg\actions\ladderdown_ca.paa"; //Ladder Down Action: _actionOffset = [_ladderTopMemPoint] call _fnc_getMemPointOffset; _actionOffset = _actionOffset vectorAdd [0,0,0.25]; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index b369686501..3adac2d82c 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -53,7 +53,7 @@ params ["_mapHandle"]; }; // Render icon and player name - _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; + _mapHandle drawIcon ["\a3\ui_f\data\gui\Cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", GVAR(nameTextColor), _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; }; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 07e2bc46c4..97e561abcb 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -128,7 +128,7 @@ if (isMultiplayer) then { _pos set [1,_posY + 5 * _posH + 7 * BORDER]; _pos set [3,_posH]; - _descriptionChannel ctrlsetstructuredtext parsetext format ["%1", (localize "str_a3_cfgvehicles_modulerespawnposition_f_arguments_marker_0") + ":"]; + _descriptionChannel ctrlsetstructuredtext parsetext format ["%1", (localize "str_a3_Cfgvehicles_modulerespawnposition_f_arguments_marker_0") + ":"]; _descriptionChannel ctrlsetposition _pos; _descriptionChannel ctrlcommit 0; diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 16d9573fc9..910a086364 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -17,7 +17,7 @@ class CfgPatches { #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "CFgSounds.hpp" +#include "CfgSounds.hpp" #include "ACE_Medical_Treatments.hpp" #include "ACE_Settings.hpp" #include "UI\RscTitles.hpp" diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 3b8aea497a..7f9ced67f7 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -37,14 +37,14 @@ if (!hasInterface) exitWith {}; }] call EFUNC(common,addEventHandler); -if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { +if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { ACE_LOGINFO("ACRE Detected."); DFUNC(isSpeaking) = { params ["_unit"]; ([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { - if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { + if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { ACE_LOGINFO("TFR Detected."); DFUNC(isSpeaking) = { params ["_unit"]; diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp index 1be66d3aa2..d0eb7472cf 100644 --- a/addons/optics/CfgWeapons.hpp +++ b/addons/optics/CfgWeapons.hpp @@ -34,7 +34,7 @@ class CfgWeapons { _generalMacro = "ACE_optic_DMS"; scope = 1; displayName = "LOCALIZE ACE DMS"; - //descriptionShort = "$STR_A3_CFGWEAPONS_ACC_DMS1"; + //descriptionShort = "$STR_A3_CfgWEAPONS_ACC_DMS1"; weaponInfoType = "ACE_RscWeaponZeroing"; class ItemInfo: ItemInfo { diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 6c668a8033..a3c51054ee 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -32,6 +32,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; -GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; +GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; true; \ No newline at end of file diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 853edaf2e9..679de706d2 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -10,7 +10,7 @@ class CfgPatches { authorUrl = "https://github.com/SilentSpike"; VERSION_CONFIG; }; - // Use additional cfgPatches to contextually remove modules from zeus + // Use additional CfgPatches to contextually remove modules from zeus class GVAR(captives): ADDON { units[] = { QGVAR(moduleCaptive), diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index a36d8dd458..22df04265b 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -68,9 +68,9 @@ if (_activated) then { //--- All (including unofficial ones) case 3: { - _cfgPatches = configfile >> "cfgpatches"; - for "_i" from 0 to (count _cfgPatches - 1) do { - _class = _cfgPatches select _i; + _CfgPatches = configfile >> "Cfgpatches"; + for "_i" from 0 to (count _CfgPatches - 1) do { + _class = _CfgPatches select _i; if (isclass _class) then {_addons set [count _addons,configname _class];}; }; _addons call bis_fnc_activateaddons; @@ -311,7 +311,7 @@ if (_activated) then { if (count (actionkeys "curatorInterface") == 0) then { [ format [ - localize "str_a3_cfgvehicles_modulecurator_f_keyNotAssigned", + localize "str_a3_Cfgvehicles_modulecurator_f_keyNotAssigned", (["IGUI","WARNING_RGB"] call bis_fnc_displaycolorget) call bis_fnc_colorRGBAtoHTML ] ] call bis_fnc_guiMessage; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 8f60531b34..4f8f5fe150 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ _units = _this select 1; _activated = _this select 2; if (_activated) then { - _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configfile >> "Cfgvehicles" >> typeof _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 7150856154..d278c17243 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,17 +39,17 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configfile >> "Cfgvehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { - _cfgAmmo = configfile >> "cfgammo" >> _ammo; - //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + _CfgAmmo = configfile >> "Cfgammo" >> _ammo; + //if !(isclass _CfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeof _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configfile >> "Cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -65,7 +65,7 @@ if (_activated) then { _altitude = 1000; _velocity = [0,0,-100]; _radio = "SentGenIncoming"; - _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; + _sounds = if (getnumber (_CfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; _sound = _sounds call bis_fnc_selectrandom; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index a9e1f35080..6e0c7718fe 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -33,11 +33,11 @@ if (_activated && local _logic && !isnull curatorcamera) then { //--- Check if the unit is suitable _error = ""; - if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; - if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; - if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; - if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorEmpty";}; + if (isplayer _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorPlayer";}; + if !(alive _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; + if (isnull _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorNull";}; + if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 65663e65fd..62b061e15e 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -19,7 +19,7 @@ #include "script_component.hpp" -private ["_removeAddons", "_numCfgs", "_cfg", "_requiredAddon"]; +private ["_removeAddons", "_numCfgs", "_Cfg", "_requiredAddon"]; if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; @@ -28,21 +28,21 @@ _removeAddons = []; _numCfgs = count (configFile >> "ACE_Curator"); for "_n" from 0 to (_numCfgs - 1) do { - _cfg = (configFile >> "ACE_Curator") select _n; + _Cfg = (configFile >> "ACE_Curator") select _n; - if (isArray _cfg) then { - _requiredAddon = getArray _cfg; + if (isArray _Cfg) then { + _requiredAddon = getArray _Cfg; { if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { - _removeAddons pushBack (configName _cfg); + _removeAddons pushBack (configName _Cfg); }; } forEach _requiredAddon; }; - if (isText _cfg) then { - _requiredAddon = getText _cfg; + if (isText _Cfg) then { + _requiredAddon = getText _Cfg; if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { - _removeAddons pushBack (configName _cfg); + _removeAddons pushBack (configName _Cfg); }; }; }; From dcf0a68b803dfafbd2835e804fcec4bd445e4801 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:00:32 +0100 Subject: [PATCH 03/18] Revert "fix Cfg capitalization" This reverts commit 43bda9c462aa8663174a4ab7b2d76a6cec011082. --- .../functions/fnc_handleFired.sqf | 2 +- addons/attach/functions/fnc_placeApprove.sqf | 2 +- addons/common/define.hpp | 30 +++++++++---------- addons/common/functions/fnc_getChildren.sqf | 4 +-- addons/common/functions/fnc_getItemType.sqf | 12 ++++---- .../common/functions/fnc_getMapGridData.sqf | 10 +++---- addons/common/functions/fnc_isModLoaded.sqf | 6 ++-- addons/disarming/gui_disarm.hpp | 2 +- addons/explosives/XEH_postInit.sqf | 2 +- .../fnc_userActions_getHouseActions.sqf | 4 +-- .../functions/fnc_drawMapGestures.sqf | 2 +- .../functions/fnc_initInsertMarker.sqf | 2 +- addons/medical/config.cpp | 2 +- .../nametags/functions/fnc_initIsSpeaking.sqf | 4 +-- addons/optics/CfgWeapons.hpp | 2 +- .../functions/fnc_handleFired.sqf | 2 +- addons/zeus/config.cpp | 2 +- .../zeus/functions/fnc_bi_moduleCurator.sqf | 8 ++--- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- .../functions/fnc_bi_moduleProjectile.sqf | 10 +++---- .../functions/fnc_bi_moduleRemoteControl.sqf | 10 +++---- .../functions/fnc_handleZeusUnitAssigned.sqf | 16 +++++----- 22 files changed, 68 insertions(+), 68 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 90eacf2928..8d9cb73509 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea if (_abort || !(GVAR(extensionAvailable))) exitWith { if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; + EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; }; }; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 922136107e..b8e2cc17fb 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -10,7 +10,7 @@ * Arguments: * 0: Unit (player) * 1: attachToVehicle - * 2: Item Classname (CfgWeapon/CfgMagazine) + * 2: Item Classname (cfgWeapon/cfgMagazine) * 3: Light Vehicle Classname * 4: On Attach Text * 5: Starting Pos of dummy item diff --git a/addons/common/define.hpp b/addons/common/define.hpp index 6ac781eea2..f1cc009864 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -261,20 +261,20 @@ class ACE_gui_listBoxBase : RscListBox{ soundExpand[] = {"",0.1,1}; soundCollapse[] = {"",0.1,1}; class ListScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; width = 0; }; class ScrollBar { @@ -335,20 +335,20 @@ class ACE_gui_listNBox { thumb = "#(argb,8,8,3)color(1,1,1,1)"; }; class ListScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; width = 0; }; }; @@ -386,26 +386,26 @@ class ACE_gui_comboBoxBase: RscCombo { color[] = {0.3,0.3,0.3,0.6}; colorActive[] = {0.3,0.3,0.3,1}; colorDisabled[] = {0.3,0.3,0.3,0.3}; - thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; border = ""; }; class ComboScrollBar { - arrowEmpty = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\Cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; autoScrollDelay = 5; autoScrollEnabled = 0; autoScrollRewind = 0; autoScrollSpeed = -1; - border = "\A3\ui_f\data\gui\Cfg\scrollbar\border_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; color[] = {0.3,0.3,0.3,0.6}; colorActive[] = {0.3,0.3,0.3,1}; colorDisabled[] = {0.3,0.3,0.3,0.3}; height = 0; scrollSpeed = 0.06; shadow = 0; - thumb = "\A3\ui_f\data\gui\Cfg\scrollbar\thumb_ca.paa"; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; width = 0; }; }; diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index 1845c9b9d5..d5212dd9a5 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -12,9 +12,9 @@ */ #include "script_component.hpp" -params ["_name", "_CfgClass"]; +params ["_name", "_cfgClass"]; private "_classes"; -_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _CfgClass); +_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass); [_classes, {configName _this}] call FUNC(map) // return diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index 98ed7a5049..ec20b46f74 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -15,15 +15,15 @@ params ["_item"]; -private ["_CfgType", "_config", "_type", "_simulation", "_default"]; +private ["_cfgType", "_config", "_type", "_simulation", "_default"]; -_CfgType = [_item] call FUNC(getConfigType); +_cfgType = [_item] call FUNC(getConfigType); -if (_CfgType == "") exitWith {["", ""]}; +if (_cfgType == "") exitWith {["", ""]}; -if (_CfgType == "CfgGlasses") exitWith {["item", "glasses"]}; +if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]}; -_config = configFile >> _CfgType >> _item; +_config = configFile >> _cfgType >> _item; _type = getNumber (_config >> "type"); _simulation = getText (_config >> "simulation"); @@ -31,7 +31,7 @@ if (isNumber (_config >> "ItemInfo" >> "type")) then { _type = getNumber (_config >> "ItemInfo" >> "type"); }; -_default = ["item", "magazine"] select (_CfgType == "CfgMagazines"); +_default = ["item", "magazine"] select (_cfgType == "CfgMagazines"); switch (true) do { case (_type == 0): {[_default, "unknown"]}; diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index 758bc57289..c74f378d75 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -19,12 +19,12 @@ GVAR(mapGridData) = []; -private ["_CfgGrid", "_offsetX", "_offsetY", "_zoomMax", "_formatX", "_formatY", "_stepX", "_stepY", "_zoom", "_letterGrid", "_heightOffset", "_startGrid", "_originGrid", "_realOffsetY"]; +private ["_cfgGrid", "_offsetX", "_offsetY", "_zoomMax", "_formatX", "_formatY", "_stepX", "_stepY", "_zoom", "_letterGrid", "_heightOffset", "_startGrid", "_originGrid", "_realOffsetY"]; //--- Extract grid values from world config (Borrowed from BIS_fnc_gridToPos) -_CfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; -_offsetX = getNumber (_CfgGrid >> "offsetX"); -_offsetY = getNumber (_CfgGrid >> "offsetY"); +_cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; +_offsetX = getNumber (_cfgGrid >> "offsetX"); +_offsetY = getNumber (_cfgGrid >> "offsetY"); _zoomMax = 1e99; _formatX = ""; _formatY = ""; @@ -41,7 +41,7 @@ _stepY = 1e10; _stepY = getNumber (_x >> "stepY"); }; false -} count configProperties [_CfgGrid, "isClass _x", false]; +} count configProperties [_cfgGrid, "isClass _x", false]; _letterGrid = false; diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index 42f20dffb3..e5f94b202d 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -1,9 +1,9 @@ /* * Author: Glowbal - * Check in CfgPatches if modification is loaded + * Check in cfgPatches if modification is loaded * * Arguments: - * 0: Mod Name or Classname of the mod in CfgPatches + * 0: Mod Name or Classname of the mod in cfgPatches * * Return Value: * if modification is loaded @@ -14,4 +14,4 @@ params ["_modName"]; -isClass (configFile >> "CfgPatches" >> _modName) // return +isClass (configFile >> "cfgPatches" >> _modName) // return diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 1a75ff0001..0961b809ed 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -132,7 +132,7 @@ class GVAR(remoteInventory) { }; class GroundName: RscText { idc = -1; - text = "$STR_CfgVehicles_WeaponHolder0"; //"ground" + text = "$STR_cfgVehicles_WeaponHolder0"; //"ground" x = X_PART(1); y = Y_PART(1); w = W_PART(12); diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index af105b5879..b6dc5049d9 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -43,7 +43,7 @@ GVAR(CurrentSpeedDial) = 0; GVAR(placeAction) = PLACE_CANCEL; }; - //Show defuse actions on CfgAmmos (allMines): + //Show defuse actions on cfgAmmos (allMines): _this call FUNC(interactEH); }] call EFUNC(common,addEventHandler); diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 0cff461463..dee82fd939 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -111,7 +111,7 @@ _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders" _actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition _actionDisplayName = localize "str_action_ladderup"; - _iconImage = "\A3\ui_f\data\igui\Cfg\actions\ladderup_ca.paa"; + _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderup_ca.paa"; //Ladder Up Action: _actionOffset = [_ladderBottomMemPoint] call _fnc_getMemPointOffset; _actionOffset = _actionOffset vectorAdd [0,0,1]; @@ -120,7 +120,7 @@ _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders" (_memPointsActions select _memPointIndex) pushBack _action; _actionDisplayName = localize "str_action_ladderdown"; - _iconImage = "\A3\ui_f\data\igui\Cfg\actions\ladderdown_ca.paa"; + _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderdown_ca.paa"; //Ladder Down Action: _actionOffset = [_ladderTopMemPoint] call _fnc_getMemPointOffset; _actionOffset = _actionOffset vectorAdd [0,0,0.25]; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 3adac2d82c..b369686501 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -53,7 +53,7 @@ params ["_mapHandle"]; }; // Render icon and player name - _mapHandle drawIcon ["\a3\ui_f\data\gui\Cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; + _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", GVAR(nameTextColor), _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; }; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 97e561abcb..07e2bc46c4 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -128,7 +128,7 @@ if (isMultiplayer) then { _pos set [1,_posY + 5 * _posH + 7 * BORDER]; _pos set [3,_posH]; - _descriptionChannel ctrlsetstructuredtext parsetext format ["%1", (localize "str_a3_Cfgvehicles_modulerespawnposition_f_arguments_marker_0") + ":"]; + _descriptionChannel ctrlsetstructuredtext parsetext format ["%1", (localize "str_a3_cfgvehicles_modulerespawnposition_f_arguments_marker_0") + ":"]; _descriptionChannel ctrlsetposition _pos; _descriptionChannel ctrlcommit 0; diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 910a086364..16d9573fc9 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -17,7 +17,7 @@ class CfgPatches { #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "CfgSounds.hpp" +#include "CFgSounds.hpp" #include "ACE_Medical_Treatments.hpp" #include "ACE_Settings.hpp" #include "UI\RscTitles.hpp" diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 7f9ced67f7..3b8aea497a 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -37,14 +37,14 @@ if (!hasInterface) exitWith {}; }] call EFUNC(common,addEventHandler); -if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { +if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { ACE_LOGINFO("ACRE Detected."); DFUNC(isSpeaking) = { params ["_unit"]; ([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { - if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { + if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { ACE_LOGINFO("TFR Detected."); DFUNC(isSpeaking) = { params ["_unit"]; diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp index d0eb7472cf..1be66d3aa2 100644 --- a/addons/optics/CfgWeapons.hpp +++ b/addons/optics/CfgWeapons.hpp @@ -34,7 +34,7 @@ class CfgWeapons { _generalMacro = "ACE_optic_DMS"; scope = 1; displayName = "LOCALIZE ACE DMS"; - //descriptionShort = "$STR_A3_CfgWEAPONS_ACC_DMS1"; + //descriptionShort = "$STR_A3_CFGWEAPONS_ACC_DMS1"; weaponInfoType = "ACE_RscWeaponZeroing"; class ItemInfo: ItemInfo { diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index a3c51054ee..6c668a8033 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -32,6 +32,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; -GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; +GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; true; \ No newline at end of file diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 679de706d2..853edaf2e9 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -10,7 +10,7 @@ class CfgPatches { authorUrl = "https://github.com/SilentSpike"; VERSION_CONFIG; }; - // Use additional CfgPatches to contextually remove modules from zeus + // Use additional cfgPatches to contextually remove modules from zeus class GVAR(captives): ADDON { units[] = { QGVAR(moduleCaptive), diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 22df04265b..a36d8dd458 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -68,9 +68,9 @@ if (_activated) then { //--- All (including unofficial ones) case 3: { - _CfgPatches = configfile >> "Cfgpatches"; - for "_i" from 0 to (count _CfgPatches - 1) do { - _class = _CfgPatches select _i; + _cfgPatches = configfile >> "cfgpatches"; + for "_i" from 0 to (count _cfgPatches - 1) do { + _class = _cfgPatches select _i; if (isclass _class) then {_addons set [count _addons,configname _class];}; }; _addons call bis_fnc_activateaddons; @@ -311,7 +311,7 @@ if (_activated) then { if (count (actionkeys "curatorInterface") == 0) then { [ format [ - localize "str_a3_Cfgvehicles_modulecurator_f_keyNotAssigned", + localize "str_a3_cfgvehicles_modulecurator_f_keyNotAssigned", (["IGUI","WARNING_RGB"] call bis_fnc_displaycolorget) call bis_fnc_colorRGBAtoHTML ] ] call bis_fnc_guiMessage; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 4f8f5fe150..8f60531b34 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ _units = _this select 1; _activated = _this select 2; if (_activated) then { - _explosive = gettext (configfile >> "Cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index d278c17243..7150856154 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,17 +39,17 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "Cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { - _CfgAmmo = configfile >> "Cfgammo" >> _ammo; - //if !(isclass _CfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + _cfgAmmo = configfile >> "cfgammo" >> _ammo; + //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeof _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configfile >> "Cfgammo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -65,7 +65,7 @@ if (_activated) then { _altitude = 1000; _velocity = [0,0,-100]; _radio = "SentGenIncoming"; - _sounds = if (getnumber (_CfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; + _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; _sound = _sounds call bis_fnc_selectrandom; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6e0c7718fe..a9e1f35080 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -33,11 +33,11 @@ if (_activated && local _logic && !isnull curatorcamera) then { //--- Check if the unit is suitable _error = ""; - if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorEmpty";}; - if (isplayer _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorPlayer";}; - if !(alive _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; - if (isnull _unit) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_Cfgvehicles_moduleremotecontrol_f_errorControl";}; + if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; + if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; + if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; + if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; + if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 62b061e15e..65663e65fd 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -19,7 +19,7 @@ #include "script_component.hpp" -private ["_removeAddons", "_numCfgs", "_Cfg", "_requiredAddon"]; +private ["_removeAddons", "_numCfgs", "_cfg", "_requiredAddon"]; if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; @@ -28,21 +28,21 @@ _removeAddons = []; _numCfgs = count (configFile >> "ACE_Curator"); for "_n" from 0 to (_numCfgs - 1) do { - _Cfg = (configFile >> "ACE_Curator") select _n; + _cfg = (configFile >> "ACE_Curator") select _n; - if (isArray _Cfg) then { - _requiredAddon = getArray _Cfg; + if (isArray _cfg) then { + _requiredAddon = getArray _cfg; { if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { - _removeAddons pushBack (configName _Cfg); + _removeAddons pushBack (configName _cfg); }; } forEach _requiredAddon; }; - if (isText _Cfg) then { - _requiredAddon = getText _Cfg; + if (isText _cfg) then { + _requiredAddon = getText _cfg; if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { - _removeAddons pushBack (configName _Cfg); + _removeAddons pushBack (configName _cfg); }; }; }; From 0b84bb514b4d3fa8f8eea93c7d9d389e76d8eca5 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:09:26 +0100 Subject: [PATCH 04/18] fix Cfg capitalization --- .../advanced_ballistics/functions/fnc_handleFired.sqf | 2 +- addons/attach/functions/fnc_placeApprove.sqf | 2 +- addons/common/functions/fnc_isModLoaded.sqf | 2 +- addons/explosives/XEH_postInit.sqf | 2 +- addons/medical/config.cpp | 2 +- addons/nametags/functions/fnc_initIsSpeaking.sqf | 4 ++-- addons/winddeflection/functions/fnc_handleFired.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleCurator.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleProjectile.sqf | 10 +++++----- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 8d9cb73509..90eacf2928 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea if (_abort || !(GVAR(extensionAvailable))) exitWith { if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; + EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; }; }; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index b8e2cc17fb..922136107e 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -10,7 +10,7 @@ * Arguments: * 0: Unit (player) * 1: attachToVehicle - * 2: Item Classname (cfgWeapon/cfgMagazine) + * 2: Item Classname (CfgWeapon/CfgMagazine) * 3: Light Vehicle Classname * 4: On Attach Text * 5: Starting Pos of dummy item diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index e5f94b202d..cb62a90440 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -14,4 +14,4 @@ params ["_modName"]; -isClass (configFile >> "cfgPatches" >> _modName) // return +isClass (configFile >> "CfgPatches" >> _modName) // return diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index b6dc5049d9..af105b5879 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -43,7 +43,7 @@ GVAR(CurrentSpeedDial) = 0; GVAR(placeAction) = PLACE_CANCEL; }; - //Show defuse actions on cfgAmmos (allMines): + //Show defuse actions on CfgAmmos (allMines): _this call FUNC(interactEH); }] call EFUNC(common,addEventHandler); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 16d9573fc9..910a086364 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -17,7 +17,7 @@ class CfgPatches { #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "CFgSounds.hpp" +#include "CfgSounds.hpp" #include "ACE_Medical_Treatments.hpp" #include "ACE_Settings.hpp" #include "UI\RscTitles.hpp" diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 3b8aea497a..7f9ced67f7 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -37,14 +37,14 @@ if (!hasInterface) exitWith {}; }] call EFUNC(common,addEventHandler); -if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { +if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { ACE_LOGINFO("ACRE Detected."); DFUNC(isSpeaking) = { params ["_unit"]; ([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { - if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { + if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { ACE_LOGINFO("TFR Detected."); DFUNC(isSpeaking) = { params ["_unit"]; diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 6c668a8033..a3c51054ee 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -32,6 +32,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; -GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; +GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; true; \ No newline at end of file diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index a36d8dd458..bd9fd73e8d 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -68,7 +68,7 @@ if (_activated) then { //--- All (including unofficial ones) case 3: { - _cfgPatches = configfile >> "cfgpatches"; + _cfgPatches = configfile >> "Cfgpatches"; for "_i" from 0 to (count _cfgPatches - 1) do { _class = _cfgPatches select _i; if (isclass _class) then {_addons set [count _addons,configname _class];}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 8f60531b34..6b4df325fa 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ _units = _this select 1; _activated = _this select 2; if (_activated) then { - _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configfile >> "CfgVehicles" >> typeof _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 7150856154..23168279ba 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,17 +39,17 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { - _cfgAmmo = configfile >> "cfgammo" >> _ammo; - //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + _CfgAmmo = configfile >> "CfgAmmo" >> _ammo; + //if !(isclass _CfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeof _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configfile >> "CfgAmmo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -65,7 +65,7 @@ if (_activated) then { _altitude = 1000; _velocity = [0,0,-100]; _radio = "SentGenIncoming"; - _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; + _sounds = if (getnumber (_CfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; _sound = _sounds call bis_fnc_selectrandom; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; From 34d351c652ed8e864c51f6181a70e56d91199bec Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:14:05 +0100 Subject: [PATCH 05/18] fix exitWith capitalization --- .../captives/functions/fnc_setHandcuffed.sqf | 2 +- .../captives/functions/fnc_setSurrendered.sqf | 2 +- addons/common/functions/fnc_debug.sqf | 2 +- .../common/functions/fnc_defineVariable.sqf | 2 +- addons/common/functions/fnc_displayIcon.sqf | 2 +- .../fnc_getAllDefinedSetVariables.sqf | 2 +- .../fnc_getDefinedVariableDefault.sqf | 2 +- addons/common/functions/fnc_loadPerson.sqf | 2 +- .../fnc_loadSettingsLocalizedText.sqf | 2 +- .../functions/fnc_setDefinedVariable.sqf | 2 +- .../functions/fnc_switchToGroupSide.sqf | 6 ++-- .../functions/fnc_unloadPersonLocal.sqf | 4 +-- .../functions/fnc_dismount.sqf | 2 +- addons/dagr/functions/fnc_outputVector.sqf | 2 +- .../functions/fnc_openDisarmDialog.sqf | 2 +- .../functions/fnc_startRepackingMagazine.sqf | 2 +- addons/medical/XEH_postInit.sqf | 4 +-- .../medical/functions/fnc_actionLoadUnit.sqf | 2 +- .../functions/fnc_actionRemoveTourniquet.sqf | 2 +- .../functions/fnc_actionUnloadUnit.sqf | 4 +-- .../functions/fnc_addToInjuredCollection.sqf | 4 +-- addons/medical/functions/fnc_addToLog.sqf | 2 +- .../medical/functions/fnc_addToTriageCard.sqf | 4 +-- .../fnc_canAccessMedicalEquipment.sqf | 6 ++-- addons/medical/functions/fnc_canTreat.sqf | 26 +++++++------- addons/medical/functions/fnc_copyDeadBody.sqf | 2 +- addons/medical/functions/fnc_createLitter.sqf | 12 +++---- .../functions/fnc_determineIfFatal.sqf | 10 +++--- .../fnc_displayPatientInformation.sqf | 6 ++-- .../functions/fnc_displayTriageCard.sqf | 4 +-- .../functions/fnc_dropDownTriageCard.sqf | 2 +- .../medical/functions/fnc_getTypeOfDamage.sqf | 2 +- .../functions/fnc_getUnconsciousCondition.sqf | 2 +- .../functions/fnc_handleBandageOpening.sqf | 6 ++-- .../functions/fnc_handleCreateLitter.sqf | 2 +- addons/medical/functions/fnc_handleDamage.sqf | 4 +-- .../functions/fnc_handleDamage_advanced.sqf | 2 +- .../fnc_handleDamage_advancedSetDamage.sqf | 2 +- .../functions/fnc_handleDamage_airway.sqf | 2 +- .../functions/fnc_handleDamage_basic.sqf | 2 +- .../functions/fnc_handleDamage_caching.sqf | 2 +- .../functions/fnc_handleDamage_wounds.sqf | 2 +- .../functions/fnc_handleDamage_woundsOld.sqf | 8 ++--- addons/medical/functions/fnc_handleKilled.sqf | 2 +- .../functions/fnc_handleUnitVitals.sqf | 2 +- addons/medical/functions/fnc_hasItem.sqf | 6 ++-- addons/medical/functions/fnc_hasItems.sqf | 4 +-- .../functions/fnc_hasMedicalEnabled.sqf | 2 +- .../functions/fnc_isInMedicalFacility.sqf | 4 +-- .../functions/fnc_isInStableCondition.sqf | 2 +- .../functions/fnc_modifyMedicalAction.sqf | 4 +-- .../functions/fnc_onMedicationUsage.sqf | 2 +- .../functions/fnc_onPropagateWound.sqf | 2 +- .../functions/fnc_parseConfigForInjuries.sqf | 4 +-- .../functions/fnc_playInjuredSound.sqf | 6 ++-- .../functions/fnc_requestWoundSync.sqf | 4 +-- .../functions/fnc_setCardiacArrest.sqf | 6 ++-- addons/medical/functions/fnc_setDead.sqf | 12 +++---- .../medical/functions/fnc_setUnconscious.sqf | 6 ++-- .../functions/fnc_translateSelections.sqf | 8 ++--- addons/medical/functions/fnc_treatment.sqf | 34 +++++++++---------- .../fnc_treatmentAdvanced_bandage.sqf | 2 +- .../fnc_treatmentAdvanced_bandageLocal.sqf | 10 +++--- .../fnc_treatmentAdvanced_fullHealLocal.sqf | 2 +- .../fnc_treatmentBasic_bandageLocal.sqf | 2 +- addons/medical/functions/fnc_treatmentIV.sqf | 2 +- .../functions/fnc_treatmentIVLocal.sqf | 2 +- .../functions/fnc_treatmentTourniquet.sqf | 6 ++-- .../fnc_treatmentTourniquetLocal.sqf | 4 +-- .../medical/functions/fnc_unconsciousPFH.sqf | 8 ++--- addons/medical/functions/fnc_useItem.sqf | 6 ++-- addons/medical/functions/fnc_useItems.sqf | 4 +-- addons/medical_menu/XEH_postInit.sqf | 4 +-- .../functions/fnc_getTreatmentOptions.sqf | 2 +- .../functions/fnc_handleUI_DisplayOptions.sqf | 12 +++---- .../medical_menu/functions/fnc_onMenuOpen.sqf | 2 +- .../medical_menu/functions/fnc_openMenu.sqf | 2 +- .../functions/fnc_updateUIInfo.sqf | 2 +- .../mk6mortar/functions/fnc_handleFired.sqf | 2 +- addons/modules/XEH_postInit.sqf | 4 +-- .../functions/fnc_moduleAllowConfigExport.sqf | 2 +- .../fnc_onServerSettingsMenuOpen.sqf | 2 +- addons/repair/functions/fnc_canRepair.sqf | 24 ++++++------- .../repair/functions/fnc_canReplaceWheel.sqf | 2 +- addons/repair/functions/fnc_doRepairTrack.sqf | 2 +- .../repair/functions/fnc_doReplaceTrack.sqf | 2 +- .../repair/functions/fnc_doReplaceWheel.sqf | 2 +- .../functions/fnc_getPostRepairDamage.sqf | 2 +- addons/repair/functions/fnc_hasItems.sqf | 4 +-- .../functions/fnc_isInRepairFacility.sqf | 4 +-- .../functions/fnc_isNearRepairVehicle.sqf | 2 +- .../repair/functions/fnc_isRepairVehicle.sqf | 2 +- addons/repair/functions/fnc_repair.sqf | 32 ++++++++--------- addons/repair/functions/fnc_useItem.sqf | 2 +- addons/repair/functions/fnc_useItems.sqf | 4 +-- .../functions/fnc_handleInterface.sqf | 2 +- .../spectator/functions/fnc_setSpectator.sqf | 2 +- .../functions/fnc_stageSpectator.sqf | 2 +- .../fnc_displayGrenadeTypeAndNumber.sqf | 2 +- .../zeus/functions/fnc_addObjectToCurator.sqf | 4 +-- .../zeus/functions/fnc_bi_moduleCurator.sqf | 12 +++---- .../functions/fnc_bi_moduleProjectile.sqf | 4 +-- .../functions/fnc_bi_moduleRemoteControl.sqf | 2 +- 103 files changed, 235 insertions(+), 235 deletions(-) diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index a4788db057..cf4e248bff 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -19,7 +19,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); -if (!local _unit) exitwith { +if (!local _unit) exitWith { ERROR("running setHandcuffed on remote unit"); }; if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith { diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 5af4454472..aea8adc918 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -19,7 +19,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); -if (!local _unit) exitwith { +if (!local _unit) exitWith { ERROR("running surrender on remote unit"); }; diff --git a/addons/common/functions/fnc_debug.sqf b/addons/common/functions/fnc_debug.sqf index 6430a7bb11..6dd1f04163 100644 --- a/addons/common/functions/fnc_debug.sqf +++ b/addons/common/functions/fnc_debug.sqf @@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"]; _defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL); -if (_defaultLoglevel < 0) exitwith {false}; +if (_defaultLoglevel < 0) exitWith {false}; _defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL); diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 6ea15adc43..e10a3bf59b 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi if (isNil "_defaultGlobal") exitWith {}; -if (typeName _name != "STRING") exitwith { +if (typeName _name != "STRING") exitWith { [format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug); }; diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index 8421f5be7e..be2e9edc3f 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -97,7 +97,7 @@ if (_show) then { _list pushBack [_iconId, _icon, _color, ACE_time]; } else { { - if (_x select 0 == _iconId) exitwith { + if (_x select 0 == _iconId) exitWith { _list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]]; }; } forEach _list; diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index 18c8a18c72..ac13f73275 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -20,7 +20,7 @@ params ["_object", ["_category", ""]]; -if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]}; +if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]}; private ["_return", "_val"]; diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index 4bb4b12253..ba9ff20e23 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -17,7 +17,7 @@ params ["_varName"]; private "_variableDefinition"; _variableDefinition = [_varName] call FUNC(getDefinedVariableInfo); -if !(_variableDefinition isEqualTo []) exitwith { +if !(_variableDefinition isEqualTo []) exitWith { _variableDefinition select 1; }; diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index da729ed0d7..659d63224a 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"]; _vehicle = objNull; -if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle}; +if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle}; _loadcar = nearestObject [_unit, "Car"]; diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 7b05902862..06cfc95aff 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames"; _fnc_parseConfigForDisplayNames = { params ["_optionEntry"]; - if !(isClass _optionEntry) exitwith {false}; + if !(isClass _optionEntry) exitWith {false}; private "_values"; _values = getArray (_optionEntry >> "values"); diff --git a/addons/common/functions/fnc_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index 480632394c..b6c8b2d601 100644 --- a/addons/common/functions/fnc_setDefinedVariable.sqf +++ b/addons/common/functions/fnc_setDefinedVariable.sqf @@ -23,7 +23,7 @@ if (isNil "_global") then { _definedVariable params ["", "", ["_global", false]]; }; -if (!isNil "_value") exitwith { +if (!isNil "_value") exitWith { _unit setVariable [_variable, _value, _global]; }; diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 95f17a9c7b..9bbc4c6d20 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -27,7 +27,7 @@ if (_switch) then { _previousGroup = group _unit; _originalSide = side group _unit; - if (count units _previousGroup == 1 && _originalSide == _side) exitwith { + if (count units _previousGroup == 1 && _originalSide == _side) exitWith { [format ["Current group has only 1 member and is of same side as switch. Not switching unit %1", _id]] call FUNC(debug); }; @@ -41,7 +41,7 @@ if (_switch) then { private ["_currentGroup", "_newGroup"]; { - if (_id == (_x select 2)) exitwith { + if (_id == (_x select 2)) exitWith { _x set [ 3, false]; _previousGroupsList set [_forEachIndex, _x]; [format["found group with ID: %1", _id]] call FUNC(debug); @@ -51,7 +51,7 @@ if (_switch) then { reverse _previousGroupsList; { - if (_x select 3) exitwith {}; // stop at first id set to true + if (_x select 3) exitWith {}; // stop at first id set to true if !(_x select 3) then { _currentGroup = group _unit; if (!isNull (_x select 0)) then { diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 67d104a9e4..7b0d8082af 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -51,12 +51,12 @@ if (_vehicle isKindOf "Ship") then { TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); -if !(_validVehiclestate) exitwith { +if !(_validVehiclestate) exitWith { ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle); false }; -if (count _emptyPos == 0) exitwith { +if (count _emptyPos == 0) exitWith { ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos); false }; //consider displaying text saying there are no safe places to exit the vehicle diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index c7ba3f50b1..6e8ae8f4f5 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine -if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { +if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { [{ _this call FUNC(dismount); }, _this] call EFUNC(common,execNextFrame); diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 7f36facae8..ef93a53d8a 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -29,7 +29,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati __background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa)); -if (GVAR(noVectorData)) exitwith {}; +if (GVAR(noVectorData)) exitWith {}; GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"]; // Incase grids go neg due to 99-00 boundry diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index c2a3a6396e..c18b3ab7ac 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -20,7 +20,7 @@ params ["_caller", "_target"]; private "_display"; #define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa" //Sanity Checks -if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");}; +if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");}; if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");}; if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;}; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index b11fc3697d..736b6c0890 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -57,7 +57,7 @@ _startingAmmoCounts = []; }; } forEach (magazinesAmmoFull _player); -if ((count _startingAmmoCounts) < 2) exitwith {ERROR("Not Enough Mags to Repack");}; +if ((count _startingAmmoCounts) < 2) exitWith {ERROR("Not Enough Mags to Repack");}; _simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents); _totalTime = (_simEvents select ((count _simEvents) - 1) select 0); diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 064f78682f..bec734b987 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -160,7 +160,7 @@ GVAR(lastHeartBeatSound) = ACE_time; if (GVAR(level) == 1) then { _heartRate = 60 + 40 * _pain; }; - if (_heartRate <= 0) exitwith {}; + if (_heartRate <= 0) exitWith {}; _interval = 60 / (_heartRate min 40); if ((ACE_player getVariable ["ACE_isUnconscious", false])) then { @@ -246,7 +246,7 @@ GVAR(lastHeartBeatSound) = ACE_time; }; ["SettingsInitialized", { - if (GVAR(level) == 2) exitwith { + if (GVAR(level) == 2) exitWith { [ {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)}, {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9}, diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf index 42a94997d8..41970e23d2 100644 --- a/addons/medical/functions/fnc_actionLoadUnit.sqf +++ b/addons/medical/functions/fnc_actionLoadUnit.sqf @@ -17,7 +17,7 @@ private "_vehicle"; params ["_caller", "_target"]; -if ([_target] call EFUNC(common,isAwake)) exitwith { +if ([_target] call EFUNC(common,isAwake)) exitWith { ["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent); }; if ([_target] call FUNC(isBeingCarried)) then { diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index b920f276f0..3e753d6454 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber); _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; // Check if there is a tourniquet on this bodypart -if ((_tourniquets select _part) == 0) exitwith { +if ((_tourniquets select _part) == 0) exitWith { _output = LSTRING(noTourniquetOnBodyPart); ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); }; diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 6bb4f5beed..3d6d1d964c 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -18,7 +18,7 @@ params ["_caller", "_target", ["_drag", false]]; // cannot unload a unit not in a vehicle. -if (vehicle _target == _target) exitwith {}; -if (([_target] call EFUNC(common,isAwake))) exitwith {}; +if (vehicle _target == _target) exitWith {}; +if (([_target] call EFUNC(common,isAwake))) exitWith {}; ["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent) diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 0ed9b9747f..f927d54e67 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -17,11 +17,11 @@ params ["_unit", ["_force", false]]; if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { - if !(local _unit) exitwith { + if !(local _unit) exitWith { [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{}; + if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; _unit setvariable [QGVAR(addedToUnitLoop), true, true]; [{ diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 0e341792c9..22f59f205c 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -19,7 +19,7 @@ private ["_moment", "_logVarName", "_log","_newLog", "_logs"]; params ["_unit", "_type", "_message", "_arguments"]; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index b1df46f751..56104bf5e4 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -17,7 +17,7 @@ private ["_log", "_inList", "_amount"]; params ["_unit", "_newItem"]; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; @@ -25,7 +25,7 @@ _log = _unit getvariable [QGVAR(triageCard), []]; _inList = false; _amount = 1; { - if ((_x select 0) == _newItem) exitwith { + if ((_x select 0) == _newItem) exitWith { private "_info"; _info = _log select _foreachIndex; _info set [1,(_info select 1) + 1]; diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index 2aecfb9a12..81e8351c6a 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -22,9 +22,9 @@ _accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; _return = false; if (_accessLevel >= 0) then { - if (_accessLevel == 0) exitwith { _return = true; }; - if (_accessLevel == 1) exitwith { _return = (side _target == side _caller); }; - if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); }; + if (_accessLevel == 0) exitWith { _return = true; }; + if (_accessLevel == 1) exitWith { _return = (side _target == side _caller); }; + if (_accessLevel == 2) exitWith { _return = (group _target == group _caller); }; }; _return; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 60685ee20a..a23e012e5d 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -27,27 +27,27 @@ if !(_target isKindOf "CAManBase") exitWith { false }; _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className); -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; // Allow self treatment check -if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false}; +if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false}; _medicRequired = if (isNumber (_config >> "requiredMedic")) then { getNumber (_config >> "requiredMedic"); } else { // Check for required class - if (isText (_config >> "requiredMedic")) exitwith { + if (isText (_config >> "requiredMedic")) exitWith { missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] }; 0; }; -if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false }; +if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith { false }; _items = getArray (_config >> "items"); -if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false }; +if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith { false }; _allowedSelections = getArray (_config >> "allowedSelections"); -if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false }; +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith { false }; _return = true; if (getText (_config >> "condition") != "") then { @@ -63,27 +63,27 @@ if (getText (_config >> "condition") != "") then { _return = [_caller, _target, _selectionName, _className] call _condition; }; }; -if (!_return) exitwith { false }; +if (!_return) exitWith { false }; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; -if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "treatmentLocations"); -if ("All" in _locations) exitwith { true }; +if ("All" in _locations) exitWith { true }; private [ "_medFacility", "_medVeh"]; _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))}; _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;}; - if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; + if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index 9cd43dada6..4d13d3823e 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -17,7 +17,7 @@ private ["_newUnit", "_class", "_group", "_position", "_side", "_name"]; params ["_oldBody", "_caller"]; -if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies +if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies _name = _oldBody getvariable ["ACE_name", "unknown"]; _class = typeof _oldBody; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 54fd6694dd..4341fdd704 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -24,17 +24,17 @@ private ["_config", "_litter", "_createLitter", "_position", "_createdLitter"]; params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_previousDamage"]; -if !(GVAR(allowLitterCreation)) exitwith {}; -if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; +if !(GVAR(allowLitterCreation)) exitWith {}; +if (vehicle _caller != _caller || vehicle _target != _target) exitWith {}; _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className); if (GVAR(level) >= 2) then { _config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className); }; -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; -if !(isArray (_config >> "litter")) exitwith {}; +if !(isArray (_config >> "litter")) exitWith {}; _litter = getArray (_config >> "litter"); _createLitter = { @@ -60,7 +60,7 @@ _createLitter = { _createdLitter = []; { if (typeName _x == "ARRAY") then { - if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {}; + if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitWith {}; _x params ["_selection", "_litterCondition", "_litterOptions"]; @@ -72,7 +72,7 @@ _createdLitter = []; _litterCondition = missionNamespace getvariable _litterCondition; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; }; - if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {}; + if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {}; if (typeName _litterOptions == "ARRAY") then { // Loop through through the litter options and place the litter diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 7fc4823202..2f460e5256 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -25,9 +25,9 @@ private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"]; params ["_unit", "_part", ["_withDamage", 0]]; -if (!alive _unit) exitwith {true}; -if (_part < 0 || _part > 5) exitwith {false}; -if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true }; +if (!alive _unit) exitWith {true}; +if (_part < 0 || _part > 5) exitWith {false}; +if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true }; // Find the correct Damage threshold for unit. _damageThreshold = [1,1,1]; @@ -41,13 +41,13 @@ _damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs" _damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; // Check if damage to body part is higher as damage head -if (_part == 0) exitwith { +if (_part == 0) exitWith { _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10); (_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))}); }; // Check if damage to body part is higher as damage torso -if (_part == 1) exitwith { +if (_part == 1) exitWith { _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10); (_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))}); }; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 222de4463f..183b878ba6 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -36,10 +36,10 @@ if (_show) then { params ["_args", "_idPFH"]; _args params ["_target", "_selectionN"]; - if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith { + if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - if (ACE_player distance _target > MAX_DISTANCE) exitwith { + if (ACE_player distance _target > MAX_DISTANCE) exitWith { ("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; [_idPFH] call CBA_fnc_removePerFrameHandler; ["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent); @@ -47,7 +47,7 @@ if (_show) then { disableSerialization; _display = uiNamespace getvariable QGVAR(DisplayInformation); - if (isnil "_display") exitwith { + if (isnil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 9849242de1..7454b76451 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -27,13 +27,13 @@ if (_show) then { private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"]; params ["_args", "_idPFH"]; _args params ["_target"]; - if (GVAR(TriageCardTarget) != _target) exitwith { + if (GVAR(TriageCardTarget) != _target) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); - if (isnil "_display") exitwith { + if (isnil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index d207c7f9a4..d44d1fed7c 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -18,7 +18,7 @@ params ["_show"]; disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); -if (isnil "_display") exitwith {}; +if (isnil "_display") exitWith {}; _pos = [0,0,0,0]; if (_show) then { diff --git a/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf index 7a351e0b77..56cb8f75ef 100644 --- a/addons/medical/functions/fnc_getTypeOfDamage.sqf +++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf @@ -17,7 +17,7 @@ params ["_typeOfProjectile"]; if (_typeOfProjectile isKindOf "BulletBase") exitWith {"bullet"}; -if (_typeOfProjectile isKindOf "ShotgunBase") exitwith {"bullet"}; +if (_typeOfProjectile isKindOf "ShotgunBase") exitWith {"bullet"}; if (_typeOfProjectile isKindOf "GrenadeCore") exitWith {"grenade"}; if (_typeOfProjectile isKindOf "TimeBombCore") exitWith {"explosive"}; if (_typeOfProjectile isKindOf "MineCore") exitWith {"explosive"}; diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index c354dd6ebd..70f820d6a0 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -22,7 +22,7 @@ if (isnil QGVAR(unconsciousConditions)) then { _return = false; { - if (typeName _x == typeName {} && {([_unit] call _x)}) exitwith { + if (typeName _x == typeName {} && {([_unit] call _x)}) exitWith { _return = true; }; } foreach GVAR(unconsciousConditions); diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 4a32adb9e5..3ae7166a89 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -56,7 +56,7 @@ _injuryType = _injury select 1; _exist = false; _bandagedInjury = []; { - if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith { + if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitWith { _exist = true; _existingInjury = _x; _existingInjury set [3, (_existingInjury select 3) + _impact]; @@ -83,7 +83,7 @@ if (random(1) <= _reopeningChance) then { //if (alive _target) then { _openWounds = _target getvariable [QGVAR(openWounds), []]; - if ((count _openWounds)-1 < _injuryIndex) exitwith {}; + if ((count _openWounds)-1 < _injuryIndex) exitWith {}; _selectedInjury = _openWounds select _injuryIndex; if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; @@ -93,7 +93,7 @@ if (random(1) <= _reopeningChance) then { _exist = false; _injuryId = _injury select 1; { - if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith { + if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitWith { _exist = true; _existingInjury = _x; _existingInjury set [3, ((_existingInjury select 3) - _impact) max 0]; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 31e65218c2..54de72db01 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -57,7 +57,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { } forEach GVAR(allCreatedLitter); GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; - if ( (count GVAR(allCreatedLitter)) == 0) exitwith { + if ( (count GVAR(allCreatedLitter)) == 0) exitWith { [(_this select 1)] call CBA_fnc_removePerFrameHandler; GVAR(litterPFHRunning) = false; }; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 6d955e72fd..e63f8f3d91 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -82,7 +82,7 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN }; if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { - if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith { + if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitWith { _damageReturn = 0.9; }; if ([_unit] call FUNC(setDead)) then { @@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { - if (_unit getvariable ["ACE_isUnconscious", false]) exitwith { + if (_unit getvariable ["ACE_isUnconscious", false]) exitWith { [_unit] call FUNC(setDead); 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 5035fbe282..517acce0ba 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -23,7 +23,7 @@ private ["_typeOfProjectile", "_part", "_damageBodyParts", "_hitPoints"]; params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"]; _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {}; +if (_part < 0) exitWith {}; _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; // Sorting out the damage diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index bac5a32976..e42e6be725 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -15,7 +15,7 @@ params ["_unit"]; -if (!local _unit) exitwith {}; +if (!local _unit) exitWith {}; private "_bodyStatus"; diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index 8b627faae1..e5180e519c 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -21,7 +21,7 @@ private "_bodyPartn"; params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"]; _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); -if (_bodyPartn > 1) exitwith {}; +if (_bodyPartn > 1) exitWith {}; if (_amountOfDamage > 0.5) then { if (random(1) >= 0.8) then { diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 92fc97c717..a54de43696 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -26,7 +26,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c _x params ["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile","_typeOfDamage"]; if !(isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) then { _part = [_selectionName] call FUNC(selectionNameToNumber); - if (_part < 0) exitwith {}; + if (_part < 0) exitWith {}; private ["_newDamage", "_pain"]; _newDamage = (_cache_damages select _foreachIndex); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 910221a850..b3f82e7397 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -106,7 +106,7 @@ if (_selectionName != "") then { private ["_index","_otherDamage"]; _index = _cache_projectiles find _projectile; // Check if the current projectile has already been handled once - if (_index >= 0 && {_projectile != "falling"}) exitwith { + if (_index >= 0 && {_projectile != "falling"}) exitWith { _cache_damages = _unit getVariable QGVAR(cachedDamages); // Find the previous damage this projectile has done _otherDamage = (_cache_damages select _index); diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index ae032e6d64..05c7165cd2 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -37,7 +37,7 @@ _foundIndex = -1; _bodyPartNToAdd = _x select 2; { // 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 { + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { _foundIndex = _foreachIndex; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index dc21012dd6..fabc642915 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -23,7 +23,7 @@ TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damag // Convert the selectionName to a number and ensure it is a valid selection. _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); -if (_bodyPartn < 0) exitwith {}; +if (_bodyPartn < 0) exitWith {}; // Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] _injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; @@ -70,7 +70,7 @@ _allPossibleInjuries = []; } foreach _allInjuriesForDamageType; // No possible wounds available for this damage type or damage amount. -if (_highestPossibleSpot < 0) exitwith {}; +if (_highestPossibleSpot < 0) exitWith {}; // Administration for open wounds and ids _openWounds = _unit getvariable[QGVAR(openWounds), []]; @@ -79,7 +79,7 @@ _woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; _painToAdd = 0; _woundsCreated = []; { - if (_x select 0 <= _damage) exitwith { + if (_x select 0 <= _damage) exitWith { for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] @@ -92,7 +92,7 @@ _woundsCreated = []; if ((_injuryTypeInfo select 1)) then { { // 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 { + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { _foundIndex = _foreachIndex; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index d6a4440d76..485dac273d 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -15,7 +15,7 @@ private "_openWounds"; params ["_unit"]; -if (!local _unit) exitwith {}; +if (!local _unit) exitWith {}; _unit setvariable [QGVAR(pain), 0]; if (GVAR(level) >= 2) then { diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index fddf5489da..0fa3607b52 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -98,7 +98,7 @@ if (GVAR(level) == 1) then { // handle advanced medical, with vitals if (GVAR(level) >= 2) then { TRACE_6("ACE_DEBUG_ADVANCED_VITALS",_painStatus,_bloodVolume, _unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(morphine),_syncValues,_unit); - if (_bloodVolume < 30) exitwith { + if (_bloodVolume < 30) exitWith { [_unit] call FUNC(setDead); }; diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index df1a3828f5..e70144f617 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -21,11 +21,11 @@ params ["_medic", "_patient", "_item"]; if (isnil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; -if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith { +if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith { true }; -if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { +if ([_medic, _item] call EFUNC(common,hasItem)) exitWith { true }; @@ -33,7 +33,7 @@ _return = false; if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then { _crew = crew vehicle _medic; { - if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { + if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith { _return = true; }; } foreach _crew; diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf index dd53cb3337..f033b0b6c0 100644 --- a/addons/medical/functions/fnc_hasItems.sqf +++ b/addons/medical/functions/fnc_hasItems.sqf @@ -21,10 +21,10 @@ params ["_medic", "_patient", "_items"]; _return = true; { // - if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitwith { + if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitWith { _return = false; }; - if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitwith { + if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith { _return = false; }; }foreach _items; diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index cbf40078fd..44f653286a 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -20,7 +20,7 @@ private "_medicalEnabled"; params ["_unit"]; _medicalEnabled = _unit getvariable QGVAR(enableMedical); -if (isnil "_medicalEnabled") exitwith { +if (isnil "_medicalEnabled") exitWith { (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) }; diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index 34f1cf4244..9c4b15eb2d 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -39,14 +39,14 @@ _medicalFacility = _objects = (lineIntersectsWith [_unit modelToWorldVisual [0, 0, (_eyePos select 2)], _unit modelToWorldVisual [0, 0, (_eyePos select 2) +10], _unit]); { - if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith { + if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; } foreach _objects; if (!_isInBuilding) then { _objects = position _unit nearObjects 7.5; { - if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith { + if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; } foreach _objects; diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 763185640c..1fcfc08e0f 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -16,7 +16,7 @@ private ["_openWounds", "_openWounds"]; params ["_unit"]; -if (GVAR(level) <= 1) exitwith { +if (GVAR(level) <= 1) exitWith { ([_unit] call FUNC(getBloodloss)) == 0; }; diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index d16ab762d5..e324a75859 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -19,7 +19,7 @@ params ["_target", "_player", "_selectionN", "_actionData"]; -if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitwith { +if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { private ["_pointDamage"]; _pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; @@ -35,7 +35,7 @@ private ["_openWounds", "_amountOf"]; _openWounds = _target getvariable [QGVAR(openWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; - if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitwith { + if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 6bef38fa27..a85f775e48 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -25,7 +25,7 @@ _foundEntry = false; _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; { _x params ["_variableX", "_allMedsFromClassname"]; - if (_variableX== _variable) exitwith { + if (_variableX== _variable) exitWith { if !(_className in _allMedsFromClassname) then { _allMedsFromClassname pushback _className; _x set [1, _allMedsFromClassname]; diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index f8b361ad17..c9c6f34ca7 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -23,7 +23,7 @@ if (!local _unit) then { _exists = false; { - if (_x select 0 == _injuryID) exitwith { + if (_x select 0 == _injuryID) exitWith { _exists = true; _openWounds set [_foreachIndex, _injury]; }; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 764d0bf591..839769e595 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -43,7 +43,7 @@ GVAR(fractureClassNames) = []; // function for parsing a sublcass of an injury _parseForSubClassWounds = { _subClass = _this select 0; - if (isClass (_entry >> _subClass)) exitwith { + if (isClass (_entry >> _subClass)) exitWith { _subClassConfig = (_entry >> _subClass); _subClasstype = _classType + (configName _subClassConfig); _subClassselections = if (isArray(_subClassConfig >> "selections")) then { getArray(_subClassConfig >> "selections");} else { _selections }; @@ -82,7 +82,7 @@ if (isClass _woundsConfig) then { _classDisplayName = if (isText(_entry >> "name")) then { getText(_entry >> "name");} else {_classType}; // TODO instead of hardcoding minor, medium and large just go through all sub classes recursively until none are found - if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitwith {}; // continue to the next one + if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitWith {}; // continue to the next one // There were no subclasses, so we will add this one instead. if (count _selections > 0 && count _causes > 0) then { diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4792f879ec..4e3fe5820e 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -18,14 +18,14 @@ private ["_unit","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound", "_pain"]; params ["_unit", "_pain"]; -if (!local _unit || !GVAR(enableScreams)) exitwith{}; +if (!local _unit || !GVAR(enableScreams)) exitWith{}; // Lock if the unit is already playing a sound. -if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitwith {}; +if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {}; _unit setvariable [QGVAR(playingInjuredSound),true]; // Play the sound if there is any damage present. -if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitwith { +if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Classnames of the available sounds. _availableSounds_A = [ "WoundedGuyA_01", diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf index 31cf726214..feb46633d8 100644 --- a/addons/medical/functions/fnc_requestWoundSync.sqf +++ b/addons/medical/functions/fnc_requestWoundSync.sqf @@ -16,7 +16,7 @@ params [ "_target", "_caller"]; -if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information -if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {}; +if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information +if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {}; _target setvariable [QGVAR(isWoundSynced), true]; ["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 017befcaad..6e770ae6d2 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -17,7 +17,7 @@ private "_timeInCardiacArrest"; params ["_unit"]; -if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {}; +if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {}; _unit setvariable [QGVAR(inCardiacArrest), true,true]; _unit setvariable [QGVAR(heartRate), 0]; @@ -32,11 +32,11 @@ _timeInCardiacArrest = 120 + round(random(600)); _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; _heartRate = _unit getvariable [QGVAR(heartRate), 80]; - if (_heartRate > 0 || !alive _unit) exitwith { + if (_heartRate > 0 || !alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inCardiacArrest), nil,true]; }; - if (ACE_time - _startTime >= _timeInCardiacArrest) exitwith { + if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inCardiacArrest), nil,true]; [_unit] call FUNC(setDead); diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index c8c81a699e..4f0d8e76c7 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -16,15 +16,15 @@ private ["_unit", "_force", "_reviveVal", "_lifesLeft"]; params ["_unit", ["_force", false]]; -if (!alive _unit) exitwith{true}; -if (!local _unit) exitwith { +if (!alive _unit) exitWith{true}; +if (!local _unit) exitWith { [[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ false; }; _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; -if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitwith { - if (_unit getvariable [QGVAR(inReviveState), false]) exitwith { +if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith { + if (_unit getvariable [QGVAR(inReviveState), false]) exitWith { if (GVAR(amountOfReviveLives) > 0) then { _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; if (_lifesLeft == 0) then { @@ -45,14 +45,14 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _args params ["_unit"]; _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; - if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { + if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inReviveState), nil, true]; _unit setvariable [QGVAR(reviveStartTime), nil]; [_unit, true] call FUNC(setDead); }; - if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith { + if !(_unit getvariable [QGVAR(inReviveState), false]) exitWith { // revived without dieing, so in case we have lifes, remove one. if (GVAR(amountOfReviveLives) > 0) then { _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index aac48a8641..1b54177212 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -32,13 +32,13 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", // No change, fuck off. (why is there no xor?) if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {}; -if !(_set) exitwith { +if !(_set) exitWith { _unit setvariable ["ACE_isUnconscious", false, true]; }; -if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitwith{}; +if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{}; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index f2fe4c1de9..16bcf8db33 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -39,10 +39,10 @@ if (_selection in HEAD_SELECTIONS) exitWith {"head"}; if (_selection in TORSO_SELECTIONS) exitWith {"body"}; // Not necessary unless we get more hitpoints variants in an next arma update -/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"}; -if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"}; -if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"}; -if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ +/*if (_selection in L_ARM_SELECTIONS) exitWith {"hand_l"}; +if (_selection in R_ARM_SELECTIONS) exitWith {"hand_r"}; +if (_selection in L_LEG_SELECTIONS) exitWith {"leg_l"}; +if (_selection in R_LEG_SELECTIONS) exitWith {"leg_r"};*/ //Backup method to detect weird selections/hitpoints if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith { diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 2d0e44d488..9b373df77e 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -20,7 +20,7 @@ private ["_config", "_medicRequired", "_items", "_locations", "_return", "_callb params ["_caller", "_target", "_selectionName", "_className"]; // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine -if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { +if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { [{ _this call FUNC(treatment); }, _this] call EFUNC(common,execNextFrame); @@ -32,29 +32,29 @@ _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className); if (GVAR(level) >= 2) then { _config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className); }; -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; // Allow self treatment check -if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false}; +if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false}; _medicRequired = if (isNumber (_config >> "requiredMedic")) then { getNumber (_config >> "requiredMedic"); } else { // Check for required class - if (isText (_config >> "requiredMedic")) exitwith { + if (isText (_config >> "requiredMedic")) exitWith { missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; }; 0; }; -if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false}; +if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith {false}; _allowedSelections = getArray (_config >> "allowedSelections"); -if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false}; +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith {false}; // Check item _items = getArray (_config >> "items"); -if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (isText (_config >> "Condition")) then { @@ -72,14 +72,14 @@ if (isText (_config >> "Condition")) then { }; }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; -if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; // Check allowed locations _locations = getArray (_config >> "treatmentLocations"); @@ -92,10 +92,10 @@ if ("All" in _locations) then { _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;}; - if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; + if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { @@ -111,14 +111,14 @@ if ("All" in _locations) then { } foreach _locations; }; -if !(_return) exitwith {false}; +if !(_return) exitWith {false}; _usersOfItems = []; _consumeItems = if (isNumber (_config >> "itemConsumed")) then { getNumber (_config >> "itemConsumed"); } else { // Check for required class - if (isText (_config >> "itemConsumed")) exitwith { + if (isText (_config >> "itemConsumed")) exitWith { missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; }; 0; @@ -198,14 +198,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { getNumber (_config >> "treatmentTime"); } else { - if (isText (_config >> "treatmentTime")) exitwith { + if (isText (_config >> "treatmentTime")) exitWith { _treatmentTimeConfig = getText(_config >> "treatmentTime"); if (isnil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; }; - if (typeName _treatmentTimeConfig == "SCALAR") exitwith { + if (typeName _treatmentTimeConfig == "SCALAR") exitWith { _treatmentTimeConfig; }; [_caller, _target, _selectionName, _className] call _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index cf18475866..ed572fda62 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -22,7 +22,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_s [_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message -if !([_target] call FUNC(hasMedicalEnabled)) exitwith { +if !([_target] call FUNC(hasMedicalEnabled)) exitWith { _this call FUNC(treatmentBasic_bandage); }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 2ef1174e63..2a93769930 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -20,11 +20,11 @@ params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {false}; +if (_part < 0) exitWith {false}; // Get the open wounds for this unit _openWounds = _target getvariable [QGVAR(openWounds), []]; -if (count _openWounds == 0) exitwith {false}; // nothing to do here! +if (count _openWounds == 0) exitWith {false}; // nothing to do here! // Get the default effectiveness for the used bandage _config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging"); @@ -58,7 +58,7 @@ _exit = false; }; TRACE_2("Wound classes: ", _specificClass, _classID); - if (_specificClass == _classID) exitwith { + if (_specificClass == _classID) exitWith { _effectivenessFound = _woundEffectivenss; _mostEffectiveSpot = _foreachIndex; _mostEffectiveInjury = _x; @@ -72,10 +72,10 @@ _exit = false; _mostEffectiveInjury = _x; }; }; - if (_exit) exitwith {}; + if (_exit) exitWith {}; } foreach _openWounds; -if (_effectivenessFound == -1) exitwith {}; // Seems everything is patched up on this body part already.. +if (_effectivenessFound == -1) exitWith {}; // Seems everything is patched up on this body part already.. // TODO refactor this part diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index ed5eb0858d..7791e249e9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -13,7 +13,7 @@ private "_allUsedMedication"; params ["_caller", "_target"]; -if (alive _target) exitwith { +if (alive _target) exitWith { _target setVariable [QGVAR(pain), 0, true]; _target setVariable [QGVAR(morphine), 0, true]; diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index ee04decfbd..c79008799c 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -22,7 +22,7 @@ _damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {false}; +if (_part < 0) exitWith {false}; if ((_damageBodyParts select _part) > 0) then { _damageOnPart = (_damageBodyParts select _part); diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index 2a7bbc6adf..bf18370a5e 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -19,7 +19,7 @@ private "_removeItem"; params ["_caller", "_target", "_selectionName", "_className", "_items"]; -if (count _items == 0) exitwith {false}; +if (count _items == 0) exitWith {false}; _removeItem = _items select 0; [[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 37cba2ad1b..98927dff0b 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -19,7 +19,7 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; params ["_target", "_treatmentClassname"]; _bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; -if (_bloodVolume >= 100) exitwith {}; +if (_bloodVolume >= 100) exitWith {}; // Find the proper attributes for the used IV _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV"); diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index 5d3ba6e1d4..45d5f58630 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -24,16 +24,16 @@ _selectionName = _this select 2; _className = _this select 3; _items = _this select 4; -if (count _items == 0) exitwith {false}; +if (count _items == 0) exitWith {false}; _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part == 0 || _part == 1) exitwith { +if (_part == 0 || _part == 1) exitWith { // ["displayTextStructured", [_caller], ["You cannot apply a CAT on this body part!"]] call EFUNC(common,targetEvent); false; }; _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; -if ((_tourniquets select _part) > 0) exitwith { +if ((_tourniquets select _part) > 0) exitWith { _output = "There is already a tourniquet on this body part!"; // TODO localization ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); false; diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index d1ffd34e4b..ae25b8c748 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -30,12 +30,12 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true]; params ["_args", "_idPFH"]; _args params ["_target", "_applyingTo", "_part", "_time"]; - if (!alive _target) exitwith { + if (!alive _target) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; - if !((_tourniquets select _part) == _applyingTo) exitwith { + if !((_tourniquets select _part) == _applyingTo) exitWith { // Tourniquet has been removed [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 0e8c424ca3..698e327d0e 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -25,7 +25,7 @@ _args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_has TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck); -if (!alive _unit) exitwith { +if (!alive _unit) exitWith { if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { TRACE_1("Removing fake weapon [on death]",_unit); _unit removeWeapon "ACE_FakePrimaryWeapon"; @@ -47,7 +47,7 @@ if (!alive _unit) exitwith { }; // In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation -if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith { +if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith { TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit); // TODO, handle this with carry instead, so we can remove the PFH here. // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations @@ -128,7 +128,7 @@ if (_parachuteCheck) then { }; }; -if (!local _unit) exitwith { +if (!local _unit) exitWith { TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); _args set [3, _minWaitingTime - (ACE_time - _startingTime)]; _unit setvariable [QGVAR(unconsciousArguments), _args, true]; @@ -136,7 +136,7 @@ if (!local _unit) exitwith { }; // Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs -if ((ACE_time - _startingTime) >= _minWaitingTime) exitwith { +if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); if (!([_unit] call FUNC(getUnconsciousCondition))) then { _unit setvariable ["ACE_isUnconscious", false, true]; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index 770d8b6ea7..ed2d402bc6 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -23,12 +23,12 @@ if (isnil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; -if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith { +if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith { [[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _patient]; }; -if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { +if ([_medic, _item] call EFUNC(common,hasItem)) exitWith { [[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _medic]; }; @@ -37,7 +37,7 @@ _return = [false, objNull]; if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then { _crew = crew vehicle _medic; { - if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { + if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith { _return = [true, _x]; [[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index 0d937c0938..85e01b4fb8 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -24,14 +24,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; } foreach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; }; } foreach _items; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index ad1acabdb3..92e2af341f 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -if (!hasInterface) exitwith {}; +if (!hasInterface) exitWith {}; GVAR(MenuPFHID) = -1; GVAR(lastOpenedOn) = -1; @@ -24,7 +24,7 @@ GVAR(pendingReopen) = false; // Conditions: canInteract if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false}; + if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false}; // Statement [_target] call FUNC(openMenu); diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf index 2bb4499753..8cbbe2d32f 100644 --- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -21,7 +21,7 @@ params ["_player", "_target", "_name"]; private ["_actions", "_collectedActions", "_bodyPart"]; -if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitwith {[]}; +if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {[]}; _actions = if (EGVAR(medical,level) == 2) then { GVAR(actionsAdvanced); diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index e5b49e58bc..3e646ddaf5 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -19,7 +19,7 @@ #define END_IDC 27 #define AMOUNT_OF_ENTRIES (count _entries) -if (!hasInterface) exitwith{}; +if (!hasInterface) exitWith{}; private ["_entries", "_display", "_newTarget", "_ctrl", "_code"]; @@ -28,9 +28,9 @@ params ["_name"]; disableSerialization; _display = uiNamespace getVariable QGVAR(medicalMenu); -if (isNil "_display") exitwith {}; // no valid dialog present +if (isNil "_display") exitWith {}; // no valid dialog present -if (_name isEqualTo "toggle") exitwith { +if (_name isEqualTo "toggle") exitWith { _newTarget = ACE_player; //If we are on the player, and only if our old target is still valid, switch to it: if ((GVAR(INTERACTION_TARGET) == ACE_player) && @@ -61,7 +61,7 @@ GVAR(LatestDisplayOptionMenu) = _name; // The triage card has no options available lbClear 212; -if (_name isEqualTo "triage") exitwith { +if (_name isEqualTo "triage") exitWith { ctrlEnable [212, true]; private ["_log", "_triageCardTexts", "_message"]; @@ -81,7 +81,7 @@ if (_name isEqualTo "triage") exitwith { nil; } count _log; - if (count _triageCardTexts == 0) exitwith { + if (count _triageCardTexts == 0) exitWith { lbAdd [212,(localize ELSTRING(medical,TriageCard_NoEntry))]; }; { @@ -96,7 +96,7 @@ _entries = [ACE_player, GVAR(INTERACTION_TARGET), _name] call FUNC(getTreatmentO { //player sidechat format["TRIGGERED: %1",_x]; - if (_forEachIndex > END_IDC) exitwith {}; + if (_forEachIndex > END_IDC) exitWith {}; _ctrl = (_display displayCtrl (START_IDC + _forEachIndex)); if (!(_forEachIndex > AMOUNT_OF_ENTRIES)) then { _ctrl ctrlSetText (_x select 0); diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf index 2b47312453..806338b7a6 100644 --- a/addons/medical_menu/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf @@ -20,7 +20,7 @@ private "_target"; params ["_display"]; -if (isNil "_display") exitwith {}; +if (isNil "_display") exitWith {}; if (EGVAR(interact_menu,menuBackground)==1) then {[QGVAR(id), true] call EFUNC(common,blurScreen);}; if (EGVAR(interact_menu,menuBackground)==2) then {0 cutRsc[QEGVAR(interact_menu,menuBackground), "PLAIN", 1, false];}; diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf index 1c77da6a5a..a8a51ff028 100644 --- a/addons/medical_menu/functions/fnc_openMenu.sqf +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -17,7 +17,7 @@ params ["_interactionTarget"]; -if (dialog || {isNull _interactionTarget}) exitwith { +if (dialog || {isNull _interactionTarget}) exitWith { disableSerialization; private ["_display", "_handled"]; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 56a22689db..8c2090fc73 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -23,7 +23,7 @@ private["_allInjuryTexts", "_bandagedwounds", "_damaged", "_genericMessages", "_ if (isNil "_display" || {isNull _display}) exitWith {ERROR("No display");}; _selectionN = GVAR(selectedBodyPart); -if (_selectionN < 0 || {_selectionN > 5}) exitwith {}; +if (_selectionN < 0 || {_selectionN > 5}) exitWith {}; _genericMessages = []; _partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 8c40e65409..d22b0efa47 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -59,7 +59,7 @@ if (_newMuzzleVelocityCoefficent != 1) then { PARAMS_2(_args,_pfID); EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity); - if (isNull _shell || {!alive _shell}) exitwith { + if (isNull _shell || {!alive _shell}) exitWith { [_pfID] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 1935714dc8..41013b7fe5 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -12,9 +12,9 @@ private _logicType = typeof _logic; _logic hideobject true; - if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; + if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; private _config = (configFile >> "CfgVehicles" >> _logicType); - if !(isClass _config) exitwith {}; + if !(isClass _config) exitWith {}; private _isGlobal = getNumber (_config >> "isGlobal") > 0; private _isDisposable = getNumber (_config >> "isDisposable") > 0; diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf index d756a0ef83..5cc16312f9 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -16,7 +16,7 @@ private ["_logic"]; _logic = _this select 0; -if (isMultiplayer) exitwith {}; +if (isMultiplayer) exitWith {}; if (_logic getvariable ["allowconfigurationExport", false]) then { GVAR(serverConfigGeneration) = 1; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 6c0cb56519..4283f43218 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -18,7 +18,7 @@ private ["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_defaultValue", "_setting", "_menu", "_settingsMenu"]; -if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitwith {closeDialog 145246;}; +if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitWith {closeDialog 145246;}; // Filter only user setable setting GVAR(serverSideOptions) = []; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 8fb2a4938e..a12a61104f 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -24,19 +24,19 @@ TRACE_4("params",_caller,_target,_hitPoint,_className); private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition", "_settingName", "_settingItemsArray"]; _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); -if !(isClass _config) exitwith {false}; // or go for a default? -if(isEngineOn _target) exitwith {false}; +if !(isClass _config) exitWith {false}; // or go for a default? +if(isEngineOn _target) exitWith {false}; _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { getNumber (_config >> "requiredEngineer"); } else { // Check for required class - if (isText (_config >> "requiredEngineer")) exitwith { + if (isText (_config >> "requiredEngineer")) exitWith { missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; }; 0; }; -if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; //Items can be an array of required items or a string to a ACE_Setting array _items = if (isArray (_config >> "items")) then { @@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then { }; _settingItemsArray select (missionNamespace getVariable _settingName); }; -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (getText (_config >> "condition") != "") then { @@ -66,27 +66,27 @@ if (getText (_config >> "condition") != "") then { }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] } else { getNumber(_config >> "vehicleStateCondition") }; -// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "repairLocations"); -if ("All" in _locations) exitwith {true}; +if ("All" in _locations) exitWith {true}; private ["_repairFacility", "_repairVeh"]; _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; - if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/repair/functions/fnc_canReplaceWheel.sqf b/addons/repair/functions/fnc_canReplaceWheel.sqf index cf7a047f19..a4c68b5024 100644 --- a/addons/repair/functions/fnc_canReplaceWheel.sqf +++ b/addons/repair/functions/fnc_canReplaceWheel.sqf @@ -21,7 +21,7 @@ params ["_unit", "_target", "_hitPoint", ["_wheel", false]]; TRACE_4("params",_unit,_target,_hitPoint,_wheel); // TODO [_unit, _wheel] call EFUNC(common,claim); on start of action -//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false}; +//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitWith {false}; if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index de04e71920..22cf7bb82f 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Track"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index a95a669159..31820b4b5f 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Track"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage _hitPointDamage = _vehicle getHitPointDamage _hitPoint; diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index f10712d65d..ba131c7f15 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Wheel"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage _hitPointDamage = _vehicle getHitPointDamage _hitPoint; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index 797f7a4f22..36e4bf39ae 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -19,7 +19,7 @@ params ["_unit"]; TRACE_1("params",_unit); // TODO when near repair station, full repair? -if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitwith {0}; +if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; if ([_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold_Engineer)}; if ([_unit, GVAR(engineerSetting_Repair)] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold)}; diff --git a/addons/repair/functions/fnc_hasItems.sqf b/addons/repair/functions/fnc_hasItems.sqf index 2f070c8bb6..d0030b3c07 100644 --- a/addons/repair/functions/fnc_hasItems.sqf +++ b/addons/repair/functions/fnc_hasItems.sqf @@ -23,10 +23,10 @@ private ["_return"]; _return = true; { - if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitwith { + if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitWith { _return = false; }; - if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitwith { + if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitWith { _return = false; }; } forEach _items; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index 0c062ff0b3..b72d8a5985 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -26,7 +26,7 @@ _repairFacility = []; _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]); { - if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith { _isInBuilding = true; }; } forEach _objects; @@ -34,7 +34,7 @@ _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position sel if (!_isInBuilding) then { _objects = position _object nearObjects 7.5; { - if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith { _isInBuilding = true; }; } forEach _objects; diff --git a/addons/repair/functions/fnc_isNearRepairVehicle.sqf b/addons/repair/functions/fnc_isNearRepairVehicle.sqf index 677f489a88..463e281faa 100644 --- a/addons/repair/functions/fnc_isNearRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isNearRepairVehicle.sqf @@ -24,7 +24,7 @@ _nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20]; _return = false; { - if ([_x] call FUNC(isRepairVehicle)) exitwith {_return = true;}; + if ([_x] call FUNC(isRepairVehicle)) exitWith {_return = true;}; } forEach _nearObjects; _return; diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 121bda0fe3..2c0b5a1e21 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -18,6 +18,6 @@ params ["_vehicle"]; TRACE_1("params",_vehicle); -if (_vehicle isKindOf "CAManBase") exitwith {false}; +if (_vehicle isKindOf "CAManBase") exitWith {false}; ((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index fd3b4f032b..841ede0ea0 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -24,19 +24,19 @@ TRACE_4("params",_calller,_target,_hitPoint,_className); private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn", "_settingName", "_settingItemsArray"]; _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); -if !(isClass _config) exitwith {false}; // or go for a default? +if !(isClass _config) exitWith {false}; // or go for a default? _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { getNumber (_config >> "requiredEngineer"); } else { // Check for required class - if (isText (_config >> "requiredEngineer")) exitwith { + if (isText (_config >> "requiredEngineer")) exitWith { missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; }; 0; }; -if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; -if (isEngineOn _target) exitwith {false}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; +if (isEngineOn _target) exitWith {false}; //Items can be an array of required items or a string to a ACE_Setting array _items = if (isArray (_config >> "items")) then { @@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then { }; _settingItemsArray select (missionNamespace getVariable _settingName); }; -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (getText (_config >> "condition") != "") then { @@ -65,27 +65,27 @@ if (getText (_config >> "condition") != "") then { _return = [_caller, _target, _hitPoint, _className] call _condition; }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] } else { getNumber(_config >> "vehicleStateCondition") }; -// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "repairLocations"); -if ("All" in _locations) exitwith {true}; +if ("All" in _locations) exitWith {true}; private ["_repairFacility", "_repairVeh"]; _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; - if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { @@ -100,13 +100,13 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC }; } forEach _locations; -if !(_return && alive _target) exitwith {false}; +if !(_return && alive _target) exitWith {false}; _consumeItems = if (isNumber (_config >> "itemConsumed")) then { getNumber (_config >> "itemConsumed"); } else { // Check for required class - if (isText (_config >> "itemConsumed")) exitwith { + if (isText (_config >> "itemConsumed")) exitWith { missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; }; 0; @@ -160,14 +160,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { _repairTime = if (isNumber (_config >> "repairingTime")) then { getNumber (_config >> "repairingTime"); } else { - if (isText (_config >> "repairingTime")) exitwith { + if (isText (_config >> "repairingTime")) exitWith { _repairTimeConfig = getText(_config >> "repairingTime"); if (isnil _repairTimeConfig) then { _repairTimeConfig = compile _repairTimeConfig; } else { _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; }; - if (typeName _repairTimeConfig == "SCALAR") exitwith { + if (typeName _repairTimeConfig == "SCALAR") exitWith { _repairTimeConfig; }; [_caller, _target, _hitPoint, _className] call _repairTimeConfig; diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf index 218a7a1ee4..a32fed59cf 100644 --- a/addons/repair/functions/fnc_useItem.sqf +++ b/addons/repair/functions/fnc_useItem.sqf @@ -19,7 +19,7 @@ params ["_unit", "_item"]; TRACE_2("params",_unit,_item); -if ([_unit, _item] call EFUNC(common,hasItem)) exitwith { +if ([_unit, _item] call EFUNC(common,hasItem)) exitWith { [[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _unit]; }; diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index f8aa176018..8771847d4e 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -27,14 +27,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; } forEach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; }; } forEach _items; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 8f29b20296..ee71685fa2 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -177,7 +177,7 @@ switch (toLower _mode) do { }; // Handle held keys (prevent repeat calling) - if (GVAR(heldKeys) param [_dik,false]) exitwith {}; + if (GVAR(heldKeys) param [_dik,false]) exitWith {}; // Exclude movement/adjustment keys so that speed can be adjusted on fly if !(_dik in [16,17,30,31,32,44,74,78]) then { GVAR(heldKeys) set [_dik,true]; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 065ca0079b..333dc023c9 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -27,7 +27,7 @@ params [["_set",true,[true]], ["_force",true,[true]]]; if (!hasInterface) exitWith {}; // Exit if no change -if (_set isEqualTo GVAR(isSet)) exitwith {}; +if (_set isEqualTo GVAR(isSet)) exitWith {}; // Handle common addon audio if (["ace_hearing"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 61445f3dd9..87b2faffa8 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -26,7 +26,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]]; // No change, no service (but allow spectators to be reset) if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; -if !(local _unit) exitwith { +if !(local _unit) exitWith { [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); }; diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 6ae945e2fd..4ab09a105f 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -if !(GVAR(DisplayText)) exitwith {}; +if !(GVAR(DisplayText)) exitWith {}; params ["_magazine", "_numberofGrenades"]; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index be814266ab..6f87e5d684 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,11 +13,11 @@ #include "script_component.hpp" -if (!isServer) exitwith {}; +if (!isServer) exitWith {}; params ["_object"]; -if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitwith {}; +if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; { _x addCuratorEditableObjects [[_object], true]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index bd9fd73e8d..f6421c71a9 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -24,7 +24,7 @@ _activated = _this select 2; if (_activated) then { //--- Terminate when not created on the server - if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitwith { + if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitWith { [format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp; deletevehicle _logic; }; @@ -133,14 +133,14 @@ if (_activated) then { waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Assign _player = objnull; switch true do { case (_ownerUID > 0): { { - if (getplayeruid _x == _ownerVar) exitwith {_player = _x;}; + if (getplayeruid _x == _ownerVar) exitWith {_player = _x;}; } foreach playableunits; }; default { @@ -150,7 +150,7 @@ if (_activated) then { waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Add radio channels { @@ -194,7 +194,7 @@ if (_activated) then { waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Add radio channels { @@ -203,7 +203,7 @@ if (_activated) then { //--- Unassign waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 23168279ba..bdbd43b30e 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -36,13 +36,13 @@ if ({local _x} count (objectcurators _logic) > 0) then { _logic hideobject false; _logic setpos position _logic; }; -if !(isserver) exitwith {}; +if !(isserver) exitWith {}; if (_activated) then { _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { _CfgAmmo = configfile >> "CfgAmmo" >> _ammo; - //if !(isclass _CfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeof _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index a9e1f35080..6077e447df 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -23,7 +23,7 @@ _activated = _this select 2; if (_activated && local _logic && !isnull curatorcamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitwith {}; + if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; //--- Get unit under cursor _unit = objnull; From d9b90258bc183a2b1ac365ee8e1b433f6d889d9d Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:19:57 +0100 Subject: [PATCH 06/18] fix typeOf capitalization --- addons/cargo/functions/fnc_getCargoSpaceLeft.sqf | 2 +- addons/common/functions/fnc_unloadPerson.sqf | 2 +- addons/common/functions/fnc_unloadPersonLocal.sqf | 4 ++-- addons/dragging/functions/fnc_getWeight.sqf | 2 +- addons/explosives/functions/fnc_detonateExplosive.sqf | 4 ++-- addons/logistics_wirecutter/functions/fnc_isFence.sqf | 2 +- addons/medical/functions/fnc_copyDeadBody.sqf | 4 ++-- addons/modules/XEH_postInit.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleCurator.sqf | 4 ++-- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleProjectile.sqf | 6 +++--- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index cae27a2d58..b858ebfddc 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -17,4 +17,4 @@ params ["_object"]; -_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))] +_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))] diff --git a/addons/common/functions/fnc_unloadPerson.sqf b/addons/common/functions/fnc_unloadPerson.sqf index 0ab65a5983..73e02cd7ce 100644 --- a/addons/common/functions/fnc_unloadPerson.sqf +++ b/addons/common/functions/fnc_unloadPerson.sqf @@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false}; if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false}; private "_emptyPos"; -_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]; // @todo to small? +_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeOf _unit]; // @todo to small? if (count _emptyPos == 0) exitWith {false}; diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 7b0d8082af..4e75791ff0 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -27,7 +27,7 @@ if (_vehicle isKindOf "Ship") then { TRACE_1("SHIP Ground Check",getPos _vehicle); - _emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit]; // TODO: if spot is underwater pick another spot. + _emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit]; // TODO: if spot is underwater pick another spot. } else { if (_vehicle isKindOf "Air") then { if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then { @@ -45,7 +45,7 @@ if (_vehicle isKindOf "Ship") then { TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); - _emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit]; + _emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit]; }; }; diff --git a/addons/dragging/functions/fnc_getWeight.sqf b/addons/dragging/functions/fnc_getWeight.sqf index dcdcbbf3fe..0fbee19d41 100644 --- a/addons/dragging/functions/fnc_getWeight.sqf +++ b/addons/dragging/functions/fnc_getWeight.sqf @@ -39,7 +39,7 @@ _totalWeight = 0; ]; // add Weight of create to totalWeight -_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeof _object >> "mass")); +_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> "mass")); // Mass in Arma isn't an exact amount but rather a volume/weight value. This attempts to work around that by making it a usable value. (sort of). _totalWeight * 0.5 diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 74e4dfca11..d204ad7bad 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -30,10 +30,10 @@ _result = true; if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false}; -if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then { +if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then { private ["_exp", "_previousExp"]; _previousExp = _item select 0; - _exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive"); + _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive"); if (_exp != "") then { _exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"]; _exp setDir (getDir _previousExp); diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index 878f44cf9a..d9122139b7 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -1,6 +1,6 @@ /* * Author: PabstMirror - * Checks if object is a fence. Should work on any fence type, even (typeof == ""). + * Checks if object is a fence. Should work on any fence type, even (typeOf == ""). * Call is fairly expensive because of all of the string checking. * * Arguments: diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index 4d13d3823e..ff2f95a92e 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -20,12 +20,12 @@ params ["_oldBody", "_caller"]; if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies _name = _oldBody getvariable ["ACE_name", "unknown"]; -_class = typeof _oldBody; +_class = typeOf _oldBody; _side = side _caller; _group = createGroup _side; _position = getPos _oldBody; -_newUnit = _group createUnit [typeof _oldBody, _position, [], 0, "NONE"]; +_newUnit = _group createUnit [typeOf _oldBody, _position, [], 0, "NONE"]; _newUnit setVariable ["ACE_name", _name, true]; _newUnit disableAI "TARGET"; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 41013b7fe5..56b7cce091 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -9,7 +9,7 @@ { [_x] call { params ["_logic"]; - private _logicType = typeof _logic; + private _logicType = typeOf _logic; _logic hideobject true; if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index f6421c71a9..109a4c502a 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -85,7 +85,7 @@ if (_activated) then { case 1: { _addonsList = []; { - _addonsList = _addonsList + (unitaddons typeof _x); + _addonsList = _addonsList + (unitaddons typeOf _x); } foreach (entities "all"); removeallcuratoraddons _logic; _logic addcuratoraddons _addonsList; @@ -210,7 +210,7 @@ if (_activated) then { //--- Activated all future addons _addons = []; { - if (typeof _x == "ModuleCuratorAddAddons_F") then { + if (typeOf _x == "ModuleCuratorAddAddons_F") then { _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); { if !(_x in _addons) then {_addons set [count _addons,_x];}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 6b4df325fa..96ba99c903 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ _units = _this select 1; _activated = _this select 2; if (_activated) then { - _explosive = gettext (configfile >> "CfgVehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index bdbd43b30e..f88ea5d391 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,11 +39,11 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; if (_ammo != "") then { _CfgAmmo = configfile >> "CfgAmmo" >> _ammo; //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; - _dirVar = _fnc_scriptname + typeof _logic; + _dirVar = _fnc_scriptname + typeOf _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; @@ -194,6 +194,6 @@ if (_activated) then { deletevehicle _logic; }; } else { - ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error; + ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; }; }; From 5e41643cffc2c3e286d422b806bdb7304644e31d Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:21:28 +0100 Subject: [PATCH 07/18] fix pushBack capitalization --- addons/cargo/functions/fnc_loadItem.sqf | 2 +- .../functions/fnc_validateCargoSpace.sqf | 2 +- .../functions/fnc__handleSyncedEvent.sqf | 2 +- .../functions/fnc_sortAlphabeticallyBy.sqf | 6 +++--- .../medical/functions/fnc_actionDiagnose.sqf | 14 ++++++------- .../functions/fnc_addHeartRateAdjustment.sqf | 2 +- addons/medical/functions/fnc_addToLog.sqf | 6 +++--- .../medical/functions/fnc_addToTriageCard.sqf | 2 +- .../functions/fnc_addUnconsciousCondition.sqf | 2 +- .../fnc_displayPatientInformation.sqf | 20 +++++++++---------- .../functions/fnc_displayTriageCard.sqf | 2 +- .../functions/fnc_handleBandageOpening.sqf | 2 +- .../functions/fnc_handleDamage_fractures.sqf | 2 +- .../functions/fnc_handleDamage_wounds.sqf | 2 +- .../functions/fnc_handleDamage_woundsOld.sqf | 6 +++--- .../functions/fnc_onMedicationUsage.sqf | 4 ++-- .../functions/fnc_onPropagateWound.sqf | 2 +- .../functions/fnc_parseConfigForInjuries.sqf | 14 ++++++------- .../functions/fnc_treatmentIVLocal.sqf | 2 +- addons/medical/functions/fnc_useItems.sqf | 4 ++-- .../functions/fnc_handleUI_DisplayOptions.sqf | 2 +- addons/modules/functions/fnc_moduleInit.sqf | 2 +- addons/optionsmenu/XEH_postInit.sqf | 4 ++-- addons/repair/functions/fnc_useItems.sqf | 4 ++-- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index 45746a93fd..74a0e78f29 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"]; if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false}; _loaded = _vehicle getVariable [QGVAR(loaded), []]; -_loaded pushback _item; +_loaded pushBack _item; _vehicle setVariable [QGVAR(loaded), _loaded, true]; TRACE_1("added to loaded array",_loaded); diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index 7634b131e6..19b93f1538 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -25,7 +25,7 @@ _newLoaded = []; _totalSpaceOccupied = 0; { if ((typeName _x == "STRING") || {!isNull _x}) then { - _newLoaded pushback _x; + _newLoaded pushBack _x; _totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem)); }; true diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf index 3ea516513f..a14ee2680e 100644 --- a/addons/common/functions/fnc__handleSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleSyncedEvent.sqf @@ -32,7 +32,7 @@ if (isServer) then { private "_eventLog"; _eventLog = _internalData select 1; - _eventLog pushback [ACE_diagTime, _args, _ttl]; + _eventLog pushBack [ACE_diagTime, _args, _ttl]; }; }; diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index 287c4566d5..799e776926 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -25,8 +25,8 @@ _elements = []; { _theElement = toArray (_x select _elementN); - _indexes pushback _foreachIndex; - _elements pushback _theElement; + _indexes pushBack _foreachIndex; + _elements pushBack _theElement; } forEach _array; for "_i" from 1 to (count _elements) - 1 do { @@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do { _returnArray = []; { - _returnArray pushback (_array select _x); + _returnArray pushBack (_array select _x); } forEach _indexes; _returnArray diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 072b9b1a7e..09fd399581 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -21,25 +21,25 @@ _genericMessages = [LSTRING(diagnoseMessage)]; _genericMessages pushBack ([_target] call EFUNC(common,getName)); if (alive _target) then { - _genericMessages pushback LSTRING(diagnoseAlive); + _genericMessages pushBack LSTRING(diagnoseAlive); } else { - _genericMessages pushback LSTRING(diagnoseDead); + _genericMessages pushBack LSTRING(diagnoseDead); }; if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { - _genericMessages pushback LSTRING(lostBloodALot); + _genericMessages pushBack LSTRING(lostBloodALot); } else { - _genericMessages pushback LSTRING(lostBlood); + _genericMessages pushBack LSTRING(lostBlood); }; } else { - _genericMessages pushback LSTRING(noBloodloss); + _genericMessages pushBack LSTRING(noBloodloss); }; if (alive _target) then { if (_target getvariable[QGVAR(hasPain), false]) then { - _genericMessages pushback LSTRING(inPain); + _genericMessages pushBack LSTRING(inPain); } else { - _genericMessages pushback LSTRING(noPain); + _genericMessages pushBack LSTRING(noPain); }; }; diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 9f2e7a8bf9..8735a2a2d6 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -20,6 +20,6 @@ params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]]; _adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; -_adjustment pushback [_value, _time, _callBack]; +_adjustment pushBack [_value, _time, _callBack]; _unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; ["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 22f59f205c..a7444003ec 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -35,18 +35,18 @@ if (count _log >= 8) then { { // ensure the first element will not be added if (_foreachIndex > 0) then { - _newLog pushback _x; + _newLog pushBack _x; }; } foreach _log; _log = _newLog; }; -_log pushback [_message, _moment, _type, _arguments]; +_log pushBack [_message, _moment, _type, _arguments]; _unit setvariable [_logVarName, _log, true]; ["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); _logs = _unit getvariable [QGVAR(allLogs), []]; if !(_logVarName in _logs) then { - _logs pushback _logVarName; + _logs pushBack _logVarName; _unit setvariable [QGVAR(allLogs), _logs, true]; }; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 56104bf5e4..0576500341 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -38,7 +38,7 @@ _amount = 1; } foreach _log; if (!_inList) then { - _log pushback [_newItem, 1, ACE_gameTime]; + _log pushBack [_newItem, 1, ACE_gameTime]; }; _unit setvariable [QGVAR(triageCard), _log, true]; ["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addUnconsciousCondition.sqf b/addons/medical/functions/fnc_addUnconsciousCondition.sqf index 6a867088da..4936abb5ef 100644 --- a/addons/medical/functions/fnc_addUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_addUnconsciousCondition.sqf @@ -18,7 +18,7 @@ if (isnil QGVAR(unconsciousConditions)) then { if (typeName _this == typeName []) then { { if (typeName _x == typeName {}) then { - GVAR(unconsciousConditions) pushback _x; + GVAR(unconsciousConditions) pushBack _x; }; } foreach _this; }; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 183b878ba6..667b7a184b 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -56,21 +56,21 @@ if (_show) then { if (GVAR(level) >= 2 && {([_unit] call FUNC(hasMedicalEnabled))}) then { _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN; - _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; + _genericMessages pushBack [localize _partText, [1, 1, 1, 1]]; }; if (_target getvariable[QGVAR(isBleeding), false]) then { - _genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]]; + _genericMessages pushBack [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]]; }; if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { - _genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]]; + _genericMessages pushBack [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]]; }; if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { - _genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; + _genericMessages pushBack [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; }; if (_target getvariable[QGVAR(hasPain), false]) then { - _genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]]; + _genericMessages pushBack [localize LSTRING(Status_Pain), [1, 1, 1, 1]]; }; _totalIvVolume = 0; @@ -82,7 +82,7 @@ if (_show) then { }; } foreach GVAR(IVBags); if (_totalIvVolume >= 1) then { - _genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; + _genericMessages pushBack [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; }; _damaged = [false, false, false, false, false, false]; @@ -101,10 +101,10 @@ if (_show) then { // Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this] if (_amountOf >= 1) then { // TODO localization - _allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]]; + _allInjuryTexts pushBack [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]]; } else { // TODO localization - _allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]]; + _allInjuryTexts pushBack [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]]; }; }; }; @@ -122,10 +122,10 @@ if (_show) then { if (_amountOf > 0) then { if (_amountOf >= 1) then { // TODO localization - _allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]]; + _allInjuryTexts pushBack [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]]; } else { // TODO localization - _allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]]; + _allInjuryTexts pushBack [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]]; }; }; }; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 7454b76451..1355c7d11a 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -54,7 +54,7 @@ if (_show) then { _message = localize _message; }; }; - _triageCardTexts pushback format["%1x - %2", _amount, _message]; + _triageCardTexts pushBack format["%1x - %2", _amount, _message]; } foreach _log; if (count _triageCardTexts == 0) then { diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 3ae7166a89..a16d1fdd44 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -69,7 +69,7 @@ _bandagedInjury = []; if !(_exist) then { // [ID, classID, bodypart, percentage treated, bloodloss rate] _bandagedInjury = [_injury select 0, _injury select 1, _injury select 2, _impact, _injury select 4]; - _bandagedWounds pushback _bandagedInjury; + _bandagedWounds pushBack _bandagedInjury; }; _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 46000dbbdf..fd6b845930 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -65,6 +65,6 @@ if (_amountOfDamage > 0.05) then { if (_amountOf > 0) then { _fractureID = (_fractures select (_amountOf - 1) select 0) + 1; }; - _fractures pushback [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; + _fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; _unit setvariable [QGVAR(fractures), _fractures, true]; }; diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 05c7165cd2..e95cc7f0e1 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -44,7 +44,7 @@ _foundIndex = -1; if (_foundIndex < 0) then { // Since it is a new injury, we will have to add it to the open wounds array to store it - _openWounds pushback _x; + _openWounds pushBack _x; } else { // We already have one of these, so we are just going to increase the number that we have of it with a new one. _injury = _openWounds select _foundIndex; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index fabc642915..ab2afc13d4 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -64,7 +64,7 @@ _allPossibleInjuries = []; }; // Store the valid possible injury for the damage type, damage amount and selection - _allPossibleInjuries pushback _x; + _allPossibleInjuries pushBack _x; }; }; } foreach _allInjuriesForDamageType; @@ -104,7 +104,7 @@ _woundsCreated = []; _injury = [_woundID, _toAddInjury select 0, _bodyPartNToAdd, 1, _toAddInjury select 2]; // Since it is a new injury, we will have to add it to the open wounds array to store it - _openWounds pushback _injury; + _openWounds pushBack _injury; // New injuries will also increase the wound ID _woundID = _woundID + 1; @@ -114,7 +114,7 @@ _woundsCreated = []; _injury set [3, (_injury select 3) + 1]; }; // Store the injury so we can process it later correctly. - _woundsCreated pushback _injury; + _woundsCreated pushBack _injury; // Collect the pain that is caused by this injury _painToAdd = _painToAdd + (_toAddInjury select 3); diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index a85f775e48..22186ef0d9 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -27,7 +27,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; _x params ["_variableX", "_allMedsFromClassname"]; if (_variableX== _variable) exitWith { if !(_className in _allMedsFromClassname) then { - _allMedsFromClassname pushback _className; + _allMedsFromClassname pushBack _className; _x set [1, _allMedsFromClassname]; _allUsedMedication set [_foreachIndex, _x]; _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; @@ -37,7 +37,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; } foreach _allUsedMedication; if (!_foundEntry) then { - _allUsedMedication pushback [_variable, [_className]]; + _allUsedMedication pushBack [_variable, [_className]]; _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; }; diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index c9c6f34ca7..d88813e300 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -30,7 +30,7 @@ if (!local _unit) then { } foreach _openWounds; if (!_exists) then { - _openWounds pushback _injury; + _openWounds pushBack _injury; }; _unit setvariable [QGVAR(openWounds), _openWounds]; }; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 839769e595..95b378cd4f 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -25,14 +25,14 @@ GVAR(minLethalDamages) = []; for "_i" from 0 to (count _configDamageTypes -1) /* step +1 */ do { // Only get the subclasses in damageType class if (isClass(_configDamageTypes select _i)) then { - _allFoundDamageTypes pushback (configName (_configDamageTypes select _i)); + _allFoundDamageTypes pushBack (configName (_configDamageTypes select _i)); _minLethalDamage = if (isNumber((_configDamageTypes select _i) >> "lethalDamage")) then { getNumber((_configDamageTypes select _i) >> "lethalDamage"); } else { _defaultMinLethalDamage }; - GVAR(minLethalDamages) pushback _minLethalDamage; + GVAR(minLethalDamages) pushBack _minLethalDamage; }; }; GVAR(allAvailableDamageTypes) = _allFoundDamageTypes; @@ -54,8 +54,8 @@ _parseForSubClassWounds = { _subClasscauses = if (isArray(_subClassConfig >> "causes")) then { getArray(_subClassConfig >> "causes");} else { _causes }; _subClassDisplayName = if (isText(_subClassConfig >> "name")) then { getText(_subClassConfig >> "name");} else {_classDisplayName + " " + _subClass}; if (count _selections > 0 && {count _causes > 0}) then { - GVAR(woundClassNames) pushback _subClasstype; - _allWoundClasses pushback [_classID, _subClassselections, _subClassbloodLoss, _subClasspain, [_subClassminDamage, _subClassmaxDamage], _subClasscauses, _subClassDisplayName]; + GVAR(woundClassNames) pushBack _subClasstype; + _allWoundClasses pushBack [_classID, _subClassselections, _subClassbloodLoss, _subClasspain, [_subClassminDamage, _subClassmaxDamage], _subClasscauses, _subClassDisplayName]; _classID = _classID + 1; }; true; @@ -86,8 +86,8 @@ if (isClass _woundsConfig) then { // There were no subclasses, so we will add this one instead. if (count _selections > 0 && count _causes > 0) then { - GVAR(woundClassNames) pushback _classType; - _allWoundClasses pushback [_classID, _selections, _bloodLoss, _pain, [_minDamage, _maxDamage], _causes, _classDisplayName]; + GVAR(woundClassNames) pushBack _classType; + _allWoundClasses pushBack [_classID, _selections, _bloodLoss, _pain, [_minDamage, _maxDamage], _causes, _classDisplayName]; _classID = _classID + 1; }; true; @@ -107,7 +107,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); { // Check if this type is in the causes of a wound class, if so, we will store the wound types for this damage type if (_type in (_x select 5)) then { - _woundTypes pushback _x; + _woundTypes pushBack _x; }; } foreach _allWoundClasses; _typeThresholds = _thresholds; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 98927dff0b..bd0f9b623a 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -38,6 +38,6 @@ _varName = format["ACE_Medical_IVVolume_%1",_typeOf]; _target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded, true]; if !(_varName in GVAR(IVBags)) then { - GVAR(IVBags) pushback _varName; + GVAR(IVBags) pushBack _varName; publicVariable QGVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index 85e01b4fb8..f82c46b2ea 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -24,14 +24,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; } foreach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; }; } foreach _items; diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index 3e646ddaf5..9fb41eb97f 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -77,7 +77,7 @@ if (_name isEqualTo "triage") exitWith { _message = localize _message; }; }; - _triageCardTexts pushback format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)]; + _triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)]; nil; } count _log; diff --git a/addons/modules/functions/fnc_moduleInit.sqf b/addons/modules/functions/fnc_moduleInit.sqf index 30d8046d81..5d42b4fa87 100644 --- a/addons/modules/functions/fnc_moduleInit.sqf +++ b/addons/modules/functions/fnc_moduleInit.sqf @@ -15,5 +15,5 @@ #include "script_component.hpp" if ((_this select 0) isKindOf "Module_F") then { - GVAR(moduleInitCollection) pushback (_this select 0); + GVAR(moduleInitCollection) pushBack (_this select 0); }; diff --git a/addons/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf index a981c34e0b..3db8c607ac 100644 --- a/addons/optionsmenu/XEH_postInit.sqf +++ b/addons/optionsmenu/XEH_postInit.sqf @@ -2,10 +2,10 @@ #include "script_component.hpp" ["SettingsInitialized", { - GVAR(categories) pushback ""; //Ensure All Catagories is at top + GVAR(categories) pushBack ""; //Ensure All Catagories is at top { if !(_x select 8 in GVAR(categories)) then { - GVAR(categories) pushback (_x select 8); + GVAR(categories) pushBack (_x select 8); }; }foreach EGVAR(common,settings); }] call EFUNC(common,addEventHandler); diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index 8771847d4e..990f5e0ab1 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -27,14 +27,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; } forEach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; }; } forEach _items; From 2b05f6f451cfa28bb23c4f408400cc6796a25a0c Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:22:16 +0100 Subject: [PATCH 08/18] fix isNil capitalization --- addons/cargo/functions/fnc_onMenuOpen.sqf | 2 +- addons/common/functions/fnc_blurScreen.sqf | 2 +- addons/common/functions/fnc_onAnswerRequest.sqf | 6 +++--- addons/medical/functions/fnc_addUnconsciousCondition.sqf | 2 +- addons/medical/functions/fnc_canTreat.sqf | 4 ++-- addons/medical/functions/fnc_createLitter.sqf | 2 +- addons/medical/functions/fnc_displayPatientInformation.sqf | 4 ++-- addons/medical/functions/fnc_displayTriageCard.sqf | 2 +- addons/medical/functions/fnc_dropDownTriageCard.sqf | 2 +- addons/medical/functions/fnc_getUnconsciousCondition.sqf | 2 +- addons/medical/functions/fnc_handleUnitVitals.sqf | 2 +- addons/medical/functions/fnc_hasItem.sqf | 2 +- addons/medical/functions/fnc_hasMedicalEnabled.sqf | 2 +- addons/medical/functions/fnc_treatment.sqf | 6 +++--- addons/medical/functions/fnc_useItem.sqf | 2 +- addons/modules/XEH_postInit.sqf | 2 +- addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf | 4 ++-- addons/repair/functions/fnc_canRepair.sqf | 4 ++-- addons/repair/functions/fnc_repair.sqf | 6 +++--- addons/zeus/functions/fnc_bi_moduleCurator.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleProjectile.sqf | 4 ++-- 21 files changed, 32 insertions(+), 32 deletions(-) diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index 85557835bf..69c5db8e35 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -25,7 +25,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display]; private ["_display","_loaded", "_ctrl", "_class", "_label"]; disableSerialization; _display = uiNamespace getVariable QGVAR(menuDisplay); - if (isnil "_display") exitWith { + if (isNil "_display") exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/common/functions/fnc_blurScreen.sqf b/addons/common/functions/fnc_blurScreen.sqf index a3394a1fbf..005f422bc1 100644 --- a/addons/common/functions/fnc_blurScreen.sqf +++ b/addons/common/functions/fnc_blurScreen.sqf @@ -28,7 +28,7 @@ if (_show) then { GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id; // show blur - if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then { + if (isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then { GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102]; GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9]; GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true; diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index b1639eb970..35b719bfda 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -18,7 +18,7 @@ private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_reques _info = _unit getvariable _id; -if (!isnil "_info") then { +if (!isNil "_info") then { _caller = _info select 0; _target = _info select 1; _requestID = _info select 2; @@ -31,11 +31,11 @@ if (!isnil "_info") then { GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil; -if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then { +if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then { _unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT); GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT) = nil; }; -if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then { +if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then { _unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE); GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil; }; diff --git a/addons/medical/functions/fnc_addUnconsciousCondition.sqf b/addons/medical/functions/fnc_addUnconsciousCondition.sqf index 4936abb5ef..3ded97f355 100644 --- a/addons/medical/functions/fnc_addUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_addUnconsciousCondition.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -if (isnil QGVAR(unconsciousConditions)) then { +if (isNil QGVAR(unconsciousConditions)) then { GVAR(unconsciousConditions) = []; }; if (typeName _this == typeName []) then { diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index a23e012e5d..93a114599c 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -52,7 +52,7 @@ if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) ex _return = true; if (getText (_config >> "condition") != "") then { _condition = getText (_config >> "condition"); - if (isnil _condition) then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getvariable _condition; @@ -83,7 +83,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI if (_x == "field") exitWith {_return = true;}; if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; - if !(isnil _x) exitWith { + if !(isNil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 4341fdd704..4e68edd124 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -66,7 +66,7 @@ _createdLitter = []; if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower. - if (isnil _litterCondition) then { + if (isNil _litterCondition) then { _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; } else { _litterCondition = missionNamespace getvariable _litterCondition; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 667b7a184b..77f5c690cb 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -47,7 +47,7 @@ if (_show) then { disableSerialization; _display = uiNamespace getvariable QGVAR(DisplayInformation); - if (isnil "_display") exitWith { + if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -77,7 +77,7 @@ if (_show) then { { private "_value"; _value = _target getvariable _x; - if !(isnil "_value") then { + if !(isNil "_value") then { _totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); }; } foreach GVAR(IVBags); diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 1355c7d11a..b691b3db4b 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -33,7 +33,7 @@ if (_show) then { disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); - if (isnil "_display") exitWith { + if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index d44d1fed7c..b3cead3cba 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -18,7 +18,7 @@ params ["_show"]; disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); -if (isnil "_display") exitWith {}; +if (isNil "_display") exitWith {}; _pos = [0,0,0,0]; if (_show) then { diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index 70f820d6a0..19d1c85020 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -16,7 +16,7 @@ private ["_unit","_return"]; params ["_unit"]; -if (isnil QGVAR(unconsciousConditions)) then { +if (isNil QGVAR(unconsciousConditions)) then { GVAR(unconsciousConditions) = []; }; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index 0fa3607b52..8d52355b7c 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -184,7 +184,7 @@ if (GVAR(level) >= 2) then { { private "_value"; _value = _unit getvariable _x; - if !(isnil "_value") then { + if !(isNil "_value") then { _unit setvariable [_x,(_unit getvariable [_x, 0]), true]; }; } foreach GVAR(IVBags); diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index e70144f617..bc154fa792 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -18,7 +18,7 @@ private ["_medic", "_patient", "_item", "_return", "_crew"]; params ["_medic", "_patient", "_item"]; -if (isnil QGVAR(setting_allowSharedEquipment)) then { +if (isNil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith { diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index 44f653286a..88dc084924 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -20,7 +20,7 @@ private "_medicalEnabled"; params ["_unit"]; _medicalEnabled = _unit getvariable QGVAR(enableMedical); -if (isnil "_medicalEnabled") exitWith { +if (isNil "_medicalEnabled") exitWith { (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) }; diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 9b373df77e..50f34f765a 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -60,7 +60,7 @@ _return = true; if (isText (_config >> "Condition")) then { _condition = getText(_config >> "condition"); if (_condition != "") then { - if (isnil _condition) then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getvariable _condition; @@ -95,7 +95,7 @@ if ("All" in _locations) then { if (_x == "field") exitWith {_return = true;}; if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; - if !(isnil _x) exitWith { + if !(isNil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { @@ -200,7 +200,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { } else { if (isText (_config >> "treatmentTime")) exitWith { _treatmentTimeConfig = getText(_config >> "treatmentTime"); - if (isnil _treatmentTimeConfig) then { + if (isNil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index ed2d402bc6..e9be5cf359 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -19,7 +19,7 @@ private ["_return","_crew"]; params ["_medic", "_patient", "_item"]; -if (isnil QGVAR(setting_allowSharedEquipment)) then { +if (isNil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 56b7cce091..bbc27b7eef 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -21,7 +21,7 @@ private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; private _isSingular = getNumber (_config >> "isSingular") > 0; private _function = getText (_config >> "function"); - if (isnil _function) then { + if (isNil _function) then { _function = compile _function; } else { _function = missionNamespace getvariable _function; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index 755982e569..1f09ff271c 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -67,7 +67,7 @@ _text = format [" { _var = missionNamespace getVariable [_x, nil]; - if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then { + if(!isNil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 - ARRAY SIZE: %2", _x, (count _var)]; [_text] call _outputText; }; @@ -77,7 +77,7 @@ _text = format [" _unit = _x; { _var = _unit getVariable [_x, nil]; - if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then { + if(!isNil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 on [%2] - ARRAY SIZE: %3", _x, _unit, (count _var)]; [_text] call _outputText; }; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index a12a61104f..d4ffb23886 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -54,7 +54,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa _return = true; if (getText (_config >> "condition") != "") then { _condition = getText (_config >> "condition"); - if (isnil _condition) then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -86,7 +86,7 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if !(isnil _x) exitWith { + if !(isNil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 841ede0ea0..cf2d4276cf 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -54,7 +54,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa _return = true; if (getText (_config >> "condition") != "") then { _condition = getText (_config >> "condition"); - if (isnil _condition) then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -85,7 +85,7 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if !(isnil _x) exitWith { + if !(isNil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { @@ -162,7 +162,7 @@ _repairTime = if (isNumber (_config >> "repairingTime")) then { } else { if (isText (_config >> "repairingTime")) exitWith { _repairTimeConfig = getText(_config >> "repairingTime"); - if (isnil _repairTimeConfig) then { + if (isNil _repairTimeConfig) then { _repairTimeConfig = compile _repairTimeConfig; } else { _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 109a4c502a..88f85557a7 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -319,7 +319,7 @@ if (_activated) then { //--- Show hint about pinging for players if ( - isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} + isNil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} && {isTutHintsEnabled} && diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index f88ea5d391..534b4fce10 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -_fnc_scriptNameParentTemp = if !(isnil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'}; +_fnc_scriptNameParentTemp = if !(isNil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'}; private ['_fnc_scriptNameParent']; _fnc_scriptNameParent = _fnc_scriptNameParentTemp; _fnc_scriptNameParentTemp = nil; @@ -128,7 +128,7 @@ if (_activated) then { if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; // Added by ace_zeus for ace_frag compatibility - if (!isnil QEFUNC(frag,addPfhRound)) then { + if (!isNil QEFUNC(frag,addPfhRound)) then { [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); }; From a8228f60c260aae6ec35e29e962cafc62c4d5a7f Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:23:02 +0100 Subject: [PATCH 09/18] fix configFile capitalization --- addons/cargo/functions/fnc_onMenuOpen.sqf | 2 +- addons/explosives/functions/fnc_placeExplosive.sqf | 4 ++-- addons/magazinerepack/functions/fnc_getMagazineChildren.sqf | 2 +- .../magazinerepack/functions/fnc_magazineRepackFinish.sqf | 2 +- .../magazinerepack/functions/fnc_startRepackingMagazine.sqf | 2 +- addons/markers/XEH_preInit.sqf | 4 ++-- addons/markers/functions/fnc_onLBSelChangedColor.sqf | 2 +- addons/markers/functions/fnc_onLBSelChangedShape.sqf | 2 +- addons/markers/functions/fnc_setMarkerJIP.sqf | 4 ++-- addons/markers/functions/fnc_setMarkerNetwork.sqf | 4 ++-- .../functions/fnc_getWheelHitPointsWithSelections.sqf | 2 +- addons/respawn/functions/fnc_restoreGear.sqf | 2 +- addons/safemode/functions/fnc_unlockSafety.sqf | 2 +- addons/sandbag/functions/fnc_canDeploy.sqf | 2 +- addons/weaponselect/XEH_preInit.sqf | 6 +++--- addons/zeus/functions/fnc_bi_moduleCurator.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleProjectile.sqf | 6 +++--- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index 69c5db8e35..fbd4a63cac 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -41,7 +41,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display]; lbClear _ctrl; { _class = if (typeName _x == "STRING") then {_x} else {typeOf _x}; - _ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName")); + _ctrl lbAdd (getText(configFile >> "CfgVehicles" >> _class >> "displayName")); true } count _loaded; diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index 5e4999b1f4..e1cdbcd80c 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -62,8 +62,8 @@ if (isNumber (_magazineTrigger >> "digDistance")) then { _canDigDown = true; _surfaceType = surfaceType _pos; if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];}; - if ((_surfaceType != "") || {isClass (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then { - _soundEnviron = getText (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron"); + if ((_surfaceType != "") || {isClass (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then { + _soundEnviron = getText (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron"); TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron); _canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]); }; diff --git a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf index 34e369199f..fc875c8d2b 100644 --- a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf +++ b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf @@ -27,7 +27,7 @@ _unitMagCounts = []; private "_xFullMagazineCount"; _x params ["_xClassname", "_xCount", "_xLoaded", "_xType"]; - _xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count"); + _xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count"); //for every partial magazine, that is either in inventory or can be moved there if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then { diff --git a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf index ab380cb1ed..f0fbcf49c1 100644 --- a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf +++ b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf @@ -24,7 +24,7 @@ private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_ful params ["_args", "_elapsedTime", "_totalTime", "_errorCode"]; _args params ["_magazineClassname", "_lastAmmoCount"]; -_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count"); +_fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count"); //Don't show anything if player can't interact: if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index 736b6c0890..859bbdfdfa 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -24,7 +24,7 @@ private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts", params ["_target", "_player", "_magazineClassname"]; if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");}; -_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname; +_magazineCfg = configFile >> "CfgMagazines" >> _magazineClassname; // Calculate actual ammo to transfer during repack _fullMagazineCount = getNumber (_magazineCfg >> "count"); //Is linked belt magazine: diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index e47514f4fa..7a9677f17d 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -16,7 +16,7 @@ private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"]; // init marker types if (isNil QGVAR(MarkersCache)) then { - _config = configfile >> "CfgMarkers"; + _config = configFile >> "CfgMarkers"; GVAR(MarkersCache) = []; for "_a" from 0 to (count _config - 1) do { @@ -32,7 +32,7 @@ if (isNil QGVAR(MarkersCache)) then { // init marker colors if (isNil QGVAR(MarkerColorsCache)) then { - _config = configfile >> "CfgMarkerColors"; + _config = configFile >> "CfgMarkerColors"; GVAR(MarkerColorsCache) = []; for "_a" from 0 to (count _config - 1) do { diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index 0b9c5af209..6f0139e327 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -25,6 +25,6 @@ _data = _ctrl lbValue _index; GVAR(curSelMarkerColor) = _index; -_config = (configfile >> "CfgMarkerColors") select _data; +_config = (configFile >> "CfgMarkerColors") select _data; GVAR(currentMarkerColorConfigName) = (configName _config); diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index c8587e6205..f9fc48730f 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -25,6 +25,6 @@ _data = _ctrl lbValue _index; GVAR(curSelMarkerShape) = _index; -_config = (configfile >> "CfgMarkers") select _data; +_config = (configFile >> "CfgMarkers") select _data; GVAR(currentMarkerConfigName) = (configName _config); diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 4e6b47b46b..acdda408df 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -29,14 +29,14 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic); _data = _allMapMarkersProperties select _index; _data params ["_name", "_color", "_pos", "_dir"]; - _config = (configfile >> "CfgMarkers") >> _name; + _config = (configFile >> "CfgMarkers") >> _name; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); _config == (configFile >> "CfgMarkers" >> "MilDot"); }; _x setMarkerTypeLocal (configName _config); - _config = (configfile >> "CfgMarkerColors") >> _color; + _config = (configFile >> "CfgMarkerColors") >> _color; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); _config == (configFile >> "CfgMarkerColors" >> "Default"); diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index c56a1fb93c..61a0a74e3a 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -24,14 +24,14 @@ _data params ["_markerClassname", "_colorClassname", "_markerPos", "_markerDir"] TRACE_2("params",_marker,_data); -_config = (configfile >> "CfgMarkers") >> _markerClassname; +_config = (configFile >> "CfgMarkers") >> _markerClassname; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); _config == (configFile >> "CfgMarkers" >> "MilDot"); }; _marker setMarkerTypeLocal (configName _config); -_config = (configfile >> "CfgMarkerColors") >> _colorClassname; +_config = (configFile >> "CfgMarkerColors") >> _colorClassname; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); _config == (configFile >> "CfgMarkerColors" >> "Default"); diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index 182c6f54f0..c2d818c27b 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_vehicle); // get the vehicles wheel config private "_wheels"; -_wheels = configfile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; +_wheels = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; // exit with nothing if the vehicle has no wheels class if !(isClass _wheels) exitWith {[[],[]]}; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index a0ca2aa35e..af3acb7fb4 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -27,7 +27,7 @@ _activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponM if ( (_activeMuzzle != "") && {_activeMuzzle != _activeWeapon} && - {_activeMuzzle in getArray (configfile >> "CfgWeapons" >> _activeWeapon >> "muzzles")} + {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")} ) then { _unit selectWeapon _activeMuzzle; } else { diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index ef01766872..b1c2fda540 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -48,7 +48,7 @@ if (inputAction "nextWeapon" > 0) then { _modes pushBack _weapon; }; nil - } count getArray (configfile >> "CfgWeapons" >> _weapon >> "modes"); + } count getArray (configFile >> "CfgWeapons" >> _weapon >> "modes"); // select last mode _mode = _modes select (count _modes - 1); diff --git a/addons/sandbag/functions/fnc_canDeploy.sqf b/addons/sandbag/functions/fnc_canDeploy.sqf index d26569f4ab..b9bd025dff 100644 --- a/addons/sandbag/functions/fnc_canDeploy.sqf +++ b/addons/sandbag/functions/fnc_canDeploy.sqf @@ -24,6 +24,6 @@ if !("ACE_Sandbag_empty" in items _unit) exitWith {false}; private ["_surfaceClass", "_surfaceType"]; _surfaceClass = (surfaceType getPosASL _unit) select [1]; -_surfaceType = getText (configfile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); +_surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); !(_surfaceType in SURFACE_BLACKLIST) diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 1f324f7fb0..fe40d33523 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -25,13 +25,13 @@ private ["_magazines", "_ammo", "_explosive"]; GVAR(GrenadesAll) append _magazines; { - _ammo = getText (configfile >> "CfgMagazines" >> _x >> "ammo"); - _explosive = getNumber (configfile >> "CfgAmmo" >> _ammo >> "explosive"); + _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); + _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive"); ([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x; false } count _magazines; false -} count getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"); +} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); ADDON = true; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 88f85557a7..c4be62101b 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -68,7 +68,7 @@ if (_activated) then { //--- All (including unofficial ones) case 3: { - _cfgPatches = configfile >> "Cfgpatches"; + _cfgPatches = configFile >> "Cfgpatches"; for "_i" from 0 to (count _cfgPatches - 1) do { _class = _cfgPatches select _i; if (isclass _class) then {_addons set [count _addons,configname _class];}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 96ba99c903..3418139b32 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ _units = _this select 1; _activated = _this select 2; if (_activated) then { - _explosive = gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "explosive"); + _explosive = gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 534b4fce10..013e746f8b 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,9 +39,9 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; if (_ammo != "") then { - _CfgAmmo = configfile >> "CfgAmmo" >> _ammo; + _CfgAmmo = configFile >> "CfgAmmo" >> _ammo; //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeOf _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction @@ -49,7 +49,7 @@ if (_activated) then { _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configfile >> "CfgAmmo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configFile >> "CfgAmmo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; From b3950bd7f06c6b5f0c22cdb772210bb1f3a2be17 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:23:48 +0100 Subject: [PATCH 10/18] fix forEach capitalization --- addons/cargo/functions/fnc_startLoadIn.sqf | 2 +- addons/common/functions/fnc_displayIcon.sqf | 10 ++++---- .../functions/fnc_displayTextStructured.sqf | 4 ++-- addons/common/functions/fnc_errorMessage.sqf | 2 +- .../fnc_readSettingsFromParamsArray.sqf | 2 +- .../functions/fnc_sortAlphabeticallyBy.sqf | 2 +- .../functions/fnc_vehicleDamage.sqf | 2 +- .../functions/fnc_addToSpeedDial.sqf | 2 +- .../functions/fnc_renderMenu.sqf | 2 +- .../functions/fnc_updateDisplay.sqf | 2 +- addons/medical/functions/fnc_addToLog.sqf | 4 ++-- .../medical/functions/fnc_addToTriageCard.sqf | 6 ++--- .../functions/fnc_addUnconsciousCondition.sqf | 2 +- addons/medical/functions/fnc_canTreat.sqf | 2 +- addons/medical/functions/fnc_createLitter.sqf | 4 ++-- .../fnc_displayPatientInformation.sqf | 24 +++++++++---------- .../functions/fnc_displayTriageCard.sqf | 4 ++-- addons/medical/functions/fnc_getBloodLoss.sqf | 4 ++-- .../functions/fnc_getBloodVolumeChange.sqf | 4 ++-- .../functions/fnc_getHeartRateChange.sqf | 8 +++---- .../functions/fnc_getUnconsciousCondition.sqf | 2 +- .../functions/fnc_handleBandageOpening.sqf | 8 +++---- .../functions/fnc_handleCreateLitter.sqf | 2 +- .../functions/fnc_handleDamage_basic.sqf | 8 +++---- .../functions/fnc_handleDamage_caching.sqf | 4 ++-- .../functions/fnc_handleDamage_wounds.sqf | 6 ++--- .../functions/fnc_handleDamage_woundsOld.sqf | 10 ++++---- .../functions/fnc_handleUnitVitals.sqf | 2 +- addons/medical/functions/fnc_hasItem.sqf | 2 +- addons/medical/functions/fnc_hasItems.sqf | 2 +- addons/medical/functions/fnc_init.sqf | 4 ++-- .../functions/fnc_isInMedicalFacility.sqf | 4 ++-- .../functions/fnc_isInStableCondition.sqf | 2 +- .../functions/fnc_modifyMedicalAction.sqf | 2 +- .../fnc_moduleAssignMedicalFacility.sqf | 2 +- .../functions/fnc_onMedicationUsage.sqf | 8 +++---- .../functions/fnc_onPropagateWound.sqf | 4 ++-- .../functions/fnc_onWoundUpdateRequest.sqf | 2 +- .../functions/fnc_parseConfigForInjuries.sqf | 14 +++++------ addons/medical/functions/fnc_treatment.sqf | 2 +- .../fnc_treatmentAdvanced_bandage.sqf | 2 +- .../fnc_treatmentAdvanced_bandageLocal.sqf | 6 ++--- .../fnc_treatmentAdvanced_fullHealLocal.sqf | 2 +- .../fnc_treatmentAdvanced_medication.sqf | 2 +- .../fnc_treatmentBasic_bandageLocal.sqf | 4 ++-- .../functions/fnc_treatment_failure.sqf | 2 +- addons/medical/functions/fnc_useItem.sqf | 2 +- addons/medical/functions/fnc_useItems.sqf | 4 ++-- .../functions/fnc_updateActivityLog.sqf | 2 +- .../functions/fnc_updateQuickViewLog.sqf | 2 +- addons/optionsmenu/XEH_postInit.sqf | 2 +- .../fnc_serverSettingsMenuUpdateKeyView.sqf | 2 +- .../fnc_serverSettingsMenuUpdateList.sqf | 6 ++--- .../fnc_settingsMenuUpdateKeyView.sqf | 2 +- .../functions/fnc_settingsMenuUpdateList.sqf | 4 ++-- .../functions/fnc_stringEscape.sqf | 10 ++++---- .../functions/fnc_updateSetting.sqf | 10 ++++---- .../scopes/functions/fnc_inventoryCheck.sqf | 2 +- .../zeus/functions/fnc_addObjectToCurator.sqf | 2 +- .../zeus/functions/fnc_bi_moduleCurator.sqf | 16 ++++++------- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- .../functions/fnc_bi_moduleProjectile.sqf | 2 +- 62 files changed, 135 insertions(+), 135 deletions(-) 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 { From d037f00a92a5be2a4456c02adf79bbaaef46ee27 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:25:16 +0100 Subject: [PATCH 11/18] fix forEachIndex capitalization --- addons/explosives/functions/fnc_addToSpeedDial.sqf | 2 +- addons/interact_menu/functions/fnc_renderMenu.sqf | 2 +- addons/kestrel4500/functions/fnc_updateDisplay.sqf | 2 +- addons/scopes/functions/fnc_inventoryCheck.sqf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/explosives/functions/fnc_addToSpeedDial.sqf b/addons/explosives/functions/fnc_addToSpeedDial.sqf index 40cd813b5f..7ad0fe76da 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 a3d6333395..573845c08a 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 dd62bd51a5..75c0db2e86 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/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index a21799fe72..c40ca3f8b4 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); }; From a9ebcf8543640f3fa246aab56388e01077632c1a Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:27:09 +0100 Subject: [PATCH 12/18] fix setVariable and getVariable capitalization --- addons/common/ProgressScreen.hpp | 2 +- addons/common/RscInfoType.hpp | 8 +-- addons/common/config.cpp | 2 +- addons/common/define.hpp | 10 +-- .../fnc_addCuratorUnloadEventhandler.sqf | 2 +- addons/common/functions/fnc_debugModule.sqf | 4 +- .../functions/fnc_displayTextStructured.sqf | 8 +-- .../fnc_getAllDefinedSetVariables.sqf | 2 +- .../functions/fnc_getDefinedVariable.sqf | 2 +- addons/common/functions/fnc_isAwake.sqf | 2 +- .../common/functions/fnc_onAnswerRequest.sqf | 4 +- .../fnc_readSettingsFromParamsArray.sqf | 2 +- .../common/functions/fnc_resetAllDefaults.sqf | 6 +- .../functions/fnc_switchToGroupSide.sqf | 2 +- .../functions/fnc_unloadPersonLocal.sqf | 4 +- addons/disarming/gui_disarm.hpp | 14 ++--- addons/dragging/functions/fnc_canCarry.sqf | 2 +- addons/dragging/functions/fnc_canDrag.sqf | 2 +- addons/dragging/functions/fnc_dropObject.sqf | 4 +- .../functions/fnc_dropObject_carry.sqf | 2 +- addons/explosives/ExplosivesUI.hpp | 6 +- addons/hearing/XEH_postInit.sqf | 2 +- addons/hearing/functions/fnc_updateVolume.sqf | 4 +- addons/medical/CfgVehicles.hpp | 4 +- addons/medical/XEH_postInit.sqf | 26 ++++---- .../functions/fnc_actionCheckPulseLocal.sqf | 2 +- .../medical/functions/fnc_actionDiagnose.sqf | 6 +- .../functions/fnc_actionRemoveTourniquet.sqf | 4 +- .../functions/fnc_addHeartRateAdjustment.sqf | 4 +- .../functions/fnc_addToInjuredCollection.sqf | 14 ++--- addons/medical/functions/fnc_addToLog.sqf | 8 +-- .../medical/functions/fnc_addToTriageCard.sqf | 4 +- .../fnc_canAccessMedicalEquipment.sqf | 2 +- addons/medical/functions/fnc_canTreat.sqf | 8 +-- addons/medical/functions/fnc_copyDeadBody.sqf | 14 ++--- addons/medical/functions/fnc_createLitter.sqf | 2 +- .../functions/fnc_determineIfFatal.sqf | 6 +- .../fnc_displayPatientInformation.sqf | 20 +++--- .../functions/fnc_displayTriageCard.sqf | 4 +- .../functions/fnc_dropDownTriageCard.sqf | 2 +- addons/medical/functions/fnc_getBloodLoss.sqf | 8 +-- .../functions/fnc_getBloodPressure.sqf | 2 +- .../functions/fnc_getBloodVolumeChange.sqf | 12 ++-- .../functions/fnc_getCardiacOutput.sqf | 2 +- .../functions/fnc_getHeartRateChange.sqf | 10 +-- .../medical/functions/fnc_getTriageStatus.sqf | 2 +- .../functions/fnc_handleBandageOpening.sqf | 12 ++-- addons/medical/functions/fnc_handleDamage.sqf | 2 +- .../functions/fnc_handleDamage_advanced.sqf | 6 +- .../functions/fnc_handleDamage_airway.sqf | 4 +- .../functions/fnc_handleDamage_basic.sqf | 10 +-- .../functions/fnc_handleDamage_fractures.sqf | 4 +- .../functions/fnc_handleDamage_wounds.sqf | 14 ++--- .../functions/fnc_handleDamage_woundsOld.sqf | 18 +++--- addons/medical/functions/fnc_handleKilled.sqf | 8 +-- addons/medical/functions/fnc_handleLocal.sqf | 8 +-- .../functions/fnc_handleUnitVitals.sqf | 62 +++++++++---------- .../functions/fnc_hasMedicalEnabled.sqf | 4 +- .../functions/fnc_hasTourniquetAppliedTo.sqf | 2 +- addons/medical/functions/fnc_init.sqf | 44 ++++++------- .../functions/fnc_isInStableCondition.sqf | 2 +- .../functions/fnc_modifyMedicalAction.sqf | 4 +- .../fnc_moduleAssignMedicalFacility.sqf | 4 +- .../functions/fnc_onMedicationUsage.sqf | 18 +++--- .../functions/fnc_onPropagateWound.sqf | 4 +- .../functions/fnc_onWoundUpdateRequest.sqf | 2 +- .../functions/fnc_parseConfigForInjuries.sqf | 2 +- .../functions/fnc_playInjuredSound.sqf | 8 +-- .../functions/fnc_requestWoundSync.sqf | 4 +- .../functions/fnc_setCardiacArrest.sqf | 12 ++-- addons/medical/functions/fnc_setDead.sqf | 30 ++++----- .../medical/functions/fnc_setUnconscious.sqf | 4 +- addons/medical/functions/fnc_treatment.sqf | 28 ++++----- .../functions/fnc_treatmentAdvanced_CPR.sqf | 2 +- .../fnc_treatmentAdvanced_CPRLocal.sqf | 12 ++-- .../fnc_treatmentAdvanced_bandageLocal.sqf | 4 +- .../fnc_treatmentAdvanced_fullHealLocal.sqf | 32 +++++----- .../fnc_treatmentAdvanced_medicationLocal.sqf | 20 +++--- .../fnc_treatmentBasic_bandageLocal.sqf | 6 +- .../functions/fnc_treatmentBasic_epipen.sqf | 4 +- .../functions/fnc_treatmentIVLocal.sqf | 4 +- .../functions/fnc_treatmentTourniquet.sqf | 2 +- .../fnc_treatmentTourniquetLocal.sqf | 8 +-- .../functions/fnc_treatment_failure.sqf | 8 +-- .../functions/fnc_treatment_success.sqf | 10 +-- .../medical/functions/fnc_unconsciousPFH.sqf | 10 +-- addons/medical/ui/RscTitles.hpp | 2 +- addons/medical/ui/triagecard.hpp | 10 +-- .../functions/fnc_handleUI_DisplayOptions.sqf | 2 +- .../functions/fnc_setTriageStatus.sqf | 2 +- .../functions/fnc_updateUIInfo.sqf | 2 +- addons/medical_menu/ui/menu.hpp | 6 +- addons/microdagr/gui.hpp | 8 +-- addons/mk6mortar/RscInGameUI.hpp | 4 +- addons/modules/XEH_postInit.sqf | 6 +- addons/nametags/RscTitles.hpp | 8 +-- .../functions/fnc_exportSettings.sqf | 2 +- .../functions/fnc_moduleAllowConfigExport.sqf | 2 +- .../fnc_onServerSettingsMenuOpen.sqf | 2 +- .../functions/fnc_onSettingsMenuOpen.sqf | 2 +- .../functions/fnc_updateSetting.sqf | 2 +- addons/optionsmenu/gui/pauseMenu.hpp | 4 +- addons/optionsmenu/gui/settingsMenu.hpp | 6 +- addons/overheating/functions/fnc_overheat.sqf | 2 +- .../functions/fnc_fireLauncherBackblast.sqf | 2 +- .../functions/fnc_overpressureDamage.sqf | 2 +- .../functions/fnc_checkCutParachute.sqf | 2 +- .../functions/fnc_storeParachute.sqf | 2 +- addons/repair/functions/fnc_repair.sqf | 6 +- .../repair/functions/fnc_repair_failure.sqf | 2 +- .../repair/functions/fnc_repair_success.sqf | 2 +- addons/spectator/UI/interface.hpp | 6 +- .../zeus/functions/fnc_addObjectToCurator.sqf | 2 +- .../zeus/functions/fnc_bi_moduleCurator.sqf | 48 +++++++------- .../functions/fnc_bi_moduleProjectile.sqf | 16 ++--- .../functions/fnc_bi_moduleRemoteControl.sqf | 16 ++--- addons/zeus/functions/fnc_moduleSetMedic.sqf | 2 +- .../fnc_moduleSetMedicalFacility.sqf | 2 +- .../functions/fnc_moduleSetMedicalVehicle.sqf | 2 +- 119 files changed, 444 insertions(+), 444 deletions(-) diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index ab624669cf..57454dec78 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) { w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; colorFrame[] = {1,1,1,0.5}; - colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"}; + colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; }; class TitleText: TitleBackground { diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index bad8a2b427..258bf51ec9 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -115,18 +115,18 @@ class RscDisplayInventory { // map class RscDisplayMainMap { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent);); }; class RscDisplayGetReady: RscDisplayMainMap { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent);); }; class RscDisplayServerGetReady: RscDisplayGetReady { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent);); }; class RscDisplayClientGetReady: RscDisplayGetReady { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent);); }; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index f1bca395f8..c38c3fd3e7 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -88,7 +88,7 @@ class CfgUIGrids { // check dll class RscStandardDisplay; class RscDisplayMain: RscStandardDisplay { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage)); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage)); }; */ diff --git a/addons/common/define.hpp b/addons/common/define.hpp index f1cc009864..98367e72ae 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -116,9 +116,9 @@ class ACE_gui_editBase }; colorSelection[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", + "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])", + "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])", + "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])", 1 }; autocomplete = ""; @@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{ colorSelect2[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground[] = {0, 0, 0, 1}; colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0}; - colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25}; + colorDisabled[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 0.25}; period = 1.2; rowHeight = 0.03; colorBackground[] = {0, 0, 0, 1}; @@ -505,7 +505,7 @@ onMouseButtonDblClick = ""; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa"; - color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"}; + color[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"}; colorCreated[] = {1,1,1,1}; colorCanceled[] = {0.7,0.7,0.7,1}; colorDone[] = {0.7,1,0.3,1}; diff --git a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf b/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf index 95cce02e41..c739177288 100644 --- a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf +++ b/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf @@ -18,6 +18,6 @@ _dlg = ctrlParent _this; _dlg displayAddEventHandler ["unload", { if (_this select 1 == 1) then { - [missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent); + [missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent); }; }]; diff --git a/addons/common/functions/fnc_debugModule.sqf b/addons/common/functions/fnc_debugModule.sqf index 4f3da4d7cb..125887183e 100644 --- a/addons/common/functions/fnc_debugModule.sqf +++ b/addons/common/functions/fnc_debugModule.sqf @@ -14,5 +14,5 @@ params ["_entity"]; -GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]); -GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]); +GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]); +GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]); diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 39c23ce53b..34fb7b99e7 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); /* // This does not function at the moment. Has been disabled until it fixed. -_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; +_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; +_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; */ _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index ac13f73275..7205a943d9 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -27,7 +27,7 @@ private ["_return", "_val"]; _return = []; { - _val = _object getvariable (_x select 0); + _val = _object getVariable (_x select 0); if (!isNil "_val") then { if (_category == "" || _category == _x select 3) then { diff --git a/addons/common/functions/fnc_getDefinedVariable.sqf b/addons/common/functions/fnc_getDefinedVariable.sqf index c0d7ce8d83..ea22163622 100644 --- a/addons/common/functions/fnc_getDefinedVariable.sqf +++ b/addons/common/functions/fnc_getDefinedVariable.sqf @@ -16,7 +16,7 @@ params ["_unit", "_variable", "_defaultValue"]; private "_value"; -_value = _unit getvariable _variable; +_value = _unit getVariable _variable; if (isNil "_value") then { if (!isNil "_defaultValue") then { diff --git a/addons/common/functions/fnc_isAwake.sqf b/addons/common/functions/fnc_isAwake.sqf index 8a123cfec9..1179ced02f 100644 --- a/addons/common/functions/fnc_isAwake.sqf +++ b/addons/common/functions/fnc_isAwake.sqf @@ -14,4 +14,4 @@ params ["_unit"]; -!(_unit getvariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getvariable ["ACE_isDead", false]) // return +!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index 35b719bfda..2f7aef43a5 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -16,7 +16,7 @@ params ["_unit", "_id", "_accepted"]; private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"]; -_info = _unit getvariable _id; +_info = _unit getVariable _id; if (!isNil "_info") then { _caller = _info select 0; @@ -26,7 +26,7 @@ if (!isNil "_info") then { _callBack = _info select 4; _replyParams = [_info, _accepted]; [_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc); - _unit setvariable [_id, nil]; + _unit setVariable [_id, nil]; }; GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 8d58525a9d..e158ae5c81 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" //paramsArray is a normal variable not a command -private _paramsArray = missionnamespace getvariable ["paramsArray", []]; +private _paramsArray = missionnamespace getVariable ["paramsArray", []]; TRACE_1("Reading missionConfigFile params",_paramsArray); diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index c2ba1bee18..d9850ffd5b 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -14,8 +14,8 @@ params ["_unit"]; -_unit setvariable ["ACE_isDead", nil, true]; -_unit setvariable ["ACE_isUnconscious", nil, true]; +_unit setVariable ["ACE_isDead", nil, true]; +_unit setVariable ["ACE_isUnconscious", nil, true]; if (isPlayer _unit) then { [true] call FUNC(setVolume); @@ -36,7 +36,7 @@ if (isPlayer _unit) then { { if !(_x select 4) then { - _unit setvariable [_x select 0, nil, _x select 3]; + _unit setVariable [_x select 0, nil, _x select 3]; }; false } count ([_unit] call FUNC(getAllDefinedSetVariables)); diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 9bbc4c6d20..7d23e6442a 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -18,7 +18,7 @@ params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]]; private "_previousGroupsList"; -_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []]; +_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []]; if (_switch) then { // go forward diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 4e75791ff0..6a42d8ea11 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -95,9 +95,9 @@ _unit action ["Eject", vehicle _unit]; [_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide); -_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; +_loaded = _vehicle getVariable [QGVAR(loaded_persons),[]]; _loaded deleteAt (_loaded find _unit); -_vehicle setvariable [QGVAR(loaded_persons), _loaded, true]; +_vehicle setVariable [QGVAR(loaded_persons), _loaded, true]; true diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 0961b809ed..1863eb9b0b 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -33,13 +33,13 @@ class GVAR(remoteInventory) { fadeout = 0; class Colors { - dragValidBgr[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5}; - dragInvalidBgr[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; - dragValidBar[] = {"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])",0.5}; - dragInvalidBar[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; - progressBar[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",1}; - progressBarBgr[] = {"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",0.75}; - highlight[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5}; + dragValidBgr[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5}; + dragInvalidBgr[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; + dragValidBar[] = {"(profilenamespace getVariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getVariable ['IGUI_WARNING_RGB_B',0.0])",0.5}; + dragInvalidBar[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; + progressBar[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",1}; + progressBarBgr[] = {"(profilenamespace getVariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getVariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getVariable ['IGUI_BCG_RGB_B',1])",0.75}; + highlight[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5}; }; class controlsBackground {}; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 6ee28edff3..1f5e9f68aa 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -21,4 +21,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; -alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} +alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 58c4718407..d96c0dd5da 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -24,4 +24,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; -alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; +alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 9da1656b8b..aad30ec234 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -22,7 +22,7 @@ params ["_unit", "_target"]; private "_inBuilding"; _inBuilding = [_unit] call FUNC(isObjectOnObject); -if !(_unit getvariable ["ACE_isUnconscious", false]) then { +if !(_unit getVariable ["ACE_isUnconscious", false]) then { // play release animation _unit playAction "released"; }; @@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then { ["fixFloating", _target, _target] call EFUNC(common,targetEvent); }; -if (_unit getvariable ["ACE_isUnconscious", false]) then { +if (_unit getVariable ["ACE_isUnconscious", false]) then { [_unit, "unconscious", 2, true] call EFUNC(common,doAnimation); }; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 300846bc6c..c9c34c82a0 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -31,7 +31,7 @@ detach _target; // fix anim when aborting carrying persons if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then { - if (vehicle _unit == _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { + if (vehicle _unit == _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { [_unit, "", 2, true] call EFUNC(common,doAnimation); }; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 6e6374af12..45582a8564 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -19,9 +19,9 @@ class Rsc_ACE_CallScreen_Edit:RscEdit { colorText[] = {0,0,0,1}; colorDisabled[] = {1,1,1,0.25}; colorSelection[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", + "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])", + "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])", + "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 1 }; text = ""; diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 66406ad917..b8745acaaa 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -26,7 +26,7 @@ GVAR(time4) = 0; ["playerChanged", { GVAR(deafnessDV) = 0; GVAR(deafnessPrior) = 0; - ACE_player setvariable [QGVAR(deaf), false]; + ACE_player setVariable [QGVAR(deaf), false]; GVAR(beep) = false; GVAR(beep2) = false; diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index f1cb063971..e36151aea4 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -42,7 +42,7 @@ if (!_justUpdateVolume) then { GVAR(deafnessPrior) = GVAR(deafnessDV); if (GVAR(deafnessDV) > 19.75) then { - ACE_player setvariable [QGVAR(deaf), true]; + ACE_player setVariable [QGVAR(deaf), true]; if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then { playSound "ACE_Combat_Deafness"; GVAR(beep2) = true; @@ -50,7 +50,7 @@ if (!_justUpdateVolume) then { GVAR(time4) = ACE_time + 30; }; } else { - ACE_player setvariable [QGVAR(deaf), false]; + ACE_player setVariable [QGVAR(deaf), false]; }; if (GVAR(deafnessDV) > 10) then { diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 351d285c7e..8e5561d346 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -497,7 +497,7 @@ class CfgVehicles { class GVAR(loadPatient) { displayName = CSTRING(LoadPatient); distance = 5; - condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target); + condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit)); showDisabled = 0; priority = 2; @@ -507,7 +507,7 @@ class CfgVehicles { class GVAR(UnLoadPatient) { displayName = CSTRING(UnloadPatient); distance = 5; - condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target); + condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit)); showDisabled = 0; priority = 2; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index bec734b987..d833e44740 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -175,11 +175,11 @@ GVAR(lastHeartBeatSound) = ACE_time; // Pain effect, no pain effect in zeus camera if (isNull curatorCamera) then { - _strength = ((_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0) min 1; + _strength = ((_pain - (ACE_player getVariable [QGVAR(painSuppress), 0])) max 0) min 1; _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); if (GVAR(painEffectType) == 1) then { GVAR(effectPainCC) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { _strength = _strength * 0.15; GVAR(effectPainCA) ppEffectEnable true; GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; @@ -201,7 +201,7 @@ GVAR(lastHeartBeatSound) = ACE_time; }; } else { GVAR(effectPainCA) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { _strength = _strength * 0.9; GVAR(effectPainCC) ppEffectEnable true; GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; @@ -248,22 +248,22 @@ GVAR(lastHeartBeatSound) = ACE_time; ["SettingsInitialized", { if (GVAR(level) == 2) exitWith { [ - {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)}, - {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9}, + {(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 65)}, + {(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.25)}, - {((_this select 0) getvariable [QGVAR(inReviveState), false])}, - {((_this select 0) getvariable [QGVAR(inCardiacArrest), false])}, - {((_this select 0) getvariable ["ACE_isDead", false])}, - {(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)} + {((_this select 0) getVariable [QGVAR(inReviveState), false])}, + {((_this select 0) getVariable [QGVAR(inCardiacArrest), false])}, + {((_this select 0) getVariable ["ACE_isDead", false])}, + {(((_this select 0) getVariable [QGVAR(airwayStatus), 100]) < 80)} ] call FUNC(addUnconsciousCondition); }; [ - {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)}, - {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.6}, + {(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 40)}, + {(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.6}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.1)}, - {((_this select 0) getvariable [QGVAR(inReviveState), false])}, - {((_this select 0) getvariable ["ACE_isDead", false])} + {((_this select 0) getVariable [QGVAR(inReviveState), false])}, + {((_this select 0) getVariable ["ACE_isDead", false])} ] call FUNC(addUnconsciousCondition); }] call EFUNC(common,addEventHandler); diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 94f3e6ad34..83852f8042 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -17,7 +17,7 @@ private ["_heartRateOutput", "_heartRate", "_logOutPut"]; params ["_caller", "_unit", "_selectionName"]; -_heartRate = _unit getvariable [QGVAR(heartRate), 80]; +_heartRate = _unit getVariable [QGVAR(heartRate), 80]; if (!alive _unit) then { _heartRate = 0; }; diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 09fd399581..ff2bd12438 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -25,8 +25,8 @@ if (alive _target) then { } else { _genericMessages pushBack LSTRING(diagnoseDead); }; -if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { - if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { +if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then { + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { _genericMessages pushBack LSTRING(lostBloodALot); } else { _genericMessages pushBack LSTRING(lostBlood); @@ -36,7 +36,7 @@ if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { }; if (alive _target) then { - if (_target getvariable[QGVAR(hasPain), false]) then { + if (_target getVariable[QGVAR(hasPain), false]) then { _genericMessages pushBack LSTRING(inPain); } else { _genericMessages pushBack LSTRING(noPain); diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index 3e753d6454..81412f60c4 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -20,7 +20,7 @@ params ["_caller", "_target", "_selectionName"]; // grab the required data _part = [_selectionName] call FUNC(selectionNameToNumber); -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; // Check if there is a tourniquet on this bodypart if ((_tourniquets select _part) == 0) exitWith { @@ -30,7 +30,7 @@ if ((_tourniquets select _part) == 0) exitWith { // Removing the tourniquet _tourniquets set[_part, 0]; -_target setvariable [QGVAR(tourniquets), _tourniquets, true]; +_target setVariable [QGVAR(tourniquets), _tourniquets, true]; // Adding the tourniquet item to the caller _caller addItem "ACE_tourniquet"; diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 8735a2a2d6..cc8c093071 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]]; -_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; +_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; _adjustment pushBack [_value, _time, _callBack]; -_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; +_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ]; ["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index f927d54e67..48e400f7b2 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -21,8 +21,8 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; - _unit setvariable [QGVAR(addedToUnitLoop), true, true]; + if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; + _unit setVariable [QGVAR(addedToUnitLoop), true, true]; [{ params ["_args", "_idPFH"]; @@ -34,17 +34,17 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { [_idPFH] call CBA_fnc_removePerFrameHandler; if (!local _unit) then { if (GVAR(level) >= 2) then { - _unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], true]; - _unit setvariable [QGVAR(bloodPressure), _unit getvariable [QGVAR(bloodPressure), [80, 120]], true]; + _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true]; + _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true]; }; - _unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 100], true]; + _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true]; }; } else { [_unit, _interval] call FUNC(handleUnitVitals); private "_pain"; - _pain = _unit getvariable [QGVAR(pain), 0]; - if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then { + _pain = _unit getVariable [QGVAR(pain), 0]; + if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then { // This introduces wierd unconscious behaviour for basic medical and possibly also advanced. // TODO This is disabled as it's considered non critical code. // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely. diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index d62f3ccba3..8d1b337514 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -29,7 +29,7 @@ _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute]; _logVarName = format[QGVAR(logFile_%1), _type]; -_log = _unit getvariable [_logVarName, []]; +_log = _unit getVariable [_logVarName, []]; if (count _log >= 8) then { _newLog = []; { @@ -42,11 +42,11 @@ if (count _log >= 8) then { }; _log pushBack [_message, _moment, _type, _arguments]; -_unit setvariable [_logVarName, _log, true]; +_unit setVariable [_logVarName, _log, true]; ["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); -_logs = _unit getvariable [QGVAR(allLogs), []]; +_logs = _unit getVariable [QGVAR(allLogs), []]; if !(_logVarName in _logs) then { _logs pushBack _logVarName; - _unit setvariable [QGVAR(allLogs), _logs, true]; + _unit setVariable [QGVAR(allLogs), _logs, true]; }; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 8a08bdd98a..bd988fa84c 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -21,7 +21,7 @@ if (!local _unit) exitWith { [_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; -_log = _unit getvariable [QGVAR(triageCard), []]; +_log = _unit getVariable [QGVAR(triageCard), []]; _inList = false; _amount = 1; { @@ -40,5 +40,5 @@ _amount = 1; if (!_inList) then { _log pushBack [_newItem, 1, ACE_gameTime]; }; -_unit setvariable [QGVAR(triageCard), _log, true]; +_unit setVariable [QGVAR(triageCard), _log, true]; ["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index 81e8351c6a..e6856335cc 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -17,7 +17,7 @@ private ["_accessLevel", "_return"]; params ["_caller", "_target"]; -_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; +_accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1]; _return = false; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 7870683aa1..76712cc824 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -37,7 +37,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitWith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0] }; 0; }; @@ -55,7 +55,7 @@ if (getText (_config >> "condition") != "") then { if (isNil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (typeName _condition == "BOOL") then { _return = _condition; @@ -66,7 +66,7 @@ if (getText (_config >> "condition") != "") then { if (!_return) exitWith { false }; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -85,7 +85,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if !(isNil _x) exitWith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index ff2f95a92e..af601d9f33 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -19,7 +19,7 @@ params ["_oldBody", "_caller"]; if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies -_name = _oldBody getvariable ["ACE_name", "unknown"]; +_name = _oldBody getVariable ["ACE_name", "unknown"]; _class = typeOf _oldBody; _side = side _caller; _group = createGroup _side; @@ -71,12 +71,12 @@ if (isMultiplayer) then { hideObject _oldBody; }; -_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true]; -_oldBody setvariable [QGVAR(hasCopy), _newUnit, true]; -_newUnit setvariable ["ACE_isDead", true, true]; -_newUnit setvariable ["ACE_isUnconscious", true, true]; -_newUnit setvariable [QGVAR(disableInteraction), true, true]; -_oldBody setvariable [QGVAR(disableInteraction), true, true]; +_newUnit setVariable [QGVAR(copyOfUnit), _oldBody, true]; +_oldBody setVariable [QGVAR(hasCopy), _newUnit, true]; +_newUnit setVariable ["ACE_isDead", true, true]; +_newUnit setVariable ["ACE_isUnconscious", true, true]; +_newUnit setVariable [QGVAR(disableInteraction), true, true]; +_oldBody setVariable [QGVAR(disableInteraction), true, true]; [_newUnit, 0.89] call FUNC(setStructuralDamage); _newUnit; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index a001f36402..2d3005c332 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -69,7 +69,7 @@ _createdLitter = []; if (isNil _litterCondition) then { _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; } else { - _litterCondition = missionNamespace getvariable _litterCondition; + _litterCondition = missionNamespace getVariable _litterCondition; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; }; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {}; diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 2f460e5256..8be0e00903 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -32,13 +32,13 @@ if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true }; // Find the correct Damage threshold for unit. _damageThreshold = [1,1,1]; if ([_unit] call EFUNC(common,IsPlayer)) then { - _damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; + _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; } else { - _damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]]; + _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]]; }; _damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"]; -_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; +_damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; // Check if damage to body part is higher as damage head if (_part == 0) exitWith { diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 760cddb0db..9fd3bf7a8b 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -46,7 +46,7 @@ if (_show) then { }; disableSerialization; - _display = uiNamespace getvariable QGVAR(DisplayInformation); + _display = uiNamespace getVariable QGVAR(DisplayInformation); if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -59,26 +59,26 @@ if (_show) then { _genericMessages pushBack [localize _partText, [1, 1, 1, 1]]; }; - if (_target getvariable[QGVAR(isBleeding), false]) then { + if (_target getVariable[QGVAR(isBleeding), false]) then { _genericMessages pushBack [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]]; }; - if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { _genericMessages pushBack [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]]; }; - if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { + if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { _genericMessages pushBack [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; }; - if (_target getvariable[QGVAR(hasPain), false]) then { + if (_target getVariable[QGVAR(hasPain), false]) then { _genericMessages pushBack [localize LSTRING(Status_Pain), [1, 1, 1, 1]]; }; _totalIvVolume = 0; { private "_value"; - _value = _target getvariable _x; + _value = _target getVariable _x; if !(isNil "_value") then { - _totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); + _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); }; } forEach GVAR(IVBags); if (_totalIvVolume >= 1) then { @@ -88,7 +88,7 @@ if (_show) then { _damaged = [false, false, false, false, false, false]; _selectionBloodLoss = [0,0,0,0,0,0]; if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; private "_amountOf"; { _x params ["", "_x1", "_selectionX", "_amountOf", "_x4"]; @@ -110,7 +110,7 @@ if (_show) then { }; } forEach _openWounds; - _bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; // Find how much this bodypart is bleeding @@ -200,7 +200,7 @@ if (_show) then { lbClear _logCtrl; private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"]; - _logs = _target getvariable [QGVAR(logFile_Activity), []]; + _logs = _target getVariable [QGVAR(logFile_Activity), []]; { // [_message,_moment,_type, _arguments] _x params ["_message", "_moment", "_type", "_arguments"]; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 76ad990d00..47af145055 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -32,7 +32,7 @@ if (_show) then { }; disableSerialization; - _display = uiNamespace getvariable QGVAR(triageCard); + _display = uiNamespace getVariable QGVAR(triageCard); if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -43,7 +43,7 @@ if (_show) then { _lbCtrl = (_display displayCtrl 200); lbClear _lbCtrl; - _log = _target getvariable [QGVAR(triageCard), []]; + _log = _target getVariable [QGVAR(triageCard), []]; { _x params ["_item", "_amount"]; _message = _item; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index b3cead3cba..e7a4d3c0a9 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -17,7 +17,7 @@ private ["_ctrl", "_display", "_idc", "_pos"]; params ["_show"]; disableSerialization; -_display = uiNamespace getvariable QGVAR(triageCard); +_display = uiNamespace getVariable QGVAR(triageCard); if (isNil "_display") exitWith {}; _pos = [0,0,0,0]; diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index 110f85ee82..26727d3d8e 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -22,8 +22,8 @@ _totalBloodLoss = 0; // Advanced medical bloodloss handling if (GVAR(level) >= 2) then { - _tourniquets = _unit getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; - _openWounds = _unit getvariable [QGVAR(openWounds), []]; + _tourniquets = _unit getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; + _openWounds = _unit getVariable [QGVAR(openWounds), []]; //_cardiacOutput = [_unit] call FUNC(getCardiacOutput); { @@ -35,7 +35,7 @@ if (GVAR(level) >= 2) then { }; } forEach _openWounds; - _internalWounds = _unit getvariable [QGVAR(internalWounds), []]; + _internalWounds = _unit getVariable [QGVAR(internalWounds), []]; { _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); } forEach _internalWounds; @@ -43,7 +43,7 @@ if (GVAR(level) >= 2) then { // cap the blood loss to be no greater as the current cardiac output //(_totalBloodLoss min _cardiacOutput); } else { - { _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getvariable [QGVAR(bodyPartStatus), []]); + { _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getVariable [QGVAR(bodyPartStatus), []]); _totalBloodLoss = (_totalBloodLoss / 6) * BLOODLOSSRATE_BASIC; }; _totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0); diff --git a/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf index 659949d716..3fdc4f9d52 100644 --- a/addons/medical/functions/fnc_getBloodPressure.sqf +++ b/addons/medical/functions/fnc_getBloodPressure.sqf @@ -25,7 +25,7 @@ private ["_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistan params ["_unit"]; _cardiacOutput = [_unit] call FUNC(getCardiacOutput); -_resistance = _unit getvariable [QGVAR(peripheralResistance), 100]; +_resistance = _unit getVariable [QGVAR(peripheralResistance), 100]; _bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance; _bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance; diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index 3d71ea0c44..1737bb3b98 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -31,21 +31,21 @@ private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"]; params ["_unit"]; -_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; +_bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100]; _bloodVolumeChange = -([_unit] call FUNC(getBloodLoss)); if (_bloodVolume < 100.0) then { { - if ((_unit getvariable [_x, 0]) > 0) then { + if ((_unit getVariable [_x, 0]) > 0) then { _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; - _ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND; - _unit setvariable [_x,_ivVolume]; + _ivVolume = (_unit getVariable [_x, 0]) + IV_CHANGE_PER_SECOND; + _unit setVariable [_x,_ivVolume]; }; } forEach GVAR(IVBags); } else { { - if ((_unit getvariable [_x, 0]) > 0) then { - _unit setvariable [_x, 0]; // lets get rid of exessive IV volume + if ((_unit getVariable [_x, 0]) > 0) then { + _unit setVariable [_x, 0]; // lets get rid of exessive IV volume }; } forEach GVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf index f24aa438ca..d07319e8b5 100644 --- a/addons/medical/functions/fnc_getCardiacOutput.sqf +++ b/addons/medical/functions/fnc_getCardiacOutput.sqf @@ -24,4 +24,4 @@ params ["_unit"]; -((_unit getvariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable [QGVAR(heartRate), 80])/80-1); +((_unit getVariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getVariable [QGVAR(heartRate), 80])/80-1); diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf index cf9f7a417a..3ba4b7875f 100644 --- a/addons/medical/functions/fnc_getHeartRateChange.sqf +++ b/addons/medical/functions/fnc_getHeartRateChange.sqf @@ -19,11 +19,11 @@ private ["_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjust params ["_unit"]; _hrIncrease = 0; -if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { - _heartRate = _unit getvariable [QGVAR(heartRate), 80]; +if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then { + _heartRate = _unit getVariable [QGVAR(heartRate), 80]; _bloodLoss = [_unit] call FUNC(getBloodLoss); - _adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; + _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; { _x params ["_values", "_time", "_callBack"]; if (abs _values > 0) then { @@ -48,9 +48,9 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { } forEach _adjustment; _adjustment = _adjustment - [ObjNull]; - _unit setvariable [QGVAR(heartRateAdjustments), _adjustment]; + _unit setVariable [QGVAR(heartRateAdjustments), _adjustment]; - _bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; + _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100]; if (_bloodVolume > 75) then { if (_bloodLoss >0.0) then { if (_bloodLoss <0.5) then { diff --git a/addons/medical/functions/fnc_getTriageStatus.sqf b/addons/medical/functions/fnc_getTriageStatus.sqf index 4dcef530a3..79af660407 100644 --- a/addons/medical/functions/fnc_getTriageStatus.sqf +++ b/addons/medical/functions/fnc_getTriageStatus.sqf @@ -17,7 +17,7 @@ private ["_unit","_return","_status"]; params ["_unit"]; -_status = _unit getvariable [QGVAR(triageLevel), -1]; +_status = _unit getVariable [QGVAR(triageLevel), -1]; _return = switch (_status) do { case 1: {[localize LSTRING(Triage_Status_Minor), 1, [0, 0.5, 0, 0.9]]}; case 2: {[localize LSTRING(Triage_Status_Delayed), 2, [0.7, 0.5, 0, 0.9]]}; diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 557c52cedd..bd06dabad6 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -51,7 +51,7 @@ if (isClass (_config >> _className)) then { }; }; -_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; +_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _injuryType = _injury select 1; _exist = false; _bandagedInjury = []; @@ -72,7 +72,7 @@ if !(_exist) then { _bandagedWounds pushBack _bandagedInjury; }; -_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; +_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; // Check if we are ever going to reopen this if (random(1) <= _reopeningChance) then { @@ -82,14 +82,14 @@ if (random(1) <= _reopeningChance) then { params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; //if (alive _target) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; if ((count _openWounds)-1 < _injuryIndex) exitWith {}; _selectedInjury = _openWounds select _injuryIndex; if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; _openWounds set [_injuryIndex, _selectedInjury]; - _bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _exist = false; _injuryId = _injury select 1; { @@ -102,8 +102,8 @@ if (random(1) <= _reopeningChance) then { } forEach _bandagedWounds; if (_exist) then { - _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; - _target setvariable [QGVAR(openWounds), _openWounds, true]; + _target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; + _target setVariable [QGVAR(openWounds), _openWounds, true]; }; }; // Otherwise something went wrong, we we don't reopen them.. diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index e63f8f3d91..4532598d47 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { - if (_unit getvariable ["ACE_isUnconscious", false]) exitWith { + if (_unit getVariable ["ACE_isUnconscious", false]) exitWith { [_unit] call FUNC(setDead); 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 517acce0ba..33b1d3f7ee 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -27,10 +27,10 @@ if (_part < 0) exitWith {}; _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; // Sorting out the damage -_damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; -_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); @@ -47,7 +47,7 @@ _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); //}; -if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { +if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index e5180e519c..ace7041cb5 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -25,8 +25,8 @@ if (_bodyPartn > 1) exitWith {}; if (_amountOfDamage > 0.5) then { if (random(1) >= 0.8) then { - if !(_unit getvariable[QGVAR(airwayCollapsed), false]) then { - _unit setvariable [QGVAR(airwayCollapsed), true, true]; + if !(_unit getVariable[QGVAR(airwayCollapsed), false]) then { + _unit setVariable [QGVAR(airwayCollapsed), true, true]; }; }; }; diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index d159f7a52b..9ec67bc382 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -16,7 +16,7 @@ private ["_damageBodyParts", "_cache_params", "_cache_damages"]; params ["_target"]; TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target); -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []]; _cache_damages = _target getVariable QGVAR(cachedDamages); @@ -31,9 +31,9 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c private ["_newDamage", "_pain"]; _newDamage = (_cache_damages select _forEachIndex); _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; - _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts]; + _unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; - if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { + if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); @@ -46,8 +46,8 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c }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]; -TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); +_target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); _target setHitPointDamage ["hitHead", _headDamage min 0.95]; diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index fd6b845930..5292781420 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -59,12 +59,12 @@ if (_amountOfDamage > 0.05) then { }; private ["_fractures", "_fractureID", "_amountOf"]; - _fractures = _unit getvariable[QGVAR(fractures), []]; + _fractures = _unit getVariable[QGVAR(fractures), []]; _fractureID = 1; _amountOf = count _fractures; if (_amountOf > 0) then { _fractureID = (_fractures select (_amountOf - 1) select 0) + 1; }; _fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; - _unit setvariable [QGVAR(fractures), _fractures, true]; + _unit setVariable [QGVAR(fractures), _fractures, true]; }; diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 311314221e..38665a0e40 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -22,8 +22,8 @@ params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamag TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage); // Administration for open wounds and ids -_openWounds = _unit getvariable[QGVAR(openWounds), []]; -_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; +_openWounds = _unit getVariable[QGVAR(openWounds), []]; +_woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1]; _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _selectionName, _damage, _typeOfDamage, _woundID]; @@ -52,13 +52,13 @@ _foundIndex = -1; }; } forEach _woundsCreated; -_unit setvariable [QGVAR(openWounds), _openWounds, true]; +_unit setVariable [QGVAR(openWounds), _openWounds, true]; // Only update if new wounds have been created if (count _woundsCreated > 0) then { - _unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; + _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true]; }; -_painLevel = _unit getvariable [QGVAR(pain), 0]; -_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; -TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); +_painLevel = _unit getVariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), _painLevel + _painToAdd]; +TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated); diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index d791fc424e..4384dce2d7 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -26,7 +26,7 @@ _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); if (_bodyPartn < 0) exitWith {}; // Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] -_injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; +_injuryTypeInfo = missionNamespace getVariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; // This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..] _allInjuriesForDamageType = _injuryTypeInfo select 2; @@ -34,7 +34,7 @@ _allInjuriesForDamageType = _injuryTypeInfo select 2; if (count _allInjuriesForDamageType == 0) then { // grabbing the configuration for unknown damage type - _injuryTypeInfo = missionNamespace getvariable [QGVAR(woundInjuryType_unknown),[[], false, []]]; + _injuryTypeInfo = missionNamespace getVariable [QGVAR(woundInjuryType_unknown),[[], false, []]]; _allInjuriesForDamageType = _injuryTypeInfo select 2; }; @@ -73,8 +73,8 @@ _allPossibleInjuries = []; if (_highestPossibleSpot < 0) exitWith {}; // Administration for open wounds and ids -_openWounds = _unit getvariable[QGVAR(openWounds), []]; -_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; +_openWounds = _unit getVariable[QGVAR(openWounds), []]; +_woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1]; _painToAdd = 0; _woundsCreated = []; @@ -122,13 +122,13 @@ _woundsCreated = []; }; } forEach (_injuryTypeInfo select 0); // forEach damage thresholds -_unit setvariable [QGVAR(openWounds), _openWounds, true]; +_unit setVariable [QGVAR(openWounds), _openWounds, true]; // Only update if new wounds have been created if (count _woundsCreated > 0) then { - _unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; + _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true]; }; -_painLevel = _unit getvariable [QGVAR(pain), 0]; -_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; -TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); +_painLevel = _unit getVariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), _painLevel + _painToAdd]; +TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated); diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index 485dac273d..c8d08cbde2 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -17,9 +17,9 @@ private "_openWounds"; params ["_unit"]; if (!local _unit) exitWith {}; -_unit setvariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), 0]; if (GVAR(level) >= 2) then { - _unit setvariable [QGVAR(heartRate), 0]; - _unit setvariable [QGVAR(bloodPressure), [0, 0]]; - _unit setvariable [QGVAR(airwayStatus), 0]; + _unit setVariable [QGVAR(heartRate), 0]; + _unit setVariable [QGVAR(bloodPressure), [0, 0]]; + _unit setVariable [QGVAR(airwayStatus), 0]; }; diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf index 50a30e90e8..91689f311f 100644 --- a/addons/medical/functions/fnc_handleLocal.sqf +++ b/addons/medical/functions/fnc_handleLocal.sqf @@ -17,17 +17,17 @@ params ["_unit", "_local"]; if (_local) then { - if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then { + if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then { [_unit, true] call FUNC(addToInjuredCollection); }; - if ((_unit getvariable ["ACE_isUnconscious",false]) && {count (_unit getvariable [QGVAR(unconsciousArguments), []]) >= 6}) then { + if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then { private "_arguments"; - _arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]); + _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]); _arguments set [2, ACE_time]; [DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler; - _unit setvariable [QGVAR(unconsciousArguments), nil, true]; + _unit setVariable [QGVAR(unconsciousArguments), nil, true]; }; }; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index a0c4c365e1..6159351cc9 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -18,58 +18,58 @@ params ["_unit", "_interval"]; TRACE_3("ACE_DEBUG",_unit,_interval,_unit); if (_interval == 0) exitWith {}; -_lastTimeValuesSynced = _unit getvariable [QGVAR(lastMomentValuesSynced), 0]; +_lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0]; _syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced)); if (_syncValues) then { - _unit setvariable [QGVAR(lastMomentValuesSynced), ACE_time]; + _unit setVariable [QGVAR(lastMomentValuesSynced), ACE_time]; }; -_bloodVolume = (_unit getvariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange)); +_bloodVolume = (_unit getVariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange)); _bloodVolume = _bloodVolume max 0; -_unit setvariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; +_unit setVariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; TRACE_3("ACE_DEBUG",_bloodVolume,_syncValues,_unit); // Set variables for synchronizing information across the net if (_bloodVolume < 100) then { if ((_bloodVolume < 90 && (GVAR(level) == 2)) || _bloodVolume <= 45) then { TRACE_4("ACE_DEBUG_ADVANCED",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 2) then { - _unit setvariable [QGVAR(hasLostBlood), 2, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 2) then { + _unit setVariable [QGVAR(hasLostBlood), 2, true]; }; } else { TRACE_4("ACE_DEBUG", _bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 1) then { - _unit setvariable [QGVAR(hasLostBlood), 1, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 1) then { + _unit setVariable [QGVAR(hasLostBlood), 1, true]; }; } } else { TRACE_4("ACE_DEBUG",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 0) then { - _unit setvariable [QGVAR(hasLostBlood), 0, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 0) then { + _unit setVariable [QGVAR(hasLostBlood), 0, true]; }; }; TRACE_3("ACE_DEBUG",[_unit] call FUNC(getBloodLoss),_unit getVariable QGVAR(isBleeding),_unit); if (([_unit] call FUNC(getBloodLoss)) > 0) then { - if !(_unit getvariable [QGVAR(isBleeding), false]) then { - _unit setvariable [QGVAR(isBleeding), true, true]; + if !(_unit getVariable [QGVAR(isBleeding), false]) then { + _unit setVariable [QGVAR(isBleeding), true, true]; }; } else { - if (_unit getvariable [QGVAR(isBleeding), false]) then { - _unit setvariable [QGVAR(isBleeding), false, true]; + if (_unit getVariable [QGVAR(isBleeding), false]) then { + _unit setVariable [QGVAR(isBleeding), false, true]; }; }; -_painStatus = _unit getvariable [QGVAR(pain), 0]; +_painStatus = _unit getVariable [QGVAR(pain), 0]; TRACE_4("ACE_DEBUG",_painStatus,_unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(painSuppress),_unit); -if (_painStatus > (_unit getvariable [QGVAR(painSuppress), 0])) then { - if !(_unit getvariable [QGVAR(hasPain), false]) then { - _unit setvariable [QGVAR(hasPain), true, true]; +if (_painStatus > (_unit getVariable [QGVAR(painSuppress), 0])) then { + if !(_unit getVariable [QGVAR(hasPain), false]) then { + _unit setVariable [QGVAR(hasPain), true, true]; }; } else { - if (_unit getvariable [QGVAR(hasPain), false]) then { - _unit setvariable [QGVAR(hasPain), false, true]; + if (_unit getVariable [QGVAR(hasPain), false]) then { + _unit setVariable [QGVAR(hasPain), false, true]; }; }; @@ -111,11 +111,11 @@ if (GVAR(level) >= 2) then { }; // Set the vitals - _heartRate = (_unit getvariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); - _unit setvariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; + _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); + _unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; _bloodPressure = [_unit] call FUNC(getBloodPressure); - _unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; + _unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; if (_painStatus > 0 && {_painStatus < 10}) then { _painReduce = if (_painStatus > 5) then {0.002} else {0.001}; @@ -125,15 +125,15 @@ if (GVAR(level) >= 2) then { // TODO Disabled until implemented fully // Handle airway /*if (GVAR(setting_allowAirwayInjuries)) then { - _airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100]; - if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then { + _airwayStatus = _unit getVariable [QGVAR(airwayStatus), 100]; + if (((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) && !((_unit getVariable [QGVAR(airwaySecured), false]))) then { if (_airwayStatus >= 0.5) then { - _unit setvariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues]; + _unit setVariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues]; }; } else { - if !((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) then { + if !((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) then { if (_airwayStatus < 100) then { - _unit setvariable [QGVAR(airwayStatus), (_airwayStatus + 1.5 * _interval) min 100, _syncValues]; + _unit setVariable [QGVAR(airwayStatus), (_airwayStatus + 1.5 * _interval) min 100, _syncValues]; }; }; }; @@ -149,7 +149,7 @@ if (GVAR(level) >= 2) then { // TODO check for in revive state instead of variable _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; - if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { + if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then { if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then { [_unit, true, 10+ random(20)] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already. }; @@ -183,9 +183,9 @@ if (GVAR(level) >= 2) then { TRACE_3("ACE_DEBUG_IVBAGS_SYNC",GVAR(IVBags),_syncValues,_unit); { private "_value"; - _value = _unit getvariable _x; + _value = _unit getVariable _x; if !(isNil "_value") then { - _unit setvariable [_x,(_unit getvariable [_x, 0]), true]; + _unit setVariable [_x,(_unit getVariable [_x, 0]), true]; }; } forEach GVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index 88dc084924..5e2d73f925 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -19,9 +19,9 @@ private "_medicalEnabled"; params ["_unit"]; -_medicalEnabled = _unit getvariable QGVAR(enableMedical); +_medicalEnabled = _unit getVariable QGVAR(enableMedical); if (isNil "_medicalEnabled") exitWith { - (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) + (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getVariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) }; _medicalEnabled diff --git a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf index 955665233a..abbe512d74 100644 --- a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf +++ b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf @@ -16,4 +16,4 @@ params ["_target", "_selectionName"]; -(((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select ([_selectionName] call FUNC(selectionNameToNumber))) > 0); +(((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select ([_selectionName] call FUNC(selectionNameToNumber))) > 0); diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index d276676669..ad58a0126e 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -22,26 +22,26 @@ _unit setVariable ["ACE_isUnconscious", false, true]; // advanced // tourniquets -_unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; +_unit setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; // wounds and injuries -_unit setvariable [QGVAR(openWounds), [], true]; -_unit setvariable [QGVAR(bandagedWounds), [], true]; +_unit setVariable [QGVAR(openWounds), [], true]; +_unit setVariable [QGVAR(bandagedWounds), [], true]; _unit setVariable [QGVAR(internalWounds), [], true]; -_unit setvariable [QGVAR(lastUniqueWoundID), 1, true]; +_unit setVariable [QGVAR(lastUniqueWoundID), 1, true]; // vitals _unit setVariable [QGVAR(heartRate), 80]; -_unit setvariable [QGVAR(heartRateAdjustments), []]; -_unit setvariable [QGVAR(bloodPressure), [80, 120]]; +_unit setVariable [QGVAR(heartRateAdjustments), []]; +_unit setVariable [QGVAR(bloodPressure), [80, 120]]; _unit setVariable [QGVAR(peripheralResistance), 100]; // fractures _unit setVariable [QGVAR(fractures), [], true]; // triage card and logs -_unit setvariable [QGVAR(triageLevel), 0, true]; -_unit setvariable [QGVAR(triageCard), [], true]; +_unit setVariable [QGVAR(triageLevel), 0, true]; +_unit setVariable [QGVAR(triageCard), [], true]; // IVs _unit setVariable [QGVAR(salineIVVolume), 0, true]; @@ -49,36 +49,36 @@ _unit setVariable [QGVAR(plasmaIVVolume), 0, true]; _unit setVariable [QGVAR(bloodIVVolume), 0, true]; // damage storage -_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; +_unit setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; // airway -_unit setvariable [QGVAR(airwayStatus), 100]; +_unit setVariable [QGVAR(airwayStatus), 100]; _unit setVariable [QGVAR(airwayOccluded), false]; -_unit setvariable [QGVAR(airwayCollapsed), false]; +_unit setVariable [QGVAR(airwayCollapsed), false]; // generic medical admin -_unit setvariable [QGVAR(addedToUnitLoop), false, true]; -_unit setvariable [QGVAR(inCardiacArrest), false, true]; -_unit setvariable [QGVAR(hasLostBlood), 0, true]; -_unit setvariable [QGVAR(isBleeding), false, true]; -_unit setvariable [QGVAR(hasPain), false, true]; -_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true]; -_unit setvariable [QGVAR(painSuppress), 0, true]; +_unit setVariable [QGVAR(addedToUnitLoop), false, true]; +_unit setVariable [QGVAR(inCardiacArrest), false, true]; +_unit setVariable [QGVAR(hasLostBlood), 0, true]; +_unit setVariable [QGVAR(isBleeding), false, true]; +_unit setVariable [QGVAR(hasPain), false, true]; +_unit setVariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true]; +_unit setVariable [QGVAR(painSuppress), 0, true]; private ["_allUsedMedication", "_logs"]; // medication _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []]; { - _unit setvariable [_x select 0, nil]; + _unit setVariable [_x select 0, nil]; } forEach _allUsedMedication; _unit setVariable [QGVAR(allUsedMedication), [], true]; -_logs = _unit getvariable [QGVAR(allLogs), []]; +_logs = _unit getVariable [QGVAR(allLogs), []]; { - _unit setvariable [_x, nil]; + _unit setVariable [_x, nil]; } forEach _logs; -_unit setvariable [QGVAR(allLogs), [], true]; +_unit setVariable [QGVAR(allLogs), [], true]; // items [{ diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 5810c22d88..e0298ed054 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -21,7 +21,7 @@ if (GVAR(level) <= 1) exitWith { }; _totalBloodLoss = 0; -_openWounds = _unit getvariable [QGVAR(openWounds), []]; +_openWounds = _unit getVariable [QGVAR(openWounds), []]; { // total bleeding ratio * percentage of injury left _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 3c6c535e1d..02e5985297 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -21,7 +21,7 @@ params ["_target", "_player", "_selectionN", "_actionData"]; if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { private ["_pointDamage"]; - _pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; + _pointDamage = (_target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; if (_pointDamage >= 0.8) exitWith { _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; @@ -32,7 +32,7 @@ if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { }; private ["_openWounds", "_amountOf"]; -_openWounds = _target getvariable [QGVAR(openWounds), []]; +_openWounds = _target getVariable [QGVAR(openWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf index 970cc19ca7..368b065908 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -18,11 +18,11 @@ private ["_setting", "_objects"]; params [["_logic", objNull, [objNull]]]; if (!isNull _logic) then { - _setting = _logic getvariable ["class",0]; + _setting = _logic getVariable ["class",0]; _objects = synchronizedObjects _logic; { if (local _x) then { - _x setvariable[QGVAR(isMedicalFacility), true, true]; + _x setVariable[QGVAR(isMedicalFacility), true, true]; }; } forEach _objects; }; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index f16caad75c..8eb55b3d1b 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -22,7 +22,7 @@ private ["_foundEntry", "_allUsedMedication","_allMedsFromClassname", "_usedMeds params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"]; _foundEntry = false; -_allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; +_allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; { _x params ["_variableX", "_allMedsFromClassname"]; if (_variableX== _variable) exitWith { @@ -30,7 +30,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; _allMedsFromClassname pushBack _className; _x set [1, _allMedsFromClassname]; _allUsedMedication set [_forEachIndex, _x]; - _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; + _target setVariable [QGVAR(allUsedMedication), _allUsedMedication]; }; _foundEntry = true; }; @@ -38,11 +38,11 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; if (!_foundEntry) then { _allUsedMedication pushBack [_variable, [_className]]; - _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; + _target setVariable [QGVAR(allUsedMedication), _allUsedMedication]; }; -_usedMeds = _target getvariable [_variable, 0]; +_usedMeds = _target getVariable [_variable, 0]; if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then { [_target] call FUNC(setDead); }; @@ -68,7 +68,7 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then { if (isNil _onOverDose) then { _onOverDose = compile _onOverDose; } else { - _onOverDose = missionNamespace getvariable _onOverDose; + _onOverDose = missionNamespace getVariable _onOverDose; }; [_target, _className] call _onOverDose; }; @@ -80,15 +80,15 @@ _viscosityAdjustment = _viscosityChange / _timeInSystem; params ["_args", "_idPFH"]; _args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"]; private "_usedMeds"; - _usedMeds = _target getvariable [_variable, 0]; + _usedMeds = _target getVariable [_variable, 0]; _usedMeds = _usedMeds - _decreaseAmount; - _target setvariable [_variable, _usedMeds]; + _target setVariable [_variable, _usedMeds]; _amountDecreased = _amountDecreased + _decreaseAmount; // Restoring the viscosity while the medication is leaving the system - _target setvariable [QGVAR(peripheralResistance), ((_target getvariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0]; - _target setvariable [QGVAR(painSuppress), ((_target getvariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; + _target setVariable [QGVAR(peripheralResistance), ((_target getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0]; + _target setVariable [QGVAR(painSuppress), ((_target getVariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then { [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index deb333fdd3..84fc33dec2 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -18,7 +18,7 @@ private ["_unit", "_injury", "_openWounds", "_injuryID", "_exists"]; params ["_unit", "_injury"]; if (!local _unit) then { - _openWounds = _unit getvariable[QGVAR(openWounds), []]; + _openWounds = _unit getVariable[QGVAR(openWounds), []]; _injuryID = _injury select 0; _exists = false; @@ -32,5 +32,5 @@ if (!local _unit) then { if (!_exists) then { _openWounds pushBack _injury; }; - _unit setvariable [QGVAR(openWounds), _openWounds]; + _unit setVariable [QGVAR(openWounds), _openWounds]; }; diff --git a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf index 11b13a9ad0..dff59fb2cf 100644 --- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf +++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf @@ -17,7 +17,7 @@ private ["_unit", "_openWounds", "_originOfrequest"]; params ["_unit", "_originOfrequest"]; if (local _unit && !(local _originOfrequest)) then { - _openWounds = _unit getvariable [QGVAR(openWounds), []]; + _openWounds = _unit getVariable [QGVAR(openWounds), []]; { ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent); } forEach _openWounds; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 5e36a56a87..42dd98dc1f 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -116,7 +116,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); if (isArray(_damageTypesConfig >> _x >> "thresholds")) then { _typeThresholds = getArray(_damageTypesConfig >> _x >> "thresholds");}; if (isNumber(_damageTypesConfig >> _x >> "selectionSpecific")) then { _selectionSpecificType = getNumber(_damageTypesConfig >> _x >> "selectionSpecific");}; }; - missionNamespace setvariable [_varName, [_typeThresholds, _selectionSpecificType > 0, _woundTypes]]; + missionNamespace setVariable [_varName, [_typeThresholds, _selectionSpecificType > 0, _woundTypes]]; private ["_minDamageThresholds", "_amountThresholds"]; // extension loading diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4e3fe5820e..bcb590143d 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -21,8 +21,8 @@ params ["_unit", "_pain"]; if (!local _unit || !GVAR(enableScreams)) exitWith{}; // Lock if the unit is already playing a sound. -if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {}; -_unit setvariable [QGVAR(playingInjuredSound),true]; +if ((_unit getVariable [QGVAR(playingInjuredSound),false])) exitWith {}; +_unit setVariable [QGVAR(playingInjuredSound),true]; // Play the sound if there is any damage present. if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { @@ -75,9 +75,9 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Clean up the lock [{ - (_this select 0) setvariable [QGVAR(playingInjuredSound),nil]; + (_this select 0) setVariable [QGVAR(playingInjuredSound),nil]; }, [_unit], _delay, _delay] call EFUNC(common,waitAndExecute); }; // Clean up in case there has not been played any sounds. -_unit setvariable [QGVAR(playingInjuredSound),nil]; +_unit setVariable [QGVAR(playingInjuredSound),nil]; diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf index feb46633d8..1d7d6de53f 100644 --- a/addons/medical/functions/fnc_requestWoundSync.sqf +++ b/addons/medical/functions/fnc_requestWoundSync.sqf @@ -17,6 +17,6 @@ params [ "_target", "_caller"]; if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information -if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {}; -_target setvariable [QGVAR(isWoundSynced), true]; +if (_target getVariable [QGVAR(isWoundSynced), false]) exitWith {}; +_target setVariable [QGVAR(isWoundSynced), true]; ["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 6e770ae6d2..7b2c195f10 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -17,9 +17,9 @@ private "_timeInCardiacArrest"; params ["_unit"]; -if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {}; -_unit setvariable [QGVAR(inCardiacArrest), true,true]; -_unit setvariable [QGVAR(heartRate), 0]; +if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {}; +_unit setVariable [QGVAR(inCardiacArrest), true,true]; +_unit setVariable [QGVAR(heartRate), 0]; ["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent); @@ -31,14 +31,14 @@ _timeInCardiacArrest = 120 + round(random(600)); params ["_args", "_idPFH"]; _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; - _heartRate = _unit getvariable [QGVAR(heartRate), 80]; + _heartRate = _unit getVariable [QGVAR(heartRate), 80]; if (_heartRate > 0 || !alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inCardiacArrest), nil,true]; + _unit setVariable [QGVAR(inCardiacArrest), nil,true]; }; if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inCardiacArrest), nil,true]; + _unit setVariable [QGVAR(inCardiacArrest), nil,true]; [_unit] call FUNC(setDead); }; }, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 4f0d8e76c7..9518338de6 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -24,9 +24,9 @@ if (!local _unit) exitWith { _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith { - if (_unit getvariable [QGVAR(inReviveState), false]) exitWith { + if (_unit getVariable [QGVAR(inReviveState), false]) exitWith { if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; if (_lifesLeft == 0) then { [_unit, true] call FUNC(setDead); }; @@ -35,45 +35,45 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == false; }; - _unit setvariable [QGVAR(inReviveState), true, true]; - _unit setvariable [QGVAR(reviveStartTime), ACE_time]; + _unit setVariable [QGVAR(inReviveState), true, true]; + _unit setVariable [QGVAR(reviveStartTime), ACE_time]; [_unit, true] call FUNC(setUnconscious); [{ private "_startTime"; params ["_args", "_idPFH"]; _args params ["_unit"]; - _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; + _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inReviveState), nil, true]; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(inReviveState), nil, true]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_unit, true] call FUNC(setDead); }; - if !(_unit getvariable [QGVAR(inReviveState), false]) exitWith { + if !(_unit getVariable [QGVAR(inReviveState), false]) exitWith { // revived without dieing, so in case we have lifes, remove one. if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; - _unit setvariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; }; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (GVAR(level) >= 2) then { - if (_unit getvariable [QGVAR(heartRate), 60] > 0) then { - _unit setvariable [QGVAR(heartRate), 0]; + if (_unit getVariable [QGVAR(heartRate), 60] > 0) then { + _unit setVariable [QGVAR(heartRate), 0]; }; }; }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; false; }; -_unit setvariable ["ACE_isDead", true, true]; +_unit setVariable ["ACE_isDead", true, true]; if (isPLayer _unit) then { - _unit setvariable ["isDeadPlayer", true, true]; + _unit setVariable ["isDeadPlayer", true, true]; }; ["medical_onSetDead", [_unit]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 1b54177212..910745d7bb 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -33,7 +33,7 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {}; if !(_set) exitWith { - _unit setvariable ["ACE_isUnconscious", false, true]; + _unit setVariable ["ACE_isUnconscious", false, true]; }; if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{}; @@ -42,7 +42,7 @@ if (!local _unit) exitWith { [[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; -_unit setvariable ["ACE_isUnconscious", true, true]; +_unit setVariable ["ACE_isUnconscious", true, true]; _unit setUnconscious true; if (_unit == ACE_player) then { diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index e0ea58e1c4..b8ca4355c4 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -42,7 +42,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitWith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]; }; 0; }; @@ -63,7 +63,7 @@ if (isText (_config >> "Condition")) then { if (isNil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (typeName _condition == "BOOL") then { _return = _condition; @@ -75,7 +75,7 @@ if (isText (_config >> "Condition")) then { if (!_return) exitWith {false}; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -97,7 +97,7 @@ if ("All" in _locations) then { if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if !(isNil _x) exitWith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere @@ -119,7 +119,7 @@ _consumeItems = if (isNumber (_config >> "itemConsumed")) then { } else { // Check for required class if (isText (_config >> "itemConsumed")) exitWith { - missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; + missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; }; 0; }; @@ -135,19 +135,19 @@ if (_callbackProgress == "") then { if (isNil _callbackProgress) then { _callbackProgress = compile _callbackProgress; } else { - _callbackProgress = missionNamespace getvariable _callbackProgress; + _callbackProgress = missionNamespace getVariable _callbackProgress; }; // Patient Animation _patientAnim = getText (_config >> "animationPatient"); -if (_target getvariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { +if (_target getVariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then { _patientAnim = getText (_config >> "animationPatientUnconscious"); }; }; if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then { - if (_target getvariable ["ACE_isUnconscious", false]) then { + if (_target getVariable ["ACE_isUnconscious", false]) then { [_target, _patientAnim, 2, true] call EFUNC(common,doAnimation); } else { [_target, _patientAnim, 1, true] call EFUNC(common,doAnimation); @@ -160,7 +160,7 @@ if (_caller == _target) then { _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); }; -_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; +_caller setVariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -184,12 +184,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { if ((stance _caller) == "STAND") then { switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon - case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; - case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; - case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; + case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; + case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; + case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; }; } else { - _caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; @@ -203,7 +203,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { if (isNil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { - _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; + _treatmentTimeConfig = missionNamespace getVariable _treatmentTimeConfig; }; if (typeName _treatmentTimeConfig == "SCALAR") exitWith { _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index f09de600ae..f86e620625 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -18,7 +18,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items"]; -if (alive _target && {(_target getvariable [QGVAR(inCardiacArrest), false] || _target getvariable [QGVAR(inReviveState), false])}) then { +if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _target getVariable [QGVAR(inReviveState), false])}) then { [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index 9024489a3b..7f273d1fad 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -17,17 +17,17 @@ private "_reviveStartTime"; params ["_caller","_target"]; -if (_target getvariable [QGVAR(inReviveState), false]) then { - _reviveStartTime = _target getvariable [QGVAR(reviveStartTime),0]; +if (_target getVariable [QGVAR(inReviveState), false]) then { + _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0]; if (_reviveStartTime > 0) then { - _target setvariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; + _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; }; }; if (GVAR(level) > 1 && {(random 1) >= 0.6}) then { - _target setvariable [QGVAR(inCardiacArrest), nil,true]; - _target setvariable [QGVAR(heartRate), 40]; - _target setvariable [QGVAR(bloodPressure), [50,70]]; + _target setVariable [QGVAR(inCardiacArrest), nil,true]; + _target setVariable [QGVAR(heartRate), 40]; + _target setVariable [QGVAR(bloodPressure), [50,70]]; }; [_target, "activity", LSTRING(Activity_CPR), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 81ffd1bd20..fe97fad031 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber); if (_part < 0) exitWith {false}; // Get the open wounds for this unit -_openWounds = _target getvariable [QGVAR(openWounds), []]; +_openWounds = _target getVariable [QGVAR(openWounds), []]; if (count _openWounds == 0) exitWith {false}; // nothing to do here! // Get the default effectiveness for the used bandage @@ -84,7 +84,7 @@ _impact = if ((_mostEffectiveInjury select 3) >= _effectivenessFound) then {_eff _mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _impact) max 0]; _openWounds set [_mostEffectiveSpot, _mostEffectiveInjury]; -_target setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; +_target setVariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; if (USE_WOUND_EVENT_SYNC) then { ["medical_propagateWound", [_target, _mostEffectiveInjury]] call EFUNC(common,globalEvent); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index 8f27901eaa..e3befb13a9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -20,17 +20,17 @@ if (alive _target) exitWith { _target setVariable [QGVAR(bloodVolume), 100, true]; // tourniquets - _target setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; + _target setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; // wounds and injuries - _target setvariable [QGVAR(openWounds), [], true]; - _target setvariable [QGVAR(bandagedWounds), [], true]; + _target setVariable [QGVAR(openWounds), [], true]; + _target setVariable [QGVAR(bandagedWounds), [], true]; _target setVariable [QGVAR(internalWounds), [], true]; // vitals _target setVariable [QGVAR(heartRate), 80]; - _target setvariable [QGVAR(heartRateAdjustments), []]; - _target setvariable [QGVAR(bloodPressure), [80, 120]]; + _target setVariable [QGVAR(heartRateAdjustments), []]; + _target setVariable [QGVAR(bloodPressure), [80, 120]]; _target setVariable [QGVAR(peripheralResistance), 100]; // fractures @@ -42,27 +42,27 @@ if (alive _target) exitWith { _target setVariable [QGVAR(bloodIVVolume), 0]; // damage storage - _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; + _target setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; // airway - _target setvariable [QGVAR(airwayStatus), 100, true]; + _target setVariable [QGVAR(airwayStatus), 100, true]; _target setVariable [QGVAR(airwayOccluded), false, true]; - _target setvariable [QGVAR(airwayCollapsed), false, true]; + _target setVariable [QGVAR(airwayCollapsed), false, true]; // generic medical admin - _target setvariable [QGVAR(addedToUnitLoop), false, true]; - _target setvariable [QGVAR(inCardiacArrest), false, true]; - _target setvariable [QGVAR(inReviveState), false, true]; + _target setVariable [QGVAR(addedToUnitLoop), false, true]; + _target setVariable [QGVAR(inCardiacArrest), false, true]; + _target setVariable [QGVAR(inReviveState), false, true]; _target setVariable ["ACE_isUnconscious", false, true]; - _target setvariable [QGVAR(hasLostBlood), 0, true]; - _target setvariable [QGVAR(isBleeding), false, true]; - _target setvariable [QGVAR(hasPain), false, true]; - _target setvariable [QGVAR(painSuppress), 0, true]; + _target setVariable [QGVAR(hasLostBlood), 0, true]; + _target setVariable [QGVAR(isBleeding), false, true]; + _target setVariable [QGVAR(hasPain), false, true]; + _target setVariable [QGVAR(painSuppress), 0, true]; // medication _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; { - _target setvariable [_x select 0, nil]; + _target setVariable [_x select 0, nil]; } forEach _allUsedMedication; // Resetting damage diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index c2797d825d..952f245da9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -20,9 +20,9 @@ params ["_target", "_className"]; // We have added a new dose of this medication to our system, so let's increase it _varName = format[QGVAR(%1_inSystem), _className]; -_currentInSystem = _target getvariable [_varName, 0]; +_currentInSystem = _target getVariable [_varName, 0]; _currentInSystem = _currentInSystem + 1; -_target setvariable [_varName, _currentInSystem]; +_target setVariable [_varName, _currentInSystem]; // Find the proper attributes for the used medication _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication"); @@ -51,11 +51,11 @@ if (isClass (_medicationConfig >> _className)) then { if (isNil _hrCallback) then { _hrCallback = compile _hrCallback; } else { - _hrCallback = missionNamespace getvariable _hrCallback; + _hrCallback = missionNamespace getVariable _hrCallback; }; // Adjust the heart rate based upon config entry -_heartRate = _target getvariable [QGVAR(heartRate), 70]; +_heartRate = _target getVariable [QGVAR(heartRate), 70]; if (alive _target) then { if (_heartRate > 0) then { if (_heartRate <= 45) then { @@ -72,17 +72,17 @@ if (alive _target) then { if (_painReduce > 0) then { // Reduce pain - _painSuppress = _target getvariable [QGVAR(painSuppress), 0]; - _target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; + _painSuppress = _target getVariable [QGVAR(painSuppress), 0]; + _target setVariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; if (!GVAR(painIsOnlySuppressed)) then { - _pain = _target getvariable [QGVAR(pain), 0]; - _target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; + _pain = _target getVariable [QGVAR(pain), 0]; + _target setVariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; }; }; -_resistance = _target getvariable [QGVAR(peripheralResistance), 100]; +_resistance = _target getVariable [QGVAR(peripheralResistance), 100]; _resistance = _resistance + _viscosityChange; -_target setvariable [QGVAR(peripheralResistance), _resistance max 0]; +_target setVariable [QGVAR(peripheralResistance), _resistance max 0]; // Call back to ensure that the medication is decreased over time [_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage); diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index 7e85900a59..da01b9ba68 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -18,7 +18,7 @@ params ["_target", "_selectionName"]; -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); @@ -33,8 +33,8 @@ if ((_damageBodyParts select _part) > 0) then { _damageOnPart = _damageOnPart - BANDAGEHEAL; }; _damageBodyParts set [_part, _damageOnPart max 0]; - _target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; - TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); + _target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; + TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); }; EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); diff --git a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf index d387e91f89..f15dbd0c71 100644 --- a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf @@ -19,6 +19,6 @@ params ["_caller", "_target","_className"]; [_target, false] call FUNC(setUnconscious); -if (_target getvariable [QGVAR(inReviveState), false]) then { - _target setvariable [QGVAR(inReviveState), nil, true]; +if (_target getVariable [QGVAR(inReviveState), false]) then { + _target setVariable [QGVAR(inReviveState), nil, true]; }; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index bd0f9b623a..ef8a83af65 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -18,7 +18,7 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; params ["_target", "_treatmentClassname"]; -_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; +_bloodVolume = _target getVariable [QGVAR(bloodVolume), 100]; if (_bloodVolume >= 100) exitWith {}; // Find the proper attributes for the used IV @@ -35,7 +35,7 @@ if (isClass (_config >> _treatmentClassname)) then { }; _varName = format["ACE_Medical_IVVolume_%1",_typeOf]; -_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded, true]; +_target setVariable [_varName, (_target getVariable [_varName, 0]) + _volumeAdded, true]; if !(_varName in GVAR(IVBags)) then { GVAR(IVBags) pushBack _varName; diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index 45d5f58630..8f45ada7c3 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -32,7 +32,7 @@ if (_part == 0 || _part == 1) exitWith { false; }; -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; if ((_tourniquets select _part) > 0) exitWith { _output = "There is already a tourniquet on this body part!"; // TODO localization ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index ae25b8c748..be9b03c9f1 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -21,10 +21,10 @@ params ["_target", "_tourniquetItem", "_selectionName"]; _part = [_selectionName] call FUNC(selectionNameToNumber); // Place a tourniquet on the bodypart -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; _applyingTo = (_tourniquets select _part) + 1 + round(random(100)); _tourniquets set[_part, _applyingTo]; -_target setvariable [QGVAR(tourniquets), _tourniquets, true]; +_target setVariable [QGVAR(tourniquets), _tourniquets, true]; [{ params ["_args", "_idPFH"]; @@ -34,13 +34,13 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; - _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; + _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; if !((_tourniquets select _part) == _applyingTo) exitWith { // Tourniquet has been removed [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (ACE_time - _time > 120) then { - _target setvariable [QGVAR(pain), (_target getvariable [QGVAR(pain), 0]) + 0.005]; + _target setVariable [QGVAR(pain), (_target getVariable [QGVAR(pain), 0]) + 0.005]; }; }, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index b0c0c5c5ad..4029721566 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; //Don't play another medic animation (when player is rapidily treating) TRACE_2("Reseting to old animation", animationState player, _lastAnim); switch (toLower _lastAnim) do { @@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then { [_caller, _lastAnim, 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; +_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; @@ -67,7 +67,7 @@ _callback = getText (_config >> "callbackFailure"); _callback = if (isNil _callback) then { compile _callback } else { - missionNamespace getvariable _callback + missionNamespace getVariable _callback }; _args call _callback; diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index c2347c59ee..edd4f23f1d 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; //Don't play another medic animation (when player is rapidily treating) TRACE_2("Reseting to old animation", animationState player, _lastAnim); switch (toLower _lastAnim) do { @@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then { [_caller, _lastAnim, 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; +_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; @@ -62,7 +62,7 @@ _callback = getText (_config >> "callbackSuccess"); if (isNil _callback) then { _callback = compile _callback; } else { - _callback = missionNamespace getvariable _callback; + _callback = missionNamespace getVariable _callback; }; //Get current damage before treatment (for litter) @@ -81,7 +81,7 @@ _args pushBack _previousDamage; _args call FUNC(createLitter); //If we're not already tracking vitals, start: -if (!(_target getvariable [QGVAR(addedToUnitLoop),false])) then { +if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then { [_target] call FUNC(addToInjuredCollection); }; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 698e327d0e..2922cae465 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -47,8 +47,8 @@ if (!alive _unit) exitWith { }; // In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation -if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith { - TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit); +if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith { + TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit); // TODO, handle this with carry instead, so we can remove the PFH here. // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then { @@ -129,9 +129,9 @@ if (_parachuteCheck) then { }; if (!local _unit) exitWith { - TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); + TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments)); _args set [3, _minWaitingTime - (ACE_time - _startingTime)]; - _unit setvariable [QGVAR(unconsciousArguments), _args, true]; + _unit setVariable [QGVAR(unconsciousArguments), _args, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -139,6 +139,6 @@ if (!local _unit) exitWith { if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); if (!([_unit] call FUNC(getUnconsciousCondition))) then { - _unit setvariable ["ACE_isUnconscious", false, true]; + _unit setVariable ["ACE_isUnconscious", false, true]; }; }; diff --git a/addons/medical/ui/RscTitles.hpp b/addons/medical/ui/RscTitles.hpp index 06d1dda866..b81643990c 100644 --- a/addons/medical/ui/RscTitles.hpp +++ b/addons/medical/ui/RscTitles.hpp @@ -59,7 +59,7 @@ class Rsctitles { style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW font = "PuristaMedium"; colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(Injuries); }; class InjuryList: ACE_gui_listBoxBase { diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp index f8b0b21a71..74ce4a8e18 100644 --- a/addons/medical/ui/triagecard.hpp +++ b/addons/medical/ui/triagecard.hpp @@ -113,7 +113,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',0,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',0,true)];); }; class selectTriageStatusMinor: selectTriageStatus { idc = 2003; @@ -131,7 +131,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',1,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',1,true)];); }; class selectTriageStatusDelayed: selectTriageStatus { idc = 2004; @@ -149,7 +149,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',2,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',2,true)];); }; class selectTriageStatusImmediate: selectTriageStatus { idc = 2005; @@ -167,7 +167,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 3, true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel', 3, true)];); }; class selectTriageStatusDeceased: selectTriageStatus { idc = 2006; @@ -185,7 +185,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 4, true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel', 4, true)];); }; }; }; \ No newline at end of file diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index 9fb41eb97f..67e295e22e 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -65,7 +65,7 @@ if (_name isEqualTo "triage") exitWith { ctrlEnable [212, true]; private ["_log", "_triageCardTexts", "_message"]; - _log = GVAR(INTERACTION_TARGET) getvariable [QEGVAR(medical,triageCard), []]; + _log = GVAR(INTERACTION_TARGET) getVariable [QEGVAR(medical,triageCard), []]; _triageCardTexts = []; { _x params ["_item", "_amount", "_time"]; diff --git a/addons/medical_menu/functions/fnc_setTriageStatus.sqf b/addons/medical_menu/functions/fnc_setTriageStatus.sqf index 7e7c764aee..8a85eeb950 100644 --- a/addons/medical_menu/functions/fnc_setTriageStatus.sqf +++ b/addons/medical_menu/functions/fnc_setTriageStatus.sqf @@ -15,4 +15,4 @@ params ["_target", "_status"]; -_target setvariable [QEGVAR(medical,triageLevel), _status, true]; +_target setVariable [QEGVAR(medical,triageLevel), _status, true]; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 8c2090fc73..412a2045e6 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -128,7 +128,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab ] select _forEachIndex); _allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]]; }; - } forEach (_target getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]); + } forEach (_target getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]); }; [_selectionBloodLoss, _damaged, _display] call FUNC(updateBodyImage); diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp index 29247b6071..5968a643ff 100644 --- a/addons/medical_menu/ui/menu.hpp +++ b/addons/medical_menu/ui/menu.hpp @@ -19,8 +19,8 @@ class GVAR(medicalMenu) { y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; h = "16 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; - colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; - colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; }; class BottomBackground: CenterBackground { y = "(18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; @@ -40,7 +40,7 @@ class GVAR(medicalMenu) { font = "PuristaMedium"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = ""; }; diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp index 2eeb99563c..28c664b6d8 100644 --- a/addons/microdagr/gui.hpp +++ b/addons/microdagr/gui.hpp @@ -59,10 +59,10 @@ class GVAR(TheDialog) { //Redfine Scaling for the RscTitle -#define PROFILE_X (profilenamespace getvariable ['IGUI_GRID_GPS_X', 0]) -#define PROFILE_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y', 0]) -#define PROFILE_W (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1]) -#define PROFILE_H ((16/9) * (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1])) +#define PROFILE_X (profilenamespace getVariable ['IGUI_GRID_GPS_X', 0]) +#define PROFILE_Y (profilenamespace getVariable ['IGUI_GRID_GPS_Y', 0]) +#define PROFILE_W (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1]) +#define PROFILE_H ((16/9) * (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1])) #define X_PART(num) QUOTE((num) / 25 * PROFILE_W + PROFILE_X) #define Y_PART(num) QUOTE((num) / 25 * PROFILE_H + PROFILE_Y) diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp index 740334886c..a114896044 100644 --- a/addons/mk6mortar/RscInGameUI.hpp +++ b/addons/mk6mortar/RscInGameUI.hpp @@ -9,8 +9,8 @@ class RscInGameUI { idc = 80085; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0.1}; - x = "(profilenamespace getvariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; + x = "(profilenamespace getVariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; }; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index bbc27b7eef..0b8cc67842 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -12,7 +12,7 @@ private _logicType = typeOf _logic; _logic hideobject true; - if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; + if (_logic getVariable [QGVAR(initalized), false]) exitWith {}; private _config = (configFile >> "CfgVehicles" >> _logicType); if !(isClass _config) exitWith {}; @@ -24,7 +24,7 @@ if (isNil _function) then { _function = compile _function; } else { - _function = missionNamespace getvariable _function; + _function = missionNamespace getVariable _function; }; if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); @@ -36,7 +36,7 @@ }; if !(_isPersistent) then { - _logic setvariable [QGVAR(initalized), true]; + _logic setVariable [QGVAR(initalized), true]; }; if (_isDisposable) then { diff --git a/addons/nametags/RscTitles.hpp b/addons/nametags/RscTitles.hpp index 7f0ddc2135..f0d5678603 100644 --- a/addons/nametags/RscTitles.hpp +++ b/addons/nametags/RscTitles.hpp @@ -27,10 +27,10 @@ class RscTitles { size = 0.018; colorBackground[] = { 0, 0, 0, 0 }; colortext[] = { - "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" + "(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])" }; text = ""; class Attributes { diff --git a/addons/optionsmenu/functions/fnc_exportSettings.sqf b/addons/optionsmenu/functions/fnc_exportSettings.sqf index 172a95808e..32e52c41df 100644 --- a/addons/optionsmenu/functions/fnc_exportSettings.sqf +++ b/addons/optionsmenu/functions/fnc_exportSettings.sqf @@ -39,7 +39,7 @@ private ["_compiledConfig", "_name", "_typeName", "_isClientSetable", "_localize _defaultValue = _x select 6; if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then { - _value = missionNamespace getvariable [_name, _defaultValue]; + _value = missionNamespace getVariable [_name, _defaultValue]; _formatedValue = switch (toLower _typeName) do { case ("scalar"): { format['value = %1;', _value]; diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf index 5cc16312f9..5b302a510d 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -18,7 +18,7 @@ _logic = _this select 0; if (isMultiplayer) exitWith {}; -if (_logic getvariable ["allowconfigurationExport", false]) then { +if (_logic getVariable ["allowconfigurationExport", false]) then { GVAR(serverConfigGeneration) = 1; } else { GVAR(serverConfigGeneration) = 0; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 4283f43218..8e09608e07 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -57,7 +57,7 @@ GVAR(serverSideValues) = []; [{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); disableSerialization; -_menu = uiNamespace getvariable "ACE_serverSettingsMenu"; +_menu = uiNamespace getVariable "ACE_serverSettingsMenu"; (_menu displayCtrl 1003) ctrlEnable false; if (GVAR(ClientSettingsExportIncluded)) then { diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf index c71a26a6e7..104d8195cf 100644 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf @@ -44,7 +44,7 @@ GVAR(clientSideColors) = []; [{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); disableSerialization; -_menu = uiNamespace getvariable "ACE_settingsMenu"; +_menu = uiNamespace getVariable "ACE_settingsMenu"; (_menu displayCtrl 1002) ctrlEnable false; (_menu displayCtrl 1003) ctrlEnable false; diff --git a/addons/optionsmenu/functions/fnc_updateSetting.sqf b/addons/optionsmenu/functions/fnc_updateSetting.sqf index 370aa1f766..7374d1f2c1 100644 --- a/addons/optionsmenu/functions/fnc_updateSetting.sqf +++ b/addons/optionsmenu/functions/fnc_updateSetting.sqf @@ -85,7 +85,7 @@ switch (_type) do { if (_changed) then { if (GVAR(serverConfigGeneration) > 0) then { if !(isMultiplayer) then { - missionNamespace setvariable [_name, _newValue]; + missionNamespace setVariable [_name, _newValue]; }; } else { profileNamespace setVariable [_name, _newValue]; diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index 513692eaab..3333c5476f 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -166,8 +166,8 @@ class RscDisplayMain: RscStandardDisplay { fontBold = "PuristaLight"; }; colorBold[] = {0.6,0.6,0.6,1}; - colorLink[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorLinkActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + colorLink[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; + colorLinkActive[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; }; }; }; diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp index cd65eb966d..37950b1c42 100644 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ b/addons/optionsmenu/gui/settingsMenu.hpp @@ -33,15 +33,15 @@ class ACE_settingsMenu { font = "PuristaMedium"; SizeEx = H_PART(1); colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = ""; }; class CenterBackground: HeaderBackground { y = Y_PART(2.1); h = H_PART(2.5); text = ""; - colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; - colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; }; class LeftBackground: CenterBackground { y = Y_PART(4.8); diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index d7f40c4d91..6680b759c4 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -161,7 +161,7 @@ if (stance _unit == "PRONE") then { }; }; -if ("Jam" in (missionNamespace getvariable ["ACE_Debug", []])) then { +if ("Jam" in (missionNamespace getVariable ["ACE_Debug", []])) then { _jamChance = 0.5; }; diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf index e457e023c6..9ade177af0 100644 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf @@ -62,7 +62,7 @@ if (_distance < _backblastRange) then { [_damage * 100] call BIS_fnc_bloodEffect; if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then { - [_firer, "body", ((_firer getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); + [_firer, "body", ((_firer getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); } else { _firer setDamage (damage _firer + _damage); }; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index f9c58050e0..efba4ed73e 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -56,7 +56,7 @@ TRACE_4("Parameters:",_overpressureAngle,_overpressureRange,_overpressureDamage, if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect}; if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_x] call EFUNC(medical,hasMedicalEnabled))}) then { - [_x, "body", ((_x getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); + [_x, "body", ((_x getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); } else { _x setDamage (damage _x + _damage); }; diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf index 8301007fa3..dfe22b4bc0 100644 --- a/addons/parachute/functions/fnc_checkCutParachute.sqf +++ b/addons/parachute/functions/fnc_checkCutParachute.sqf @@ -16,4 +16,4 @@ #include "script_component.hpp" private["_unit"]; _unit = _this select 0; -(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getvariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) \ No newline at end of file +(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) \ No newline at end of file diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index baa93bbae0..42ad18b304 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -18,7 +18,7 @@ private ["_unit","_backpack"]; _unit = _this select 0; _backpack = (_this select 1) select 6; -if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then { +if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) then { _unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); } else { if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then { diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index cf2d4276cf..db942f8c2e 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -131,7 +131,7 @@ if (isNil _callbackProgress) then { // Player Animation _callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE"); -_caller setvariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; +_caller setVariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -149,9 +149,9 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { }; if (stance _caller == "STAND") then { - _caller setvariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; + _caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; } else { - _caller setvariable [QGVAR(repairPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 6e27ab07a7..780e9f273e 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -33,7 +33,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (vehicle _caller == _caller) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; +_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index ccad93663f..da4b607048 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -31,7 +31,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (vehicle _caller == _caller) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; +_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index a3ad215ea2..392cd9a43d 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -184,9 +184,9 @@ class GVAR(interface) { colorBorder[] = {0,0,0,0}; colorBackground[] = {COL_BACK}; colorSelect[] = { - "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", - "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", - "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", + "profilenamespace getVariable ['GUI_BCG_RGB_R',0.77]", + "profilenamespace getVariable ['GUI_BCG_RGB_G',0.51]", + "profilenamespace getVariable ['GUI_BCG_RGB_B',0.08]", 1 }; multiselectEnabled = 0; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index c79310217c..897f51532d 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -17,7 +17,7 @@ if (!isServer) exitWith {}; params ["_object"]; -if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; +if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; { _x addCuratorEditableObjects [[_object], true]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index aa7b91b753..55da13212a 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -30,7 +30,7 @@ if (_activated) then { }; //--- Get curator owner - _ownerVar = _logic getvariable ["owner",""]; + _ownerVar = _logic getVariable ["owner",""]; _ownerUID = parsenumber _ownerVar; if (cheatsenabled) then { _ownerVarArray = toarray _ownerVar; @@ -47,7 +47,7 @@ if (_activated) then { _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted"; //--- Wipe out the variable so clients can't access it - _logic setvariable ["owner",nil]; + _logic setVariable ["owner",nil]; //--- Server if (isserver) then { @@ -58,11 +58,11 @@ if (_activated) then { _letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; _adminVar = "admin_"; for "_i" from 0 to 9 do {_adminVar = _adminVar + (_letters call bis_fnc_selectrandom);}; - _logic setvariable ["adminVar",_adminVar,true]; + _logic setVariable ["adminVar",_adminVar,true]; }; //--- Get allowed addons - _addonsType = _logic getvariable ["Addons",0]; + _addonsType = _logic getVariable ["Addons",0]; _addons = []; switch _addonsType do { @@ -108,8 +108,8 @@ if (_activated) then { if (_adminVar != "") then {_ownerVar = _adminVar;}; - _forced = _logic getvariable ["forced",0] > 0; - _name = _logic getvariable ["name",""]; + _forced = _logic getVariable ["forced",0] > 0; + _name = _logic getVariable ["name",""]; if (_name == "") then {_name = localize "STR_A3_curator";}; //--- Wait until mission starts @@ -130,7 +130,7 @@ if (_activated) then { }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; + waituntil {isplayer (missionnamespace getVariable [_ownerVar,objnull]) || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -144,7 +144,7 @@ if (_activated) then { } forEach playableunits; }; default { - _player = missionnamespace getvariable [_ownerVar,objnull]; + _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 [{ @@ -163,7 +163,7 @@ if (_activated) then { _player = _this select 1; //--- Sent notification to all assigned players - if ((_logic getvariable ["showNotification",true]) && GVAR(zeusAscension)) then { + if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then { { if (isplayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; @@ -191,7 +191,7 @@ if (_activated) then { }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; + waituntil {_player != missionnamespace getVariable [_ownerVar,objnull] || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -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}; @@ -211,7 +211,7 @@ if (_activated) then { _addons = []; { if (typeOf _x == "ModuleCuratorAddAddons_F") then { - _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); + _paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]"); { if !(_x in _addons) then {_addons set [count _addons,_x];}; { @@ -228,10 +228,10 @@ if (_activated) then { if (GVAR(zeusBird)) then { //--- Create bird - _birdType = _logic getvariable ["birdType","eagle_f"]; + _birdType = _logic getVariable ["birdType","eagle_f"]; if (_birdType != "") then { _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; - _logic setvariable ["bird",_bird,true]; + _logic setVariable ["bird",_bird,true]; }; //--- Locality changed @@ -239,7 +239,7 @@ if (_activated) then { "local", { _logic = _this select 0; - _bird = _logic getvariable ["bird",objnull]; + _bird = _logic getVariable ["bird",objnull]; _bird setowner owner _logic; } ]; @@ -253,7 +253,7 @@ if (_activated) then { _serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"}; //--- Black effect until the interface is open - _forced = _logic getvariable ["forced",0] > 0; + _forced = _logic getVariable ["forced",0] > 0; if (_forced) then { _isCurator = switch true do { case (_ownerUID > 0): { @@ -263,7 +263,7 @@ if (_activated) then { isserver || servercommandavailable _serverCommand }; default { - player == missionnamespace getvariable [_ownerVar,objnull] + player == missionnamespace getVariable [_ownerVar,objnull] }; }; if (_isCurator) then { @@ -274,11 +274,11 @@ if (_activated) then { //--- Check if player is server admin if (_isAdmin) then { - _adminVar = _logic getvariable ["adminVar",""]; - _logic setvariable ["adminVar",nil]; + _adminVar = _logic getVariable ["adminVar",""]; + _logic setVariable ["adminVar",nil]; if (isserver) then { //--- Host - missionnamespace setvariable [_adminVar,player]; + missionnamespace setVariable [_adminVar,player]; } else { //--- Client [_logic,_adminVar,_serverCommand] spawn { @@ -289,12 +289,12 @@ if (_activated) then { _serverCommand = _this select 2; while {true} do { waituntil {sleep 0.1; servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,player]; + missionnamespace setVariable [_adminVar,player]; publicvariable _adminVar; _respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; waituntil {sleep 0.1; !servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,objnull]; + missionnamespace setVariable [_adminVar,objnull]; publicvariable _adminVar; player removeeventhandler ["respawn",_respawn]; }; @@ -319,7 +319,7 @@ if (_activated) then { //--- Show hint about pinging for players if ( - isNil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} + isNil {profilenamespace getVariable "bis_fnc_curatorPinged_done"} && {isTutHintsEnabled} && diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 5154844eb7..dd139a3c5c 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,12 +39,12 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; + _ammo = _logic getVariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; if (_ammo != "") then { _CfgAmmo = configFile >> "CfgAmmo" >> _ammo; //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeOf _logic; - _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction + _logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; @@ -104,9 +104,9 @@ if (_activated) then { _side = side group _x; if (_side in [east,west,resistance,civilian]) then { //--- Play radio (only if it wasn't played recently) - if (ACE_time > _x getvariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { + if (ACE_time > _x getVariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { [[_side,_radio,"side"],"bis_fnc_sayMessage",_x] call bis_fnc_mp; - _x setvariable ["BIS_fnc_moduleProjectile_radio",ACE_time + _delay]; + _x setVariable ["BIS_fnc_moduleProjectile_radio",ACE_time + _delay]; }; }; }; @@ -117,8 +117,8 @@ if (_activated) then { [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber; - _radio = _logic getvariable ["radio",_radio]; + _altitude = (_logic getVariable ["altitude",_altitude]) call bis_fnc_parsenumber; + _radio = _logic getVariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; @@ -164,7 +164,7 @@ if (_activated) then { _projectile setposasl _posNew; _pos = getposatl _logic; _dir = direction _logic; - missionnamespace setvariable [_dirVar,_dir]; + missionnamespace setVariable [_dirVar,_dir]; }; sleep 0.1; isnull _projectile || isnull _logic @@ -183,7 +183,7 @@ if (_activated) then { } else { //--- Repeat to achieve permanent effect - _repeat = _logic getvariable ["repeat",0] > 0; + _repeat = _logic getVariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6077e447df..d4032e1b42 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -23,11 +23,11 @@ _activated = _this select 2; if (_activated && local _logic && !isnull curatorcamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; + if !(isnull (missionnamespace getVariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; //--- Get unit under cursor _unit = objnull; - _mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; + _mouseOver = missionnamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; _unit = effectivecommander _unit; @@ -37,7 +37,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if !(isnull (_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { @@ -47,7 +47,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { _vehicleRole = str assignedvehiclerole _unit; bis_fnc_moduleRemoteControl_unit = _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",player,true]; // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { @@ -125,12 +125,12 @@ if (_activated && local _logic && !isnull curatorcamera) then { || {isnull getassignedcuratorlogic player} //|| - //{_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] != player} //--- Another curator stole the unit + //{_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] != player} //--- Another curator stole the unit }; player addrating (-rating player + _rating); objnull remotecontrol _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; //--- Death screen if ( @@ -142,7 +142,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { && {!isnull getassignedcuratorlogic player} //&& - //{(_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} + //{(_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} ) then { sleep 2; ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1]; @@ -152,7 +152,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { _camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos; _camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10]; //[_camPos,_unit] call bis_fnc_setcuratorcamera; - (getassignedcuratorlogic player) setvariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; + (getassignedcuratorlogic player) setVariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index 661e33f907..d4acda3f54 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -41,7 +41,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { - _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + _unit setVariable [QEGVAR(medical,medicClass), 1, true]; }; }; }; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 22826108e7..1e710bf41b 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -40,7 +40,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then { - _unit setvariable [QEGVAR(medical,isMedicalFacility), true, true]; + _unit setVariable [QEGVAR(medical,isMedicalFacility), true, true]; }; }; }; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index 9e5e788461..4ffec3460e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -41,7 +41,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { - _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + _unit setVariable [QEGVAR(medical,medicClass), 1, true]; }; }; }; From e422388484df5871cbd7b0bb771a3762889dce74 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:28:01 +0100 Subject: [PATCH 13/18] fix waitUntil capitalization --- .../common/functions/fnc_receiveRequest.sqf | 2 +- addons/optics/XEH_postInit.sqf | 4 ++-- .../zeus/functions/fnc_bi_moduleCurator.sqf | 24 +++++++++---------- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- .../functions/fnc_bi_moduleProjectile.sqf | 4 ++-- .../functions/fnc_bi_moduleRemoteControl.sqf | 6 ++--- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index 1377f4ec35..e5885d70ce 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -53,7 +53,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn { private "_id"; _id = _target getVariable _requestID; - waituntil { + waitUntil { _id = _target getVariable _requestID; (ACE_time > _time || isNil "_id") diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf index 6214178ac9..bed38a5ced 100644 --- a/addons/optics/XEH_postInit.sqf +++ b/addons/optics/XEH_postInit.sqf @@ -6,8 +6,8 @@ if (!hasInterface) exitWith {}; GVAR(camera) = objNull; 0 = 0 spawn { - waituntil {!isNull ACE_player}; - waituntil {sleep 1; {_x != GVAR(camera)} count allMissionObjects "camera" == 0 && {isNull curatorCamera}}; + waitUntil {!isNull ACE_player}; + waitUntil {sleep 1; {_x != GVAR(camera)} count allMissionObjects "camera" == 0 && {isNull curatorCamera}}; GVAR(camera) cameraEffect ["TERMINATE", "BACK"]; camDestroy GVAR(camera); diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 55da13212a..fc21fe11e7 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -113,7 +113,7 @@ if (_activated) then { if (_name == "") then {_name = localize "STR_A3_curator";}; //--- Wait until mission starts - waituntil {time > 0}; // NOTE: DO NOT CHANGE TO ACE_TIME, IT BREAKS THE MODULE + waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO ACE_TIME, IT BREAKS THE MODULE //--- Refresh addon list, so it's broadcasted to clients _addons = curatoraddons _logic; @@ -124,13 +124,13 @@ if (_activated) then { //--- Wait for player to become Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; {getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic }; }; default { - waituntil {isplayer (missionnamespace getVariable [_ownerVar,objnull]) || isnull _logic}; + waitUntil {isplayer (missionnamespace getVariable [_ownerVar,objnull]) || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -148,8 +148,8 @@ if (_activated) then { }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; + waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + waitUntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; if (isnull _logic) exitWith {}; //--- Add radio channels @@ -185,13 +185,13 @@ if (_activated) then { //--- Wait for player to stop being Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; {getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic }; }; default { - waituntil {_player != missionnamespace getVariable [_ownerVar,objnull] || isnull _logic}; + waitUntil {_player != missionnamespace getVariable [_ownerVar,objnull] || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -202,7 +202,7 @@ if (_activated) then { } forEach (_logic getVariable ["channels",[]]); //--- Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; if (isnull _logic) exitWith {}; }; }; @@ -249,7 +249,7 @@ if (_activated) then { //--- Player if (hasinterface) then { - waituntil {local player}; + waitUntil {local player}; _serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"}; //--- Black effect until the interface is open @@ -288,12 +288,12 @@ if (_activated) then { _adminVar = _this select 1; _serverCommand = _this select 2; while {true} do { - waituntil {sleep 0.1; servercommandavailable _serverCommand}; + waitUntil {sleep 0.1; servercommandavailable _serverCommand}; missionnamespace setVariable [_adminVar,player]; publicvariable _adminVar; _respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; - waituntil {sleep 0.1; !servercommandavailable _serverCommand}; + waitUntil {sleep 0.1; !servercommandavailable _serverCommand}; missionnamespace setVariable [_adminVar,objnull]; publicvariable _adminVar; player removeeventhandler ["respawn",_respawn]; @@ -305,7 +305,7 @@ if (_activated) then { [_logic] spawn { _logic = _this select 0; sleep 1; - waituntil {alive player}; + waitUntil {alive player}; //--- Show warning when Zeus key is not assigned if (count (actionkeys "curatorInterface") == 0) then { diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index d652a1535f..2f863ac5b9 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -43,7 +43,7 @@ if (_activated) then { //--- Show hint to curator who placed the object [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; - waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; + waitUntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; deletevehicle _logic; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index dd139a3c5c..05d2e2d096 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -146,13 +146,13 @@ if (_activated) then { //--- Update if (_attach) then { - waituntil { + waitUntil { _soundSource setposatl getposatl _projectile; sleep 1; isnull _projectile || isnull _logic }; } else { - waituntil { + waitUntil { _soundSource setposatl getposatl _projectile; if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index d4032e1b42..7eec86bb7d 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -76,7 +76,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { //--- Wait for interface to close (finddisplay 312) closedisplay 2; - waituntil {isnull curatorcamera}; + waitUntil {isnull curatorcamera}; //--- Switch player remotecontrol _unit; @@ -106,7 +106,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { _vehicle = vehicle _unit; _vehicleRole = str assignedvehiclerole _unit; _rating = rating player; - waituntil { + waitUntil { //--- Refresh when vehicle or vehicle role changes if ((vehicle _unit != _vehicle || str assignedvehiclerole _unit != _vehicleRole) && {alive _unit}) then { player remotecontrol _unit; @@ -159,7 +159,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { opencuratorinterface; ppeffectdestroy _color; - waituntil {!isnull curatorcamera}; + waitUntil {!isnull curatorcamera}; player switchcamera cameraview; bis_fnc_moduleRemoteControl_unit = nil; ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1]; From 411a8d58f3d27440e1818480f24739ba36101c45 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:53:57 +0100 Subject: [PATCH 14/18] fix more setVariable and getVariable capitalization --- addons/common/XEH_preInit.sqf | 2 +- .../functions/fnc_displayTextStructured.sqf | 8 ++--- .../common/functions/fnc_resetAllDefaults.sqf | 2 +- .../functions/fnc_setDefinedVariable.sqf | 2 +- .../functions/fnc_getPlacedExplosives.sqf | 4 +-- .../functions/fnc_onInventoryChanged.sqf | 2 +- addons/medical/functions/fnc_canTreat.sqf | 8 ++--- addons/medical/functions/fnc_createLitter.sqf | 2 +- .../fnc_displayPatientInformation.sqf | 20 ++++++------- .../functions/fnc_handleBandageOpening.sqf | 12 ++++---- addons/medical/functions/fnc_handleDamage.sqf | 2 +- .../functions/fnc_handleDamage_basic.sqf | 10 +++---- addons/medical/functions/fnc_setDead.sqf | 30 +++++++++---------- addons/medical/functions/fnc_treatment.sqf | 28 ++++++++--------- .../fnc_treatmentBasic_bandageLocal.sqf | 6 ++-- addons/repair/functions/fnc_repair.sqf | 6 ++-- 16 files changed, 72 insertions(+), 72 deletions(-) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 3180eacb86..6f7d5deadc 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -51,7 +51,7 @@ PREP(fixCollision); PREP(fixFloating); PREP(fixLoweredRifleAnimation); PREP(fixPosition); -PREP(getAllDefinedSetVariables); +PREP(getAllDefinedsetVariables); PREP(getAllGear); PREP(getCaptivityStatus); PREP(getDeathAnim); diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 0bfef3d2f9..ce088163a6 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); /* // This does not function at the moment. Has been disabled until it fixed. -_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; +_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; +_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; */ _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index d9850ffd5b..ddde3e6090 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -39,6 +39,6 @@ if (isPlayer _unit) then { _unit setVariable [_x select 0, nil, _x select 3]; }; false -} count ([_unit] call FUNC(getAllDefinedSetVariables)); +} count ([_unit] call FUNC(getAllDefinedsetVariables)); _unit setVariable ["ACE_forceWalkStatusNumber", 0, true]; diff --git a/addons/common/functions/fnc_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index b6c8b2d601..9b7812ee82 100644 --- a/addons/common/functions/fnc_setDefinedVariable.sqf +++ b/addons/common/functions/fnc_setDefinedVariable.sqf @@ -1,6 +1,6 @@ /* * Author: Glowbal - * Setvariable value + * setVariable value * * Arguments: * 0: Unit diff --git a/addons/explosives/functions/fnc_getPlacedExplosives.sqf b/addons/explosives/functions/fnc_getPlacedExplosives.sqf index 56334af65b..e2e56824ec 100644 --- a/addons/explosives/functions/fnc_getPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_getPlacedExplosives.sqf @@ -44,9 +44,9 @@ _list = []; if (_adjustedList) then { _clackerList = _clackerList - ["X"]; if (count _clackerList == 0) then { - _unit SetVariable [QGVAR(Clackers), nil, true]; + _unit setVariable [QGVAR(Clackers), nil, true]; } else { - _unit SetVariable [QGVAR(Clackers), _clackerList, true]; + _unit setVariable [QGVAR(Clackers), _clackerList, true]; }; }; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 3e3e1b96d3..127cd8c105 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -29,7 +29,7 @@ _config = ConfigFile >> "CfgWeapons" >> _item; if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then { private ["_clackerItems"]; _clackerItems = _giver getVariable [QGVAR(Clackers), []]; - _receiver SetVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; + _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; _detonators = [_giver] call FUNC(getDetonators); if (count _detonators == 0) then { diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index a42ff2d0cf..1d9fadf455 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -37,7 +37,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitwith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0] }; 0; }; @@ -55,7 +55,7 @@ if (getText (_config >> "condition") != "") then { if (isnil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (_condition isEqualType false) then { _return = _condition; @@ -66,7 +66,7 @@ if (getText (_config >> "condition") != "") then { if (!_return) exitwith { false }; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -85,7 +85,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; if !(isnil _x) exitwith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 95486f369d..a87c2b6274 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -69,7 +69,7 @@ _createdLitter = []; if (isnil _litterCondition) then { _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; } else { - _litterCondition = missionNamespace getvariable _litterCondition; + _litterCondition = missionNamespace getVariable _litterCondition; if (!(_litterCondition isEqualType {})) then {_litterCondition = {false}}; }; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {}; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 734479914d..279bbf060d 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -46,7 +46,7 @@ if (_show) then { }; disableSerialization; - _display = uiNamespace getvariable QGVAR(DisplayInformation); + _display = uiNamespace getVariable QGVAR(DisplayInformation); if (isnil "_display") exitwith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -59,26 +59,26 @@ if (_show) then { _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; }; - if (_target getvariable[QGVAR(isBleeding), false]) then { + if (_target getVariable[QGVAR(isBleeding), false]) then { _genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]]; }; - if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { _genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]]; }; - if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { + if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { _genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; }; - if (_target getvariable[QGVAR(hasPain), false]) then { + if (_target getVariable[QGVAR(hasPain), false]) then { _genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]]; }; _totalIvVolume = 0; { private "_value"; - _value = _target getvariable _x; + _value = _target getVariable _x; if !(isnil "_value") then { - _totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); + _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); }; } foreach GVAR(IVBags); if (_totalIvVolume >= 1) then { @@ -88,7 +88,7 @@ if (_show) then { _damaged = [false, false, false, false, false, false]; _selectionBloodLoss = [0,0,0,0,0,0]; if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; private "_amountOf"; { _x params ["", "_x1", "_selectionX", "_amountOf", "_x4"]; @@ -110,7 +110,7 @@ if (_show) then { }; } foreach _openWounds; - _bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; // Find how much this bodypart is bleeding @@ -200,7 +200,7 @@ if (_show) then { lbClear _logCtrl; private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"]; - _logs = _target getvariable [QGVAR(logFile_Activity), []]; + _logs = _target getVariable [QGVAR(logFile_Activity), []]; { // [_message,_moment,_type, _arguments] _x params ["_message", "_moment", "_type", "_arguments"]; diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index dc2183b16d..277ffabf98 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -56,7 +56,7 @@ if (isClass (_config >> _className)) then { }; TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); -_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; +_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _injuryType = _injury select 1; _exist = false; _bandagedInjury = []; @@ -77,7 +77,7 @@ if !(_exist) then { _bandagedWounds pushback _bandagedInjury; }; -_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; +_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; TRACE_1("",_reopeningChance); // Check if we are ever going to reopen this @@ -89,14 +89,14 @@ if (random(1) <= _reopeningChance) then { params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; //if (alive _target) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; if ((count _openWounds)-1 < _injuryIndex) exitwith {}; _selectedInjury = _openWounds select _injuryIndex; if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; _openWounds set [_injuryIndex, _selectedInjury]; - _bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _exist = false; _injuryId = _injury select 1; { @@ -110,8 +110,8 @@ if (random(1) <= _reopeningChance) then { if (_exist) then { TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); - _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; - _target setvariable [QGVAR(openWounds), _openWounds, true]; + _target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; + _target setVariable [QGVAR(openWounds), _openWounds, true]; }; }; // Otherwise something went wrong, we we don't reopen them.. diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 83d5c9d2f2..628c1cb92e 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -111,7 +111,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { - if (_unit getvariable ["ACE_isUnconscious", false]) exitwith { + if (_unit getVariable ["ACE_isUnconscious", false]) exitwith { [_unit, false, true] call FUNC(setDead); 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 228c503ce0..04dceff84d 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -16,7 +16,7 @@ private ["_damageBodyParts", "_cache_params", "_cache_damages"]; params ["_target"]; TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target); -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []]; _cache_damages = _target getVariable QGVAR(cachedDamages); @@ -32,9 +32,9 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c private ["_newDamage", "_pain"]; _newDamage = (_cache_damages select _foreachIndex); _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; - _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts]; + _unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; - if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { + if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); @@ -47,8 +47,8 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c }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]; -TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); +_target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); _target setHitPointDamage ["hitHead", _headDamage min 0.95]; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index f00621df02..030945daaf 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -26,9 +26,9 @@ if (!local _unit) exitwith { _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitwith { - if (_unit getvariable [QGVAR(inReviveState), false]) exitwith { + if (_unit getVariable [QGVAR(inReviveState), false]) exitwith { if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; if (_lifesLeft == 0) then { [_unit, true] call FUNC(setDead); }; @@ -37,45 +37,45 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == false; }; - _unit setvariable [QGVAR(inReviveState), true, true]; - _unit setvariable [QGVAR(reviveStartTime), ACE_time]; + _unit setVariable [QGVAR(inReviveState), true, true]; + _unit setVariable [QGVAR(reviveStartTime), ACE_time]; [_unit, true] call FUNC(setUnconscious); [{ private "_startTime"; params ["_args", "_idPFH"]; _args params ["_unit"]; - _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; + _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inReviveState), nil, true]; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(inReviveState), nil, true]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_unit, true] call FUNC(setDead); }; - if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith { + if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith { // revived without dieing, so in case we have lifes, remove one. if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; - _unit setvariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; }; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (GVAR(level) >= 2) then { - if (_unit getvariable [QGVAR(heartRate), 60] > 0) then { - _unit setvariable [QGVAR(heartRate), 0]; + if (_unit getVariable [QGVAR(heartRate), 60] > 0) then { + _unit setVariable [QGVAR(heartRate), 0]; }; }; }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; false; }; -_unit setvariable ["ACE_isDead", true, true]; +_unit setVariable ["ACE_isDead", true, true]; if (isPLayer _unit) then { - _unit setvariable ["isDeadPlayer", true, true]; + _unit setVariable ["isDeadPlayer", true, true]; }; ["medical_onSetDead", [_unit]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 5b561bdf65..d7f80edc35 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -42,7 +42,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitwith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]; }; 0; }; @@ -63,7 +63,7 @@ if (isText (_config >> "Condition")) then { if (isnil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (_condition isEqualType false) then { _return = _condition; @@ -75,7 +75,7 @@ if (isText (_config >> "Condition")) then { if (!_return) exitwith {false}; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -97,7 +97,7 @@ if ("All" in _locations) then { if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; if !(isnil _x) exitwith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere @@ -119,7 +119,7 @@ _consumeItems = if (isNumber (_config >> "itemConsumed")) then { } else { // Check for required class if (isText (_config >> "itemConsumed")) exitwith { - missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; + missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; }; 0; }; @@ -135,19 +135,19 @@ if (_callbackProgress == "") then { if (isNil _callbackProgress) then { _callbackProgress = compile _callbackProgress; } else { - _callbackProgress = missionNamespace getvariable _callbackProgress; + _callbackProgress = missionNamespace getVariable _callbackProgress; }; // Patient Animation _patientAnim = getText (_config >> "animationPatient"); -if (_target getvariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { +if (_target getVariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then { _patientAnim = getText (_config >> "animationPatientUnconscious"); }; }; if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then { - if (_target getvariable ["ACE_isUnconscious", false]) then { + if (_target getVariable ["ACE_isUnconscious", false]) then { [_target, _patientAnim, 2, true] call EFUNC(common,doAnimation); } else { [_target, _patientAnim, 1, true] call EFUNC(common,doAnimation); @@ -160,7 +160,7 @@ if (_caller == _target) then { _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); }; -_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; +_caller setVariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -184,12 +184,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { if ((stance _caller) == "STAND") then { switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon - case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; - case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; - case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; + case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; + case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; + case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; }; } else { - _caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; @@ -203,7 +203,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { if (isnil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { - _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; + _treatmentTimeConfig = missionNamespace getVariable _treatmentTimeConfig; }; if (_treatmentTimeConfig isEqualType 0) exitwith { _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index b34f0f1cd0..73b40f8a9b 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -18,7 +18,7 @@ params ["_target", "_selectionName"]; -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); @@ -33,8 +33,8 @@ if ((_damageBodyParts select _part) > 0) then { _damageOnPart = _damageOnPart - BANDAGEHEAL; }; _damageBodyParts set [_part, _damageOnPart max 0]; - _target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; - TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); + _target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; + TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); }; EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 04dfe523fa..304a804814 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -145,7 +145,7 @@ if (isNil _callbackProgress) then { // Player Animation _callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE"); -_caller setvariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; +_caller setVariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -163,9 +163,9 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { }; if (stance _caller == "STAND") then { - _caller setvariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; + _caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; } else { - _caller setvariable [QGVAR(repairPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; From 861262e41cfbd3d63ad3daef19ac860207927490 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 30 Nov 2015 17:56:25 +0100 Subject: [PATCH 15/18] revert false captitalization change --- addons/common/XEH_preInit.sqf | 2 +- addons/common/functions/fnc_resetAllDefaults.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 6f7d5deadc..3180eacb86 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -51,7 +51,7 @@ PREP(fixCollision); PREP(fixFloating); PREP(fixLoweredRifleAnimation); PREP(fixPosition); -PREP(getAllDefinedsetVariables); +PREP(getAllDefinedSetVariables); PREP(getAllGear); PREP(getCaptivityStatus); PREP(getDeathAnim); diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index ddde3e6090..d9850ffd5b 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -39,6 +39,6 @@ if (isPlayer _unit) then { _unit setVariable [_x select 0, nil, _x select 3]; }; false -} count ([_unit] call FUNC(getAllDefinedsetVariables)); +} count ([_unit] call FUNC(getAllDefinedSetVariables)); _unit setVariable ["ACE_forceWalkStatusNumber", 0, true]; From 6f9cf33549e126c6d743ceb7b9b4de19f6a24032 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 1 Dec 2015 16:00:06 -0600 Subject: [PATCH 16/18] Opps --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b179eaeea4..41b77324c2 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@

- ACE3 Version + ACE3 Version - + ACE3 Download From 913612973237c47446ba6732c9bac9c31e7d9318 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 1 Dec 2015 16:13:06 -0600 Subject: [PATCH 17/18] Fix readme again --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41b77324c2..a407f5a299 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@

- ACE3 Version + ACE3 Version - + ACE3 Download From deb87ef96805718eb7704202341c3405ee456445 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 1 Dec 2015 16:54:01 -0600 Subject: [PATCH 18/18] Update readme for 3.4 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a407f5a299..374bccffc0 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@

- ACE3 Version + ACE3 Version - - ACE3 Download + + ACE3 Download ACE3 Issues