diff --git a/README.md b/README.md index b179eaeea4..374bccffc0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ACE3 Version - ACE3 Download + ACE3 Download ACE3 Issues 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_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/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/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/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/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index b6061418d8..1e686ea849 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 995b0c613d..aa65c1273d 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/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/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index fa91f23cce..22c78c4304 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_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/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__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_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_blurScreen.sqf b/addons/common/functions/fnc_blurScreen.sqf index 4f8cc0dfcb..2c6a17cbe3 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_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_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_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index 8421f5be7e..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; @@ -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_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_errorMessage.sqf b/addons/common/functions/fnc_errorMessage.sqf index 9f7738ea80..aa2b872d47 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_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index 18c8a18c72..7205a943d9 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -20,14 +20,14 @@ params ["_object", ["_category", ""]]; -if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]}; +if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]}; 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_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_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_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/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 8a24e7b48b..225c2d9675 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_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index b1639eb970..2f7aef43a5 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -16,9 +16,9 @@ params ["_unit", "_id", "_accepted"]; private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"]; -_info = _unit getvariable _id; +_info = _unit getVariable _id; -if (!isnil "_info") then { +if (!isNil "_info") then { _caller = _info select 0; _target = _info select 1; _requestID = _info select 2; @@ -26,16 +26,16 @@ 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; -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/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index d1fdb30b29..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); @@ -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_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/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_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index 480632394c..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 @@ -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_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index 287c4566d5..9bbec92d40 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/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 95f17a9c7b..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 @@ -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_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 67d104a9e4..6a42d8ea11 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,18 +45,18 @@ 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]; }; }; 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 @@ -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/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/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/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/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/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/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/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/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/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/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/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/explosives/functions/fnc_addToSpeedDial.sqf b/addons/explosives/functions/fnc_addToSpeedDial.sqf index bf409d5462..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/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/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/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/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/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/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/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/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 8b8ae963d9..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/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/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf index e63b18bcfc..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/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/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/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 b11fc3697d..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: @@ -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/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index 264658aa81..2105ee4a6a 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/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index ba7d413364..e673b27908 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -496,7 +496,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; @@ -506,7 +506,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 064f78682f..d833e44740 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 { @@ -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]]; @@ -246,24 +246,24 @@ 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}, + {(((_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/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/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 072b9b1a7e..ff2bd12438 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); +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); + _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); + if (_target getVariable[QGVAR(hasPain), false]) then { + _genericMessages pushBack LSTRING(inPain); } else { - _genericMessages pushback LSTRING(noPain); + _genericMessages pushBack LSTRING(noPain); }; }; 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..81412f60c4 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -20,17 +20,17 @@ 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 { +if ((_tourniquets select _part) == 0) exitWith { _output = LSTRING(noTourniquetOnBodyPart); ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); }; // 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_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_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 9f2e7a8bf9..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 pushback [_value, _time, _callBack]; -_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; +_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; +_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_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 0ed9b9747f..48e400f7b2 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -17,12 +17,12 @@ 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{}; - _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 0e341792c9..8d1b337514 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 */ }; @@ -29,24 +29,24 @@ _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 = []; { // ensure the first element will not be added - if (_foreachIndex > 0) then { - _newLog pushback _x; + if (_forEachIndex > 0) then { + _newLog pushBack _x; }; - } foreach _log; + } forEach _log; _log = _newLog; }; -_log pushback [_message, _moment, _type, _arguments]; +_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]; + _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 b1df46f751..bd988fa84c 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -17,28 +17,28 @@ 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 */ }; -_log = _unit getvariable [QGVAR(triageCard), []]; +_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 = _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]; + _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 2aecfb9a12..e6856335cc 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -17,14 +17,14 @@ private ["_accessLevel", "_return"]; params ["_caller", "_target"]; -_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; +_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 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_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index 9cd43dada6..af601d9f33 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -17,15 +17,15 @@ 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; +_name = _oldBody getVariable ["ACE_name", "unknown"]; +_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"; @@ -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 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_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 7fc4823202..8be0e00903 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -25,29 +25,29 @@ 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]; 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 { +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 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_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 9849242de1..47af145055 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 { + _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; @@ -54,15 +54,15 @@ if (_show) then { _message = localize _message; }; }; - _triageCardTexts pushback format["%1x - %2", _amount, _message]; - } foreach _log; + _triageCardTexts pushBack format["%1x - %2", _amount, _message]; + } 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_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index d207c7f9a4..e7a4d3c0a9 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -17,8 +17,8 @@ private ["_ctrl", "_display", "_idc", "_pos"]; params ["_show"]; disableSerialization; -_display = uiNamespace getvariable QGVAR(triageCard); -if (isnil "_display") exitwith {}; +_display = uiNamespace getVariable QGVAR(triageCard); +if (isNil "_display") exitWith {}; _pos = [0,0,0,0]; if (_show) then { diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index a3fdbd5b94..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); { @@ -33,17 +33,17 @@ 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), []]; + _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); } 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 3524e15cb5..1737bb3b98 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -31,23 +31,23 @@ 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); + } 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); + } forEach GVAR(IVBags); }; _bloodVolumeChange; 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 d46733452a..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 { @@ -35,22 +35,22 @@ 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]; + _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_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_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_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 31e65218c2..9db65db732 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -52,12 +52,12 @@ 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]; - 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 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_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 5035fbe282..33b1d3f7ee 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -23,14 +23,14 @@ 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 -_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_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..ace7041cb5 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -21,12 +21,12 @@ 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 { - 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 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_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 63e386bd58..1eae9544ad 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -87,9 +87,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; @@ -108,7 +108,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_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 46000dbbdf..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]; + _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 ae032e6d64..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]; @@ -37,28 +37,28 @@ _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 { - _foundIndex = _foreachIndex; + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { + _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 - _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; _injury set [3, (_injury select 3) + 1]; }; -} foreach _woundsCreated; +} 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 dc21012dd6..4384dce2d7 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -23,10 +23,10 @@ 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, []]]; +_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; }; @@ -59,27 +59,27 @@ _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; }; // Store the valid possible injury for the damage type, damage amount and selection - _allPossibleInjuries pushback _x; + _allPossibleInjuries pushBack _x; }; }; -} foreach _allInjuriesForDamageType; +} 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), []]; -_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; +_openWounds = _unit getVariable[QGVAR(openWounds), []]; +_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,10 +92,10 @@ _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 { - _foundIndex = _foreachIndex; + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { + _foundIndex = _forEachIndex; }; - } foreach _openWounds; + } forEach _openWounds; }; _injury = []; @@ -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,21 +114,21 @@ _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); }; }; -} foreach (_injuryTypeInfo select 0); // foreach damage thresholds +} 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 d6a4440d76..c8d08cbde2 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -15,11 +15,11 @@ private "_openWounds"; params ["_unit"]; -if (!local _unit) exitwith {}; +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 fddf5489da..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]; }; }; @@ -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); }; @@ -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,10 +183,10 @@ if (GVAR(level) >= 2) then { TRACE_3("ACE_DEBUG_IVBAGS_SYNC",GVAR(IVBags),_syncValues,_unit); { private "_value"; - _value = _unit getvariable _x; - if !(isnil "_value") then { - _unit setvariable [_x,(_unit getvariable [_x, 0]), true]; + _value = _unit getVariable _x; + 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 df1a3828f5..3eb2f1e5f0 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -18,14 +18,14 @@ 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 { +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,10 +33,10 @@ _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; + } forEach _crew; }; _return diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index cbf40078fd..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); -if (isnil "_medicalEnabled") exitwith { - (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) +_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) }; _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 bd97203f33..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]; -} foreach _allUsedMedication; + _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]; -} foreach _logs; -_unit setvariable [QGVAR(allLogs), [], true]; + _unit setVariable [_x, nil]; +} 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 34f1cf4244..330a1e5ea3 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -39,16 +39,16 @@ _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; +} 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; + } forEach _objects; }; _isInBuilding; diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 763185640c..e0298ed054 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -16,15 +16,15 @@ private ["_openWounds", "_openWounds"]; params ["_unit"]; -if (GVAR(level) <= 1) exitwith { +if (GVAR(level) <= 1) exitWith { ([_unit] call FUNC(getBloodloss)) == 0; }; _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)); -} foreach _openWounds; +} forEach _openWounds; (_totalBloodLoss == 0); diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index d16ab762d5..02e5985297 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -19,9 +19,9 @@ 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; + _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,10 +32,10 @@ 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 { + 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..368b065908 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -18,13 +18,13 @@ 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; + } forEach _objects; }; true; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 6bef38fa27..8eb55b3d1b 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -22,27 +22,27 @@ 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 { + 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]; + _allUsedMedication set [_forEachIndex, _x]; + _target setVariable [QGVAR(allUsedMedication), _allUsedMedication]; }; _foundEntry = true; }; -} foreach _allUsedMedication; +} forEach _allUsedMedication; if (!_foundEntry) then { - _allUsedMedication pushback [_variable, [_className]]; - _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; + _allUsedMedication pushBack [_variable, [_className]]; + _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); }; @@ -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"); @@ -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 f8b361ad17..84fc33dec2 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -18,19 +18,19 @@ 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; { - if (_x select 0 == _injuryID) exitwith { + 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; + _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 091bea7ef8..dff59fb2cf 100644 --- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf +++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf @@ -17,8 +17,8 @@ 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; + } forEach _openWounds; }; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 764d0bf591..42dd98dc1f 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; @@ -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 }; @@ -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; @@ -82,12 +82,12 @@ 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 { - 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,16 +107,16 @@ _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; + } forEach _allWoundClasses; _typeThresholds = _thresholds; _selectionSpecificType = _selectionSpecific; if (isClass(_damageTypesConfig >> _x)) then { 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 @@ -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_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4792f879ec..bcb590143d 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 {}; -_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 { +if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Classnames of the available sounds. _availableSounds_A = [ "WoundedGuyA_01", @@ -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 31cf726214..1d7d6de53f 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 {}; -_target setvariable [QGVAR(isWoundSynced), true]; +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..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]; - if (_heartRate > 0 || !alive _unit) exitwith { + _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 { + 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 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_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index aac48a8641..910745d7bb 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -32,17 +32,17 @@ 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 { - _unit setvariable ["ACE_isUnconscious", false, true]; +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 */ }; -_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_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index 95773acdab..b377b3004d 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -72,10 +72,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 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_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_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index cf18475866..2d9c383902 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); }; @@ -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 3f98eaffa4..5c02ecc0cb 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! +_openWounds = _target getVariable [QGVAR(openWounds), []]; +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"); @@ -61,9 +61,9 @@ _exit = false; }; TRACE_2("Wound classes: ", _specificClass, _classID); - if (_specificClass == _classID) exitwith { + if (_specificClass == _classID) exitWith { _effectivenessFound = _woundEffectivenss; - _mostEffectiveSpot = _foreachIndex; + _mostEffectiveSpot = _forEachIndex; _mostEffectiveInjury = _x; _exit = true; }; @@ -71,14 +71,14 @@ _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; + 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 @@ -87,7 +87,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 ed5eb0858d..e3befb13a9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -13,24 +13,24 @@ 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]; _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,28 +42,28 @@ 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]; - } foreach _allUsedMedication; + _target setVariable [_x select 0, nil]; + } 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_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 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/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_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..ef8a83af65 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -18,8 +18,8 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; params ["_target", "_treatmentClassname"]; -_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; -if (_bloodVolume >= 100) exitwith {}; +_bloodVolume = _target getVariable [QGVAR(bloodVolume), 100]; +if (_bloodVolume >= 100) exitWith {}; // Find the proper attributes for the used IV _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV"); @@ -35,9 +35,9 @@ 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; + GVAR(IVBags) pushBack _varName; publicVariable QGVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index 5d3ba6e1d4..8f45ada7c3 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 { +_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); false; diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index d1ffd34e4b..be9b03c9f1 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -21,26 +21,26 @@ 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"]; _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 { + _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 4aac0eda6a..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]; @@ -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); @@ -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 559a83885f..9b21ff228f 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) @@ -77,7 +77,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 0e8c424ca3..2922cae465 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,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 { @@ -128,17 +128,17 @@ if (_parachuteCheck) then { }; }; -if (!local _unit) exitwith { - TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); +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]; + _unit setVariable [QGVAR(unconsciousArguments), _args, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; // 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]; + _unit setVariable ["ACE_isUnconscious", false, true]; }; }; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index 770d8b6ea7..7abf80c464 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -19,16 +19,16 @@ private ["_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 { +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,11 +37,11 @@ _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 */ }; - } foreach _crew; + } forEach _crew; }; _return diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index c2bdd4206d..ce45d752a9 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -24,15 +24,15 @@ _itemsUsedBy = []; if (_x isEqualType []) then { { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; - } foreach _x; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; + } forEach _x; }; // handle required item if (_x isEqualType "") 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; +} forEach _items; [count _items == count _itemsUsedBy, _itemsUsedBy]; 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/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..67e295e22e 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,11 +61,11 @@ 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"]; - _log = GVAR(INTERACTION_TARGET) getvariable [QEGVAR(medical,triageCard), []]; + _log = GVAR(INTERACTION_TARGET) getVariable [QEGVAR(medical,triageCard), []]; _triageCardTexts = []; { _x params ["_item", "_amount", "_time"]; @@ -77,11 +77,11 @@ 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; - 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_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 56a22689db..412a2045e6 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; @@ -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/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/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/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 6c2875d75e..d22b0efa47 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -59,8 +59,8 @@ if (_newMuzzleVelocityCoefficent != 1) then { PARAMS_2(_args,_pfID); EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity); - if (isNull _shell || {!alive _shell}) exitwith { - [_pfID] call cba_fnc_removePerFrameHandler; + if (isNull _shell || {!alive _shell}) exitWith { + [_pfID] call CBA_fnc_removePerFrameHandler; }; _deltaT = ACE_time - _time; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 1935714dc8..0b8cc67842 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -9,22 +9,22 @@ { [_x] call { params ["_logic"]; - private _logicType = typeof _logic; + 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; 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; + _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/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/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/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/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index ef9268b9a6..46d0e287d8 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 // Wait until the colors are defined before starting to draw the nametags ["SettingsInitialized", { 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/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf index e7c1ec9bc5..0df7270317 100644 --- a/addons/nightvision/XEH_postInitClient.sqf +++ b/addons/nightvision/XEH_postInitClient.sqf @@ -55,7 +55,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), { @@ -69,4 +69,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/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/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf index a981c34e0b..4736d72623 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); + }forEach EGVAR(common,settings); }] call EFUNC(common,addEventHandler); diff --git a/addons/optionsmenu/functions/fnc_exportSettings.sqf b/addons/optionsmenu/functions/fnc_exportSettings.sqf index f6c6dc9653..e798784871 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 d756a0ef83..5b302a510d 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -16,9 +16,9 @@ private ["_logic"]; _logic = _this select 0; -if (isMultiplayer) exitwith {}; +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 6c0cb56519..8e09608e07 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) = []; @@ -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_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 7d4540a456..9718da3988 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 b57345b2de..4ab0bf83fa 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf @@ -48,7 +48,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): { { @@ -64,7 +64,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..7374d1f2c1 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,14 +78,14 @@ switch (_type) do { _changed = true; _x set [9, _newValue]; }; - } foreach GVAR(serverSideValues); + } forEach GVAR(serverSideValues); }; }; 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/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/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/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_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_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/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/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/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index c94d40f163..2611d10b38 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -23,7 +23,7 @@ private["_bestDist", "_bestIndex", "_wheelBone", "_wheelBoneNameResized", "_whee // 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 {TRACE_1("No Wheels",_wheels); [[],[]]}; 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); }; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 9e329e1041..3fabb58e80 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -34,7 +34,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 4c21a40ae5..9625dad1df 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -34,7 +34,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/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/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_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 562bf731b4..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); }; 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/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/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/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/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/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/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; 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_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index be814266ab..897f51532d 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,12 +13,12 @@ #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]; -}foreach allCurators; +}forEach allCurators; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index a36d8dd458..fc21fe11e7 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -24,13 +24,13 @@ _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; }; //--- 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,17 +58,17 @@ 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 { //--- 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];}; @@ -85,8 +85,8 @@ if (_activated) then { case 1: { _addonsList = []; { - _addonsList = _addonsList + (unitaddons typeof _x); - } foreach (entities "all"); + _addonsList = _addonsList + (unitaddons typeOf _x); + } forEach (entities "all"); removeallcuratoraddons _logic; _logic addcuratoraddons _addonsList; }; @@ -108,12 +108,12 @@ 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 - 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,38 +124,38 @@ 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 {}; + if (isnull _logic) exitWith {}; //--- Assign _player = objnull; switch true do { case (_ownerUID > 0): { { - if (getplayeruid _x == _ownerVar) exitwith {_player = _x;}; - } foreach playableunits; + if (getplayeruid _x == _ownerVar) exitWith {_player = _x;}; + } forEach playableunits; }; default { - _player = missionnamespace getvariable [_ownerVar,objnull]; + _player = missionnamespace getVariable [_ownerVar,objnull]; }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + waitUntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; + if (isnull _logic) exitWith {}; //--- 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,12 +163,12 @@ 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; }; - } foreach (curatoreditableobjects _logic); + } forEach (curatoreditableobjects _logic); }; },[_logic,_player]] call EFUNC(common,execNextFrame); @@ -185,41 +185,41 @@ 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 {}; + if (isnull _logic) exitWith {}; //--- Add radio channels { _x radiochannelremove [_player]; - } foreach (_logic getvariable ["channels",[]]); + } forEach (_logic getVariable ["channels",[]]); //--- Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + if (isnull _logic) exitWith {}; }; }; //--- Activated all future addons _addons = []; { - if (typeof _x == "ModuleCuratorAddAddons_F") then { - _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); + if (typeOf _x == "ModuleCuratorAddAddons_F") then { + _paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]"); { 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 @@ -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; } ]; @@ -249,11 +249,11 @@ 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 - _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 { @@ -288,13 +288,13 @@ if (_activated) then { _adminVar = _this select 1; _serverCommand = _this select 2; while {true} do { - waituntil {sleep 0.1; servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,player]; + 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}; - missionnamespace setvariable [_adminVar,objnull]; + 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 { @@ -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_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 8f60531b34..2f863ac5b9 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]; @@ -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 @@ -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 7150856154..05d2e2d096 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; @@ -36,20 +36,20 @@ 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")]; + _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 + _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; @@ -104,21 +104,21 @@ 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]; }; }; }; - } foreach _entities; + } forEach _entities; }; }; if (count _hint > 0) 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]; @@ -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); }; @@ -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 { @@ -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 { @@ -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; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index a9e1f35080..7eec86bb7d 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 { @@ -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; @@ -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,14 +152,14 @@ 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]; 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]; 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]; }; }; };