diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index ab624669cf..57454dec78 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) { w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; colorFrame[] = {1,1,1,0.5}; - colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"}; + colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; }; class TitleText: TitleBackground { diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index bad8a2b427..258bf51ec9 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -115,18 +115,18 @@ class RscDisplayInventory { // map class RscDisplayMainMap { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent);); }; class RscDisplayGetReady: RscDisplayMainMap { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent);); }; class RscDisplayServerGetReady: RscDisplayGetReady { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent);); }; class RscDisplayClientGetReady: RscDisplayGetReady { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent);); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent);); }; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index f1bca395f8..c38c3fd3e7 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -88,7 +88,7 @@ class CfgUIGrids { // check dll class RscStandardDisplay; class RscDisplayMain: RscStandardDisplay { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage)); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage)); }; */ diff --git a/addons/common/define.hpp b/addons/common/define.hpp index f1cc009864..98367e72ae 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -116,9 +116,9 @@ class ACE_gui_editBase }; colorSelection[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", + "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])", + "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])", + "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])", 1 }; autocomplete = ""; @@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{ colorSelect2[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground[] = {0, 0, 0, 1}; colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0}; - colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25}; + colorDisabled[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 0.25}; period = 1.2; rowHeight = 0.03; colorBackground[] = {0, 0, 0, 1}; @@ -505,7 +505,7 @@ onMouseButtonDblClick = ""; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa"; - color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"}; + color[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"}; colorCreated[] = {1,1,1,1}; colorCanceled[] = {0.7,0.7,0.7,1}; colorDone[] = {0.7,1,0.3,1}; diff --git a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf b/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf index 95cce02e41..c739177288 100644 --- a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf +++ b/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf @@ -18,6 +18,6 @@ _dlg = ctrlParent _this; _dlg displayAddEventHandler ["unload", { if (_this select 1 == 1) then { - [missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent); + [missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent); }; }]; diff --git a/addons/common/functions/fnc_debugModule.sqf b/addons/common/functions/fnc_debugModule.sqf index 4f3da4d7cb..125887183e 100644 --- a/addons/common/functions/fnc_debugModule.sqf +++ b/addons/common/functions/fnc_debugModule.sqf @@ -14,5 +14,5 @@ params ["_entity"]; -GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]); -GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]); +GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]); +GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]); diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 39c23ce53b..34fb7b99e7 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); /* // This does not function at the moment. Has been disabled until it fixed. -_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; -_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; +_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; +_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; */ _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index ac13f73275..7205a943d9 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -27,7 +27,7 @@ private ["_return", "_val"]; _return = []; { - _val = _object getvariable (_x select 0); + _val = _object getVariable (_x select 0); if (!isNil "_val") then { if (_category == "" || _category == _x select 3) then { diff --git a/addons/common/functions/fnc_getDefinedVariable.sqf b/addons/common/functions/fnc_getDefinedVariable.sqf index c0d7ce8d83..ea22163622 100644 --- a/addons/common/functions/fnc_getDefinedVariable.sqf +++ b/addons/common/functions/fnc_getDefinedVariable.sqf @@ -16,7 +16,7 @@ params ["_unit", "_variable", "_defaultValue"]; private "_value"; -_value = _unit getvariable _variable; +_value = _unit getVariable _variable; if (isNil "_value") then { if (!isNil "_defaultValue") then { diff --git a/addons/common/functions/fnc_isAwake.sqf b/addons/common/functions/fnc_isAwake.sqf index 8a123cfec9..1179ced02f 100644 --- a/addons/common/functions/fnc_isAwake.sqf +++ b/addons/common/functions/fnc_isAwake.sqf @@ -14,4 +14,4 @@ params ["_unit"]; -!(_unit getvariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getvariable ["ACE_isDead", false]) // return +!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index 35b719bfda..2f7aef43a5 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -16,7 +16,7 @@ params ["_unit", "_id", "_accepted"]; private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"]; -_info = _unit getvariable _id; +_info = _unit getVariable _id; if (!isNil "_info") then { _caller = _info select 0; @@ -26,7 +26,7 @@ if (!isNil "_info") then { _callBack = _info select 4; _replyParams = [_info, _accepted]; [_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc); - _unit setvariable [_id, nil]; + _unit setVariable [_id, nil]; }; GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 8d58525a9d..e158ae5c81 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" //paramsArray is a normal variable not a command -private _paramsArray = missionnamespace getvariable ["paramsArray", []]; +private _paramsArray = missionnamespace getVariable ["paramsArray", []]; TRACE_1("Reading missionConfigFile params",_paramsArray); diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index c2ba1bee18..d9850ffd5b 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -14,8 +14,8 @@ params ["_unit"]; -_unit setvariable ["ACE_isDead", nil, true]; -_unit setvariable ["ACE_isUnconscious", nil, true]; +_unit setVariable ["ACE_isDead", nil, true]; +_unit setVariable ["ACE_isUnconscious", nil, true]; if (isPlayer _unit) then { [true] call FUNC(setVolume); @@ -36,7 +36,7 @@ if (isPlayer _unit) then { { if !(_x select 4) then { - _unit setvariable [_x select 0, nil, _x select 3]; + _unit setVariable [_x select 0, nil, _x select 3]; }; false } count ([_unit] call FUNC(getAllDefinedSetVariables)); diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 9bbc4c6d20..7d23e6442a 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -18,7 +18,7 @@ params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]]; private "_previousGroupsList"; -_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []]; +_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []]; if (_switch) then { // go forward diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 4e75791ff0..6a42d8ea11 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -95,9 +95,9 @@ _unit action ["Eject", vehicle _unit]; [_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide); -_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; +_loaded = _vehicle getVariable [QGVAR(loaded_persons),[]]; _loaded deleteAt (_loaded find _unit); -_vehicle setvariable [QGVAR(loaded_persons), _loaded, true]; +_vehicle setVariable [QGVAR(loaded_persons), _loaded, true]; true diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 0961b809ed..1863eb9b0b 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -33,13 +33,13 @@ class GVAR(remoteInventory) { fadeout = 0; class Colors { - dragValidBgr[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5}; - dragInvalidBgr[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; - dragValidBar[] = {"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])",0.5}; - dragInvalidBar[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; - progressBar[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",1}; - progressBarBgr[] = {"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",0.75}; - highlight[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5}; + dragValidBgr[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5}; + dragInvalidBgr[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; + dragValidBar[] = {"(profilenamespace getVariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getVariable ['IGUI_WARNING_RGB_B',0.0])",0.5}; + dragInvalidBar[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5}; + progressBar[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",1}; + progressBarBgr[] = {"(profilenamespace getVariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getVariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getVariable ['IGUI_BCG_RGB_B',1])",0.75}; + highlight[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5}; }; class controlsBackground {}; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 6ee28edff3..1f5e9f68aa 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -21,4 +21,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; -alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} +alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 58c4718407..d96c0dd5da 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -24,4 +24,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; -alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; +alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 9da1656b8b..aad30ec234 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -22,7 +22,7 @@ params ["_unit", "_target"]; private "_inBuilding"; _inBuilding = [_unit] call FUNC(isObjectOnObject); -if !(_unit getvariable ["ACE_isUnconscious", false]) then { +if !(_unit getVariable ["ACE_isUnconscious", false]) then { // play release animation _unit playAction "released"; }; @@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then { ["fixFloating", _target, _target] call EFUNC(common,targetEvent); }; -if (_unit getvariable ["ACE_isUnconscious", false]) then { +if (_unit getVariable ["ACE_isUnconscious", false]) then { [_unit, "unconscious", 2, true] call EFUNC(common,doAnimation); }; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 300846bc6c..c9c34c82a0 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -31,7 +31,7 @@ detach _target; // fix anim when aborting carrying persons if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then { - if (vehicle _unit == _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { + if (vehicle _unit == _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { [_unit, "", 2, true] call EFUNC(common,doAnimation); }; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 6e6374af12..45582a8564 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -19,9 +19,9 @@ class Rsc_ACE_CallScreen_Edit:RscEdit { colorText[] = {0,0,0,1}; colorDisabled[] = {1,1,1,0.25}; colorSelection[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", + "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])", + "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])", + "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 1 }; text = ""; diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 66406ad917..b8745acaaa 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -26,7 +26,7 @@ GVAR(time4) = 0; ["playerChanged", { GVAR(deafnessDV) = 0; GVAR(deafnessPrior) = 0; - ACE_player setvariable [QGVAR(deaf), false]; + ACE_player setVariable [QGVAR(deaf), false]; GVAR(beep) = false; GVAR(beep2) = false; diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index f1cb063971..e36151aea4 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -42,7 +42,7 @@ if (!_justUpdateVolume) then { GVAR(deafnessPrior) = GVAR(deafnessDV); if (GVAR(deafnessDV) > 19.75) then { - ACE_player setvariable [QGVAR(deaf), true]; + ACE_player setVariable [QGVAR(deaf), true]; if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then { playSound "ACE_Combat_Deafness"; GVAR(beep2) = true; @@ -50,7 +50,7 @@ if (!_justUpdateVolume) then { GVAR(time4) = ACE_time + 30; }; } else { - ACE_player setvariable [QGVAR(deaf), false]; + ACE_player setVariable [QGVAR(deaf), false]; }; if (GVAR(deafnessDV) > 10) then { diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 351d285c7e..8e5561d346 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -497,7 +497,7 @@ class CfgVehicles { class GVAR(loadPatient) { displayName = CSTRING(LoadPatient); distance = 5; - condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target); + condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit)); showDisabled = 0; priority = 2; @@ -507,7 +507,7 @@ class CfgVehicles { class GVAR(UnLoadPatient) { displayName = CSTRING(UnloadPatient); distance = 5; - condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target); + condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit)); showDisabled = 0; priority = 2; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index bec734b987..d833e44740 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -175,11 +175,11 @@ GVAR(lastHeartBeatSound) = ACE_time; // Pain effect, no pain effect in zeus camera if (isNull curatorCamera) then { - _strength = ((_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0) min 1; + _strength = ((_pain - (ACE_player getVariable [QGVAR(painSuppress), 0])) max 0) min 1; _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); if (GVAR(painEffectType) == 1) then { GVAR(effectPainCC) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { _strength = _strength * 0.15; GVAR(effectPainCA) ppEffectEnable true; GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; @@ -201,7 +201,7 @@ GVAR(lastHeartBeatSound) = ACE_time; }; } else { GVAR(effectPainCA) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { _strength = _strength * 0.9; GVAR(effectPainCC) ppEffectEnable true; GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; @@ -248,22 +248,22 @@ GVAR(lastHeartBeatSound) = ACE_time; ["SettingsInitialized", { if (GVAR(level) == 2) exitWith { [ - {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)}, - {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9}, + {(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 65)}, + {(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.25)}, - {((_this select 0) getvariable [QGVAR(inReviveState), false])}, - {((_this select 0) getvariable [QGVAR(inCardiacArrest), false])}, - {((_this select 0) getvariable ["ACE_isDead", false])}, - {(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)} + {((_this select 0) getVariable [QGVAR(inReviveState), false])}, + {((_this select 0) getVariable [QGVAR(inCardiacArrest), false])}, + {((_this select 0) getVariable ["ACE_isDead", false])}, + {(((_this select 0) getVariable [QGVAR(airwayStatus), 100]) < 80)} ] call FUNC(addUnconsciousCondition); }; [ - {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)}, - {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.6}, + {(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 40)}, + {(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.6}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.1)}, - {((_this select 0) getvariable [QGVAR(inReviveState), false])}, - {((_this select 0) getvariable ["ACE_isDead", false])} + {((_this select 0) getVariable [QGVAR(inReviveState), false])}, + {((_this select 0) getVariable ["ACE_isDead", false])} ] call FUNC(addUnconsciousCondition); }] call EFUNC(common,addEventHandler); diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 94f3e6ad34..83852f8042 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -17,7 +17,7 @@ private ["_heartRateOutput", "_heartRate", "_logOutPut"]; params ["_caller", "_unit", "_selectionName"]; -_heartRate = _unit getvariable [QGVAR(heartRate), 80]; +_heartRate = _unit getVariable [QGVAR(heartRate), 80]; if (!alive _unit) then { _heartRate = 0; }; diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 09fd399581..ff2bd12438 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -25,8 +25,8 @@ if (alive _target) then { } else { _genericMessages pushBack LSTRING(diagnoseDead); }; -if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { - if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { +if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then { + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { _genericMessages pushBack LSTRING(lostBloodALot); } else { _genericMessages pushBack LSTRING(lostBlood); @@ -36,7 +36,7 @@ if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { }; if (alive _target) then { - if (_target getvariable[QGVAR(hasPain), false]) then { + if (_target getVariable[QGVAR(hasPain), false]) then { _genericMessages pushBack LSTRING(inPain); } else { _genericMessages pushBack LSTRING(noPain); diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index 3e753d6454..81412f60c4 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -20,7 +20,7 @@ params ["_caller", "_target", "_selectionName"]; // grab the required data _part = [_selectionName] call FUNC(selectionNameToNumber); -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; // Check if there is a tourniquet on this bodypart if ((_tourniquets select _part) == 0) exitWith { @@ -30,7 +30,7 @@ if ((_tourniquets select _part) == 0) exitWith { // Removing the tourniquet _tourniquets set[_part, 0]; -_target setvariable [QGVAR(tourniquets), _tourniquets, true]; +_target setVariable [QGVAR(tourniquets), _tourniquets, true]; // Adding the tourniquet item to the caller _caller addItem "ACE_tourniquet"; diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 8735a2a2d6..cc8c093071 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]]; -_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; +_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; _adjustment pushBack [_value, _time, _callBack]; -_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; +_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ]; ["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index f927d54e67..48e400f7b2 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -21,8 +21,8 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; - _unit setvariable [QGVAR(addedToUnitLoop), true, true]; + if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; + _unit setVariable [QGVAR(addedToUnitLoop), true, true]; [{ params ["_args", "_idPFH"]; @@ -34,17 +34,17 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { [_idPFH] call CBA_fnc_removePerFrameHandler; if (!local _unit) then { if (GVAR(level) >= 2) then { - _unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], true]; - _unit setvariable [QGVAR(bloodPressure), _unit getvariable [QGVAR(bloodPressure), [80, 120]], true]; + _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true]; + _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true]; }; - _unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 100], true]; + _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true]; }; } else { [_unit, _interval] call FUNC(handleUnitVitals); private "_pain"; - _pain = _unit getvariable [QGVAR(pain), 0]; - if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then { + _pain = _unit getVariable [QGVAR(pain), 0]; + if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then { // This introduces wierd unconscious behaviour for basic medical and possibly also advanced. // TODO This is disabled as it's considered non critical code. // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely. diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index d62f3ccba3..8d1b337514 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -29,7 +29,7 @@ _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute]; _logVarName = format[QGVAR(logFile_%1), _type]; -_log = _unit getvariable [_logVarName, []]; +_log = _unit getVariable [_logVarName, []]; if (count _log >= 8) then { _newLog = []; { @@ -42,11 +42,11 @@ if (count _log >= 8) then { }; _log pushBack [_message, _moment, _type, _arguments]; -_unit setvariable [_logVarName, _log, true]; +_unit setVariable [_logVarName, _log, true]; ["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); -_logs = _unit getvariable [QGVAR(allLogs), []]; +_logs = _unit getVariable [QGVAR(allLogs), []]; if !(_logVarName in _logs) then { _logs pushBack _logVarName; - _unit setvariable [QGVAR(allLogs), _logs, true]; + _unit setVariable [QGVAR(allLogs), _logs, true]; }; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 8a08bdd98a..bd988fa84c 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -21,7 +21,7 @@ if (!local _unit) exitWith { [_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; -_log = _unit getvariable [QGVAR(triageCard), []]; +_log = _unit getVariable [QGVAR(triageCard), []]; _inList = false; _amount = 1; { @@ -40,5 +40,5 @@ _amount = 1; if (!_inList) then { _log pushBack [_newItem, 1, ACE_gameTime]; }; -_unit setvariable [QGVAR(triageCard), _log, true]; +_unit setVariable [QGVAR(triageCard), _log, true]; ["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index 81e8351c6a..e6856335cc 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -17,7 +17,7 @@ private ["_accessLevel", "_return"]; params ["_caller", "_target"]; -_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; +_accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1]; _return = false; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 7870683aa1..76712cc824 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -37,7 +37,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitWith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0] }; 0; }; @@ -55,7 +55,7 @@ if (getText (_config >> "condition") != "") then { if (isNil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (typeName _condition == "BOOL") then { _return = _condition; @@ -66,7 +66,7 @@ if (getText (_config >> "condition") != "") then { if (!_return) exitWith { false }; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -85,7 +85,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if !(isNil _x) exitWith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index ff2f95a92e..af601d9f33 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -19,7 +19,7 @@ params ["_oldBody", "_caller"]; if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies -_name = _oldBody getvariable ["ACE_name", "unknown"]; +_name = _oldBody getVariable ["ACE_name", "unknown"]; _class = typeOf _oldBody; _side = side _caller; _group = createGroup _side; @@ -71,12 +71,12 @@ if (isMultiplayer) then { hideObject _oldBody; }; -_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true]; -_oldBody setvariable [QGVAR(hasCopy), _newUnit, true]; -_newUnit setvariable ["ACE_isDead", true, true]; -_newUnit setvariable ["ACE_isUnconscious", true, true]; -_newUnit setvariable [QGVAR(disableInteraction), true, true]; -_oldBody setvariable [QGVAR(disableInteraction), true, true]; +_newUnit setVariable [QGVAR(copyOfUnit), _oldBody, true]; +_oldBody setVariable [QGVAR(hasCopy), _newUnit, true]; +_newUnit setVariable ["ACE_isDead", true, true]; +_newUnit setVariable ["ACE_isUnconscious", true, true]; +_newUnit setVariable [QGVAR(disableInteraction), true, true]; +_oldBody setVariable [QGVAR(disableInteraction), true, true]; [_newUnit, 0.89] call FUNC(setStructuralDamage); _newUnit; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index a001f36402..2d3005c332 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -69,7 +69,7 @@ _createdLitter = []; if (isNil _litterCondition) then { _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; } else { - _litterCondition = missionNamespace getvariable _litterCondition; + _litterCondition = missionNamespace getVariable _litterCondition; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; }; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {}; diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 2f460e5256..8be0e00903 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -32,13 +32,13 @@ if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true }; // Find the correct Damage threshold for unit. _damageThreshold = [1,1,1]; if ([_unit] call EFUNC(common,IsPlayer)) then { - _damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; + _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; } else { - _damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]]; + _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]]; }; _damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"]; -_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; +_damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; // Check if damage to body part is higher as damage head if (_part == 0) exitWith { diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 760cddb0db..9fd3bf7a8b 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -46,7 +46,7 @@ if (_show) then { }; disableSerialization; - _display = uiNamespace getvariable QGVAR(DisplayInformation); + _display = uiNamespace getVariable QGVAR(DisplayInformation); if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -59,26 +59,26 @@ if (_show) then { _genericMessages pushBack [localize _partText, [1, 1, 1, 1]]; }; - if (_target getvariable[QGVAR(isBleeding), false]) then { + if (_target getVariable[QGVAR(isBleeding), false]) then { _genericMessages pushBack [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]]; }; - if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { _genericMessages pushBack [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]]; }; - if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { + if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { _genericMessages pushBack [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; }; - if (_target getvariable[QGVAR(hasPain), false]) then { + if (_target getVariable[QGVAR(hasPain), false]) then { _genericMessages pushBack [localize LSTRING(Status_Pain), [1, 1, 1, 1]]; }; _totalIvVolume = 0; { private "_value"; - _value = _target getvariable _x; + _value = _target getVariable _x; if !(isNil "_value") then { - _totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); + _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); }; } forEach GVAR(IVBags); if (_totalIvVolume >= 1) then { @@ -88,7 +88,7 @@ if (_show) then { _damaged = [false, false, false, false, false, false]; _selectionBloodLoss = [0,0,0,0,0,0]; if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; private "_amountOf"; { _x params ["", "_x1", "_selectionX", "_amountOf", "_x4"]; @@ -110,7 +110,7 @@ if (_show) then { }; } forEach _openWounds; - _bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; // Find how much this bodypart is bleeding @@ -200,7 +200,7 @@ if (_show) then { lbClear _logCtrl; private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"]; - _logs = _target getvariable [QGVAR(logFile_Activity), []]; + _logs = _target getVariable [QGVAR(logFile_Activity), []]; { // [_message,_moment,_type, _arguments] _x params ["_message", "_moment", "_type", "_arguments"]; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 76ad990d00..47af145055 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -32,7 +32,7 @@ if (_show) then { }; disableSerialization; - _display = uiNamespace getvariable QGVAR(triageCard); + _display = uiNamespace getVariable QGVAR(triageCard); if (isNil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -43,7 +43,7 @@ if (_show) then { _lbCtrl = (_display displayCtrl 200); lbClear _lbCtrl; - _log = _target getvariable [QGVAR(triageCard), []]; + _log = _target getVariable [QGVAR(triageCard), []]; { _x params ["_item", "_amount"]; _message = _item; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index b3cead3cba..e7a4d3c0a9 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -17,7 +17,7 @@ private ["_ctrl", "_display", "_idc", "_pos"]; params ["_show"]; disableSerialization; -_display = uiNamespace getvariable QGVAR(triageCard); +_display = uiNamespace getVariable QGVAR(triageCard); if (isNil "_display") exitWith {}; _pos = [0,0,0,0]; diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index 110f85ee82..26727d3d8e 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -22,8 +22,8 @@ _totalBloodLoss = 0; // Advanced medical bloodloss handling if (GVAR(level) >= 2) then { - _tourniquets = _unit getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; - _openWounds = _unit getvariable [QGVAR(openWounds), []]; + _tourniquets = _unit getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; + _openWounds = _unit getVariable [QGVAR(openWounds), []]; //_cardiacOutput = [_unit] call FUNC(getCardiacOutput); { @@ -35,7 +35,7 @@ if (GVAR(level) >= 2) then { }; } forEach _openWounds; - _internalWounds = _unit getvariable [QGVAR(internalWounds), []]; + _internalWounds = _unit getVariable [QGVAR(internalWounds), []]; { _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); } forEach _internalWounds; @@ -43,7 +43,7 @@ if (GVAR(level) >= 2) then { // cap the blood loss to be no greater as the current cardiac output //(_totalBloodLoss min _cardiacOutput); } else { - { _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getvariable [QGVAR(bodyPartStatus), []]); + { _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getVariable [QGVAR(bodyPartStatus), []]); _totalBloodLoss = (_totalBloodLoss / 6) * BLOODLOSSRATE_BASIC; }; _totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0); diff --git a/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf index 659949d716..3fdc4f9d52 100644 --- a/addons/medical/functions/fnc_getBloodPressure.sqf +++ b/addons/medical/functions/fnc_getBloodPressure.sqf @@ -25,7 +25,7 @@ private ["_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistan params ["_unit"]; _cardiacOutput = [_unit] call FUNC(getCardiacOutput); -_resistance = _unit getvariable [QGVAR(peripheralResistance), 100]; +_resistance = _unit getVariable [QGVAR(peripheralResistance), 100]; _bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance; _bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance; diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index 3d71ea0c44..1737bb3b98 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -31,21 +31,21 @@ private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"]; params ["_unit"]; -_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; +_bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100]; _bloodVolumeChange = -([_unit] call FUNC(getBloodLoss)); if (_bloodVolume < 100.0) then { { - if ((_unit getvariable [_x, 0]) > 0) then { + if ((_unit getVariable [_x, 0]) > 0) then { _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; - _ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND; - _unit setvariable [_x,_ivVolume]; + _ivVolume = (_unit getVariable [_x, 0]) + IV_CHANGE_PER_SECOND; + _unit setVariable [_x,_ivVolume]; }; } forEach GVAR(IVBags); } else { { - if ((_unit getvariable [_x, 0]) > 0) then { - _unit setvariable [_x, 0]; // lets get rid of exessive IV volume + if ((_unit getVariable [_x, 0]) > 0) then { + _unit setVariable [_x, 0]; // lets get rid of exessive IV volume }; } forEach GVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf index f24aa438ca..d07319e8b5 100644 --- a/addons/medical/functions/fnc_getCardiacOutput.sqf +++ b/addons/medical/functions/fnc_getCardiacOutput.sqf @@ -24,4 +24,4 @@ params ["_unit"]; -((_unit getvariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable [QGVAR(heartRate), 80])/80-1); +((_unit getVariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getVariable [QGVAR(heartRate), 80])/80-1); diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf index cf9f7a417a..3ba4b7875f 100644 --- a/addons/medical/functions/fnc_getHeartRateChange.sqf +++ b/addons/medical/functions/fnc_getHeartRateChange.sqf @@ -19,11 +19,11 @@ private ["_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjust params ["_unit"]; _hrIncrease = 0; -if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { - _heartRate = _unit getvariable [QGVAR(heartRate), 80]; +if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then { + _heartRate = _unit getVariable [QGVAR(heartRate), 80]; _bloodLoss = [_unit] call FUNC(getBloodLoss); - _adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; + _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; { _x params ["_values", "_time", "_callBack"]; if (abs _values > 0) then { @@ -48,9 +48,9 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { } forEach _adjustment; _adjustment = _adjustment - [ObjNull]; - _unit setvariable [QGVAR(heartRateAdjustments), _adjustment]; + _unit setVariable [QGVAR(heartRateAdjustments), _adjustment]; - _bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; + _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100]; if (_bloodVolume > 75) then { if (_bloodLoss >0.0) then { if (_bloodLoss <0.5) then { diff --git a/addons/medical/functions/fnc_getTriageStatus.sqf b/addons/medical/functions/fnc_getTriageStatus.sqf index 4dcef530a3..79af660407 100644 --- a/addons/medical/functions/fnc_getTriageStatus.sqf +++ b/addons/medical/functions/fnc_getTriageStatus.sqf @@ -17,7 +17,7 @@ private ["_unit","_return","_status"]; params ["_unit"]; -_status = _unit getvariable [QGVAR(triageLevel), -1]; +_status = _unit getVariable [QGVAR(triageLevel), -1]; _return = switch (_status) do { case 1: {[localize LSTRING(Triage_Status_Minor), 1, [0, 0.5, 0, 0.9]]}; case 2: {[localize LSTRING(Triage_Status_Delayed), 2, [0.7, 0.5, 0, 0.9]]}; diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 557c52cedd..bd06dabad6 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -51,7 +51,7 @@ if (isClass (_config >> _className)) then { }; }; -_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; +_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _injuryType = _injury select 1; _exist = false; _bandagedInjury = []; @@ -72,7 +72,7 @@ if !(_exist) then { _bandagedWounds pushBack _bandagedInjury; }; -_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; +_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; // Check if we are ever going to reopen this if (random(1) <= _reopeningChance) then { @@ -82,14 +82,14 @@ if (random(1) <= _reopeningChance) then { params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; //if (alive _target) then { - _openWounds = _target getvariable [QGVAR(openWounds), []]; + _openWounds = _target getVariable [QGVAR(openWounds), []]; if ((count _openWounds)-1 < _injuryIndex) exitWith {}; _selectedInjury = _openWounds select _injuryIndex; if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; _openWounds set [_injuryIndex, _selectedInjury]; - _bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; + _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []]; _exist = false; _injuryId = _injury select 1; { @@ -102,8 +102,8 @@ if (random(1) <= _reopeningChance) then { } forEach _bandagedWounds; if (_exist) then { - _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; - _target setvariable [QGVAR(openWounds), _openWounds, true]; + _target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true]; + _target setVariable [QGVAR(openWounds), _openWounds, true]; }; }; // Otherwise something went wrong, we we don't reopen them.. diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index e63f8f3d91..4532598d47 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { - if (_unit getvariable ["ACE_isUnconscious", false]) exitWith { + if (_unit getVariable ["ACE_isUnconscious", false]) exitWith { [_unit] call FUNC(setDead); 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 517acce0ba..33b1d3f7ee 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -27,10 +27,10 @@ if (_part < 0) exitWith {}; _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; // Sorting out the damage -_damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; -_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); @@ -47,7 +47,7 @@ _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); //}; -if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { +if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index e5180e519c..ace7041cb5 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -25,8 +25,8 @@ if (_bodyPartn > 1) exitWith {}; if (_amountOfDamage > 0.5) then { if (random(1) >= 0.8) then { - if !(_unit getvariable[QGVAR(airwayCollapsed), false]) then { - _unit setvariable [QGVAR(airwayCollapsed), true, true]; + if !(_unit getVariable[QGVAR(airwayCollapsed), false]) then { + _unit setVariable [QGVAR(airwayCollapsed), true, true]; }; }; }; diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index d159f7a52b..9ec67bc382 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -16,7 +16,7 @@ private ["_damageBodyParts", "_cache_params", "_cache_damages"]; params ["_target"]; TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target); -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []]; _cache_damages = _target getVariable QGVAR(cachedDamages); @@ -31,9 +31,9 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c private ["_newDamage", "_pain"]; _newDamage = (_cache_damages select _forEachIndex); _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; - _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts]; + _unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; - if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { + if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); @@ -46,8 +46,8 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c }forEach _cache_params; // We broadcast the value across the net here, in order to avoid broadcasting it multiple times earlier in the above code block -_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; -TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); +_target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); _target setHitPointDamage ["hitHead", _headDamage min 0.95]; diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index fd6b845930..5292781420 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -59,12 +59,12 @@ if (_amountOfDamage > 0.05) then { }; private ["_fractures", "_fractureID", "_amountOf"]; - _fractures = _unit getvariable[QGVAR(fractures), []]; + _fractures = _unit getVariable[QGVAR(fractures), []]; _fractureID = 1; _amountOf = count _fractures; if (_amountOf > 0) then { _fractureID = (_fractures select (_amountOf - 1) select 0) + 1; }; _fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; - _unit setvariable [QGVAR(fractures), _fractures, true]; + _unit setVariable [QGVAR(fractures), _fractures, true]; }; diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 311314221e..38665a0e40 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -22,8 +22,8 @@ params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamag TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage); // Administration for open wounds and ids -_openWounds = _unit getvariable[QGVAR(openWounds), []]; -_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; +_openWounds = _unit getVariable[QGVAR(openWounds), []]; +_woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1]; _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _selectionName, _damage, _typeOfDamage, _woundID]; @@ -52,13 +52,13 @@ _foundIndex = -1; }; } forEach _woundsCreated; -_unit setvariable [QGVAR(openWounds), _openWounds, true]; +_unit setVariable [QGVAR(openWounds), _openWounds, true]; // Only update if new wounds have been created if (count _woundsCreated > 0) then { - _unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; + _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true]; }; -_painLevel = _unit getvariable [QGVAR(pain), 0]; -_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; -TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); +_painLevel = _unit getVariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), _painLevel + _painToAdd]; +TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated); diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index d791fc424e..4384dce2d7 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -26,7 +26,7 @@ _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); if (_bodyPartn < 0) exitWith {}; // Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] -_injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; +_injuryTypeInfo = missionNamespace getVariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; // This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..] _allInjuriesForDamageType = _injuryTypeInfo select 2; @@ -34,7 +34,7 @@ _allInjuriesForDamageType = _injuryTypeInfo select 2; if (count _allInjuriesForDamageType == 0) then { // grabbing the configuration for unknown damage type - _injuryTypeInfo = missionNamespace getvariable [QGVAR(woundInjuryType_unknown),[[], false, []]]; + _injuryTypeInfo = missionNamespace getVariable [QGVAR(woundInjuryType_unknown),[[], false, []]]; _allInjuriesForDamageType = _injuryTypeInfo select 2; }; @@ -73,8 +73,8 @@ _allPossibleInjuries = []; if (_highestPossibleSpot < 0) exitWith {}; // Administration for open wounds and ids -_openWounds = _unit getvariable[QGVAR(openWounds), []]; -_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; +_openWounds = _unit getVariable[QGVAR(openWounds), []]; +_woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1]; _painToAdd = 0; _woundsCreated = []; @@ -122,13 +122,13 @@ _woundsCreated = []; }; } forEach (_injuryTypeInfo select 0); // forEach damage thresholds -_unit setvariable [QGVAR(openWounds), _openWounds, true]; +_unit setVariable [QGVAR(openWounds), _openWounds, true]; // Only update if new wounds have been created if (count _woundsCreated > 0) then { - _unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; + _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true]; }; -_painLevel = _unit getvariable [QGVAR(pain), 0]; -_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; -TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); +_painLevel = _unit getVariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), _painLevel + _painToAdd]; +TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated); diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index 485dac273d..c8d08cbde2 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -17,9 +17,9 @@ private "_openWounds"; params ["_unit"]; if (!local _unit) exitWith {}; -_unit setvariable [QGVAR(pain), 0]; +_unit setVariable [QGVAR(pain), 0]; if (GVAR(level) >= 2) then { - _unit setvariable [QGVAR(heartRate), 0]; - _unit setvariable [QGVAR(bloodPressure), [0, 0]]; - _unit setvariable [QGVAR(airwayStatus), 0]; + _unit setVariable [QGVAR(heartRate), 0]; + _unit setVariable [QGVAR(bloodPressure), [0, 0]]; + _unit setVariable [QGVAR(airwayStatus), 0]; }; diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf index 50a30e90e8..91689f311f 100644 --- a/addons/medical/functions/fnc_handleLocal.sqf +++ b/addons/medical/functions/fnc_handleLocal.sqf @@ -17,17 +17,17 @@ params ["_unit", "_local"]; if (_local) then { - if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then { + if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then { [_unit, true] call FUNC(addToInjuredCollection); }; - if ((_unit getvariable ["ACE_isUnconscious",false]) && {count (_unit getvariable [QGVAR(unconsciousArguments), []]) >= 6}) then { + if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then { private "_arguments"; - _arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]); + _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]); _arguments set [2, ACE_time]; [DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler; - _unit setvariable [QGVAR(unconsciousArguments), nil, true]; + _unit setVariable [QGVAR(unconsciousArguments), nil, true]; }; }; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index a0c4c365e1..6159351cc9 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -18,58 +18,58 @@ params ["_unit", "_interval"]; TRACE_3("ACE_DEBUG",_unit,_interval,_unit); if (_interval == 0) exitWith {}; -_lastTimeValuesSynced = _unit getvariable [QGVAR(lastMomentValuesSynced), 0]; +_lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0]; _syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced)); if (_syncValues) then { - _unit setvariable [QGVAR(lastMomentValuesSynced), ACE_time]; + _unit setVariable [QGVAR(lastMomentValuesSynced), ACE_time]; }; -_bloodVolume = (_unit getvariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange)); +_bloodVolume = (_unit getVariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange)); _bloodVolume = _bloodVolume max 0; -_unit setvariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; +_unit setVariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; TRACE_3("ACE_DEBUG",_bloodVolume,_syncValues,_unit); // Set variables for synchronizing information across the net if (_bloodVolume < 100) then { if ((_bloodVolume < 90 && (GVAR(level) == 2)) || _bloodVolume <= 45) then { TRACE_4("ACE_DEBUG_ADVANCED",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 2) then { - _unit setvariable [QGVAR(hasLostBlood), 2, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 2) then { + _unit setVariable [QGVAR(hasLostBlood), 2, true]; }; } else { TRACE_4("ACE_DEBUG", _bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 1) then { - _unit setvariable [QGVAR(hasLostBlood), 1, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 1) then { + _unit setVariable [QGVAR(hasLostBlood), 1, true]; }; } } else { TRACE_4("ACE_DEBUG",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); - if (_unit getvariable [QGVAR(hasLostBlood), 0] != 0) then { - _unit setvariable [QGVAR(hasLostBlood), 0, true]; + if (_unit getVariable [QGVAR(hasLostBlood), 0] != 0) then { + _unit setVariable [QGVAR(hasLostBlood), 0, true]; }; }; TRACE_3("ACE_DEBUG",[_unit] call FUNC(getBloodLoss),_unit getVariable QGVAR(isBleeding),_unit); if (([_unit] call FUNC(getBloodLoss)) > 0) then { - if !(_unit getvariable [QGVAR(isBleeding), false]) then { - _unit setvariable [QGVAR(isBleeding), true, true]; + if !(_unit getVariable [QGVAR(isBleeding), false]) then { + _unit setVariable [QGVAR(isBleeding), true, true]; }; } else { - if (_unit getvariable [QGVAR(isBleeding), false]) then { - _unit setvariable [QGVAR(isBleeding), false, true]; + if (_unit getVariable [QGVAR(isBleeding), false]) then { + _unit setVariable [QGVAR(isBleeding), false, true]; }; }; -_painStatus = _unit getvariable [QGVAR(pain), 0]; +_painStatus = _unit getVariable [QGVAR(pain), 0]; TRACE_4("ACE_DEBUG",_painStatus,_unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(painSuppress),_unit); -if (_painStatus > (_unit getvariable [QGVAR(painSuppress), 0])) then { - if !(_unit getvariable [QGVAR(hasPain), false]) then { - _unit setvariable [QGVAR(hasPain), true, true]; +if (_painStatus > (_unit getVariable [QGVAR(painSuppress), 0])) then { + if !(_unit getVariable [QGVAR(hasPain), false]) then { + _unit setVariable [QGVAR(hasPain), true, true]; }; } else { - if (_unit getvariable [QGVAR(hasPain), false]) then { - _unit setvariable [QGVAR(hasPain), false, true]; + if (_unit getVariable [QGVAR(hasPain), false]) then { + _unit setVariable [QGVAR(hasPain), false, true]; }; }; @@ -111,11 +111,11 @@ if (GVAR(level) >= 2) then { }; // Set the vitals - _heartRate = (_unit getvariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); - _unit setvariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; + _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); + _unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; _bloodPressure = [_unit] call FUNC(getBloodPressure); - _unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; + _unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; if (_painStatus > 0 && {_painStatus < 10}) then { _painReduce = if (_painStatus > 5) then {0.002} else {0.001}; @@ -125,15 +125,15 @@ if (GVAR(level) >= 2) then { // TODO Disabled until implemented fully // Handle airway /*if (GVAR(setting_allowAirwayInjuries)) then { - _airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100]; - if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then { + _airwayStatus = _unit getVariable [QGVAR(airwayStatus), 100]; + if (((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) && !((_unit getVariable [QGVAR(airwaySecured), false]))) then { if (_airwayStatus >= 0.5) then { - _unit setvariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues]; + _unit setVariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues]; }; } else { - if !((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) then { + if !((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) then { if (_airwayStatus < 100) then { - _unit setvariable [QGVAR(airwayStatus), (_airwayStatus + 1.5 * _interval) min 100, _syncValues]; + _unit setVariable [QGVAR(airwayStatus), (_airwayStatus + 1.5 * _interval) min 100, _syncValues]; }; }; }; @@ -149,7 +149,7 @@ if (GVAR(level) >= 2) then { // TODO check for in revive state instead of variable _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; - if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { + if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then { if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then { [_unit, true, 10+ random(20)] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already. }; @@ -183,9 +183,9 @@ if (GVAR(level) >= 2) then { TRACE_3("ACE_DEBUG_IVBAGS_SYNC",GVAR(IVBags),_syncValues,_unit); { private "_value"; - _value = _unit getvariable _x; + _value = _unit getVariable _x; if !(isNil "_value") then { - _unit setvariable [_x,(_unit getvariable [_x, 0]), true]; + _unit setVariable [_x,(_unit getVariable [_x, 0]), true]; }; } forEach GVAR(IVBags); }; diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index 88dc084924..5e2d73f925 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -19,9 +19,9 @@ private "_medicalEnabled"; params ["_unit"]; -_medicalEnabled = _unit getvariable QGVAR(enableMedical); +_medicalEnabled = _unit getVariable QGVAR(enableMedical); if (isNil "_medicalEnabled") exitWith { - (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) + (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getVariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) }; _medicalEnabled diff --git a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf index 955665233a..abbe512d74 100644 --- a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf +++ b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf @@ -16,4 +16,4 @@ params ["_target", "_selectionName"]; -(((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select ([_selectionName] call FUNC(selectionNameToNumber))) > 0); +(((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select ([_selectionName] call FUNC(selectionNameToNumber))) > 0); diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index d276676669..ad58a0126e 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -22,26 +22,26 @@ _unit setVariable ["ACE_isUnconscious", false, true]; // advanced // tourniquets -_unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; +_unit setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; // wounds and injuries -_unit setvariable [QGVAR(openWounds), [], true]; -_unit setvariable [QGVAR(bandagedWounds), [], true]; +_unit setVariable [QGVAR(openWounds), [], true]; +_unit setVariable [QGVAR(bandagedWounds), [], true]; _unit setVariable [QGVAR(internalWounds), [], true]; -_unit setvariable [QGVAR(lastUniqueWoundID), 1, true]; +_unit setVariable [QGVAR(lastUniqueWoundID), 1, true]; // vitals _unit setVariable [QGVAR(heartRate), 80]; -_unit setvariable [QGVAR(heartRateAdjustments), []]; -_unit setvariable [QGVAR(bloodPressure), [80, 120]]; +_unit setVariable [QGVAR(heartRateAdjustments), []]; +_unit setVariable [QGVAR(bloodPressure), [80, 120]]; _unit setVariable [QGVAR(peripheralResistance), 100]; // fractures _unit setVariable [QGVAR(fractures), [], true]; // triage card and logs -_unit setvariable [QGVAR(triageLevel), 0, true]; -_unit setvariable [QGVAR(triageCard), [], true]; +_unit setVariable [QGVAR(triageLevel), 0, true]; +_unit setVariable [QGVAR(triageCard), [], true]; // IVs _unit setVariable [QGVAR(salineIVVolume), 0, true]; @@ -49,36 +49,36 @@ _unit setVariable [QGVAR(plasmaIVVolume), 0, true]; _unit setVariable [QGVAR(bloodIVVolume), 0, true]; // damage storage -_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; +_unit setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; // airway -_unit setvariable [QGVAR(airwayStatus), 100]; +_unit setVariable [QGVAR(airwayStatus), 100]; _unit setVariable [QGVAR(airwayOccluded), false]; -_unit setvariable [QGVAR(airwayCollapsed), false]; +_unit setVariable [QGVAR(airwayCollapsed), false]; // generic medical admin -_unit setvariable [QGVAR(addedToUnitLoop), false, true]; -_unit setvariable [QGVAR(inCardiacArrest), false, true]; -_unit setvariable [QGVAR(hasLostBlood), 0, true]; -_unit setvariable [QGVAR(isBleeding), false, true]; -_unit setvariable [QGVAR(hasPain), false, true]; -_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true]; -_unit setvariable [QGVAR(painSuppress), 0, true]; +_unit setVariable [QGVAR(addedToUnitLoop), false, true]; +_unit setVariable [QGVAR(inCardiacArrest), false, true]; +_unit setVariable [QGVAR(hasLostBlood), 0, true]; +_unit setVariable [QGVAR(isBleeding), false, true]; +_unit setVariable [QGVAR(hasPain), false, true]; +_unit setVariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true]; +_unit setVariable [QGVAR(painSuppress), 0, true]; private ["_allUsedMedication", "_logs"]; // medication _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []]; { - _unit setvariable [_x select 0, nil]; + _unit setVariable [_x select 0, nil]; } forEach _allUsedMedication; _unit setVariable [QGVAR(allUsedMedication), [], true]; -_logs = _unit getvariable [QGVAR(allLogs), []]; +_logs = _unit getVariable [QGVAR(allLogs), []]; { - _unit setvariable [_x, nil]; + _unit setVariable [_x, nil]; } forEach _logs; -_unit setvariable [QGVAR(allLogs), [], true]; +_unit setVariable [QGVAR(allLogs), [], true]; // items [{ diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 5810c22d88..e0298ed054 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -21,7 +21,7 @@ if (GVAR(level) <= 1) exitWith { }; _totalBloodLoss = 0; -_openWounds = _unit getvariable [QGVAR(openWounds), []]; +_openWounds = _unit getVariable [QGVAR(openWounds), []]; { // total bleeding ratio * percentage of injury left _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 3c6c535e1d..02e5985297 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -21,7 +21,7 @@ params ["_target", "_player", "_selectionN", "_actionData"]; if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { private ["_pointDamage"]; - _pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; + _pointDamage = (_target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; if (_pointDamage >= 0.8) exitWith { _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; @@ -32,7 +32,7 @@ if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { }; private ["_openWounds", "_amountOf"]; -_openWounds = _target getvariable [QGVAR(openWounds), []]; +_openWounds = _target getVariable [QGVAR(openWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf index 970cc19ca7..368b065908 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -18,11 +18,11 @@ private ["_setting", "_objects"]; params [["_logic", objNull, [objNull]]]; if (!isNull _logic) then { - _setting = _logic getvariable ["class",0]; + _setting = _logic getVariable ["class",0]; _objects = synchronizedObjects _logic; { if (local _x) then { - _x setvariable[QGVAR(isMedicalFacility), true, true]; + _x setVariable[QGVAR(isMedicalFacility), true, true]; }; } forEach _objects; }; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index f16caad75c..8eb55b3d1b 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -22,7 +22,7 @@ private ["_foundEntry", "_allUsedMedication","_allMedsFromClassname", "_usedMeds params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"]; _foundEntry = false; -_allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; +_allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; { _x params ["_variableX", "_allMedsFromClassname"]; if (_variableX== _variable) exitWith { @@ -30,7 +30,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; _allMedsFromClassname pushBack _className; _x set [1, _allMedsFromClassname]; _allUsedMedication set [_forEachIndex, _x]; - _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; + _target setVariable [QGVAR(allUsedMedication), _allUsedMedication]; }; _foundEntry = true; }; @@ -38,11 +38,11 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; if (!_foundEntry) then { _allUsedMedication pushBack [_variable, [_className]]; - _target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; + _target setVariable [QGVAR(allUsedMedication), _allUsedMedication]; }; -_usedMeds = _target getvariable [_variable, 0]; +_usedMeds = _target getVariable [_variable, 0]; if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then { [_target] call FUNC(setDead); }; @@ -68,7 +68,7 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then { if (isNil _onOverDose) then { _onOverDose = compile _onOverDose; } else { - _onOverDose = missionNamespace getvariable _onOverDose; + _onOverDose = missionNamespace getVariable _onOverDose; }; [_target, _className] call _onOverDose; }; @@ -80,15 +80,15 @@ _viscosityAdjustment = _viscosityChange / _timeInSystem; params ["_args", "_idPFH"]; _args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"]; private "_usedMeds"; - _usedMeds = _target getvariable [_variable, 0]; + _usedMeds = _target getVariable [_variable, 0]; _usedMeds = _usedMeds - _decreaseAmount; - _target setvariable [_variable, _usedMeds]; + _target setVariable [_variable, _usedMeds]; _amountDecreased = _amountDecreased + _decreaseAmount; // Restoring the viscosity while the medication is leaving the system - _target setvariable [QGVAR(peripheralResistance), ((_target getvariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0]; - _target setvariable [QGVAR(painSuppress), ((_target getvariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; + _target setVariable [QGVAR(peripheralResistance), ((_target getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0]; + _target setVariable [QGVAR(painSuppress), ((_target getVariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then { [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index deb333fdd3..84fc33dec2 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -18,7 +18,7 @@ private ["_unit", "_injury", "_openWounds", "_injuryID", "_exists"]; params ["_unit", "_injury"]; if (!local _unit) then { - _openWounds = _unit getvariable[QGVAR(openWounds), []]; + _openWounds = _unit getVariable[QGVAR(openWounds), []]; _injuryID = _injury select 0; _exists = false; @@ -32,5 +32,5 @@ if (!local _unit) then { if (!_exists) then { _openWounds pushBack _injury; }; - _unit setvariable [QGVAR(openWounds), _openWounds]; + _unit setVariable [QGVAR(openWounds), _openWounds]; }; diff --git a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf index 11b13a9ad0..dff59fb2cf 100644 --- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf +++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf @@ -17,7 +17,7 @@ private ["_unit", "_openWounds", "_originOfrequest"]; params ["_unit", "_originOfrequest"]; if (local _unit && !(local _originOfrequest)) then { - _openWounds = _unit getvariable [QGVAR(openWounds), []]; + _openWounds = _unit getVariable [QGVAR(openWounds), []]; { ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent); } forEach _openWounds; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 5e36a56a87..42dd98dc1f 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -116,7 +116,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific"); if (isArray(_damageTypesConfig >> _x >> "thresholds")) then { _typeThresholds = getArray(_damageTypesConfig >> _x >> "thresholds");}; if (isNumber(_damageTypesConfig >> _x >> "selectionSpecific")) then { _selectionSpecificType = getNumber(_damageTypesConfig >> _x >> "selectionSpecific");}; }; - missionNamespace setvariable [_varName, [_typeThresholds, _selectionSpecificType > 0, _woundTypes]]; + missionNamespace setVariable [_varName, [_typeThresholds, _selectionSpecificType > 0, _woundTypes]]; private ["_minDamageThresholds", "_amountThresholds"]; // extension loading diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4e3fe5820e..bcb590143d 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -21,8 +21,8 @@ params ["_unit", "_pain"]; if (!local _unit || !GVAR(enableScreams)) exitWith{}; // Lock if the unit is already playing a sound. -if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {}; -_unit setvariable [QGVAR(playingInjuredSound),true]; +if ((_unit getVariable [QGVAR(playingInjuredSound),false])) exitWith {}; +_unit setVariable [QGVAR(playingInjuredSound),true]; // Play the sound if there is any damage present. if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { @@ -75,9 +75,9 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Clean up the lock [{ - (_this select 0) setvariable [QGVAR(playingInjuredSound),nil]; + (_this select 0) setVariable [QGVAR(playingInjuredSound),nil]; }, [_unit], _delay, _delay] call EFUNC(common,waitAndExecute); }; // Clean up in case there has not been played any sounds. -_unit setvariable [QGVAR(playingInjuredSound),nil]; +_unit setVariable [QGVAR(playingInjuredSound),nil]; diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf index feb46633d8..1d7d6de53f 100644 --- a/addons/medical/functions/fnc_requestWoundSync.sqf +++ b/addons/medical/functions/fnc_requestWoundSync.sqf @@ -17,6 +17,6 @@ params [ "_target", "_caller"]; if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information -if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {}; -_target setvariable [QGVAR(isWoundSynced), true]; +if (_target getVariable [QGVAR(isWoundSynced), false]) exitWith {}; +_target setVariable [QGVAR(isWoundSynced), true]; ["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 6e770ae6d2..7b2c195f10 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -17,9 +17,9 @@ private "_timeInCardiacArrest"; params ["_unit"]; -if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {}; -_unit setvariable [QGVAR(inCardiacArrest), true,true]; -_unit setvariable [QGVAR(heartRate), 0]; +if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {}; +_unit setVariable [QGVAR(inCardiacArrest), true,true]; +_unit setVariable [QGVAR(heartRate), 0]; ["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent); @@ -31,14 +31,14 @@ _timeInCardiacArrest = 120 + round(random(600)); params ["_args", "_idPFH"]; _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; - _heartRate = _unit getvariable [QGVAR(heartRate), 80]; + _heartRate = _unit getVariable [QGVAR(heartRate), 80]; if (_heartRate > 0 || !alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inCardiacArrest), nil,true]; + _unit setVariable [QGVAR(inCardiacArrest), nil,true]; }; if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inCardiacArrest), nil,true]; + _unit setVariable [QGVAR(inCardiacArrest), nil,true]; [_unit] call FUNC(setDead); }; }, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 4f0d8e76c7..9518338de6 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -24,9 +24,9 @@ if (!local _unit) exitWith { _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith { - if (_unit getvariable [QGVAR(inReviveState), false]) exitWith { + if (_unit getVariable [QGVAR(inReviveState), false]) exitWith { if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; if (_lifesLeft == 0) then { [_unit, true] call FUNC(setDead); }; @@ -35,45 +35,45 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == false; }; - _unit setvariable [QGVAR(inReviveState), true, true]; - _unit setvariable [QGVAR(reviveStartTime), ACE_time]; + _unit setVariable [QGVAR(inReviveState), true, true]; + _unit setVariable [QGVAR(reviveStartTime), ACE_time]; [_unit, true] call FUNC(setUnconscious); [{ private "_startTime"; params ["_args", "_idPFH"]; _args params ["_unit"]; - _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; + _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setvariable [QGVAR(inReviveState), nil, true]; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(inReviveState), nil, true]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_unit, true] call FUNC(setDead); }; - if !(_unit getvariable [QGVAR(inReviveState), false]) exitWith { + if !(_unit getVariable [QGVAR(inReviveState), false]) exitWith { // revived without dieing, so in case we have lifes, remove one. if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; - _unit setvariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; }; - _unit setvariable [QGVAR(reviveStartTime), nil]; + _unit setVariable [QGVAR(reviveStartTime), nil]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (GVAR(level) >= 2) then { - if (_unit getvariable [QGVAR(heartRate), 60] > 0) then { - _unit setvariable [QGVAR(heartRate), 0]; + if (_unit getVariable [QGVAR(heartRate), 60] > 0) then { + _unit setVariable [QGVAR(heartRate), 0]; }; }; }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; false; }; -_unit setvariable ["ACE_isDead", true, true]; +_unit setVariable ["ACE_isDead", true, true]; if (isPLayer _unit) then { - _unit setvariable ["isDeadPlayer", true, true]; + _unit setVariable ["isDeadPlayer", true, true]; }; ["medical_onSetDead", [_unit]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 1b54177212..910745d7bb 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -33,7 +33,7 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {}; if !(_set) exitWith { - _unit setvariable ["ACE_isUnconscious", false, true]; + _unit setVariable ["ACE_isUnconscious", false, true]; }; if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{}; @@ -42,7 +42,7 @@ if (!local _unit) exitWith { [[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; -_unit setvariable ["ACE_isUnconscious", true, true]; +_unit setVariable ["ACE_isUnconscious", true, true]; _unit setUnconscious true; if (_unit == ACE_player) then { diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index e0ea58e1c4..b8ca4355c4 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -42,7 +42,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { } else { // Check for required class if (isText (_config >> "requiredMedic")) exitWith { - missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; + missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]; }; 0; }; @@ -63,7 +63,7 @@ if (isText (_config >> "Condition")) then { if (isNil _condition) then { _condition = compile _condition; } else { - _condition = missionNamespace getvariable _condition; + _condition = missionNamespace getVariable _condition; }; if (typeName _condition == "BOOL") then { _return = _condition; @@ -75,7 +75,7 @@ if (isText (_config >> "Condition")) then { if (!_return) exitWith {false}; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { - missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] + missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; @@ -97,7 +97,7 @@ if ("All" in _locations) then { if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if !(isNil _x) exitWith { private "_val"; - _val = missionNamespace getvariable _x; + _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { case 0: {true}; //AdvancedMedicalSettings_anywhere @@ -119,7 +119,7 @@ _consumeItems = if (isNumber (_config >> "itemConsumed")) then { } else { // Check for required class if (isText (_config >> "itemConsumed")) exitWith { - missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; + missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; }; 0; }; @@ -135,19 +135,19 @@ if (_callbackProgress == "") then { if (isNil _callbackProgress) then { _callbackProgress = compile _callbackProgress; } else { - _callbackProgress = missionNamespace getvariable _callbackProgress; + _callbackProgress = missionNamespace getVariable _callbackProgress; }; // Patient Animation _patientAnim = getText (_config >> "animationPatient"); -if (_target getvariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { +if (_target getVariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then { if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then { _patientAnim = getText (_config >> "animationPatientUnconscious"); }; }; if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then { - if (_target getvariable ["ACE_isUnconscious", false]) then { + if (_target getVariable ["ACE_isUnconscious", false]) then { [_target, _patientAnim, 2, true] call EFUNC(common,doAnimation); } else { [_target, _patientAnim, 1, true] call EFUNC(common,doAnimation); @@ -160,7 +160,7 @@ if (_caller == _target) then { _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); }; -_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; +_caller setVariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -184,12 +184,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { if ((stance _caller) == "STAND") then { switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon - case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; - case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; - case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; + case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; + case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; + case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; }; } else { - _caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; @@ -203,7 +203,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { if (isNil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { - _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; + _treatmentTimeConfig = missionNamespace getVariable _treatmentTimeConfig; }; if (typeName _treatmentTimeConfig == "SCALAR") exitWith { _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index f09de600ae..f86e620625 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -18,7 +18,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items"]; -if (alive _target && {(_target getvariable [QGVAR(inCardiacArrest), false] || _target getvariable [QGVAR(inReviveState), false])}) then { +if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _target getVariable [QGVAR(inReviveState), false])}) then { [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index 9024489a3b..7f273d1fad 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -17,17 +17,17 @@ private "_reviveStartTime"; params ["_caller","_target"]; -if (_target getvariable [QGVAR(inReviveState), false]) then { - _reviveStartTime = _target getvariable [QGVAR(reviveStartTime),0]; +if (_target getVariable [QGVAR(inReviveState), false]) then { + _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0]; if (_reviveStartTime > 0) then { - _target setvariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; + _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; }; }; if (GVAR(level) > 1 && {(random 1) >= 0.6}) then { - _target setvariable [QGVAR(inCardiacArrest), nil,true]; - _target setvariable [QGVAR(heartRate), 40]; - _target setvariable [QGVAR(bloodPressure), [50,70]]; + _target setVariable [QGVAR(inCardiacArrest), nil,true]; + _target setVariable [QGVAR(heartRate), 40]; + _target setVariable [QGVAR(bloodPressure), [50,70]]; }; [_target, "activity", LSTRING(Activity_CPR), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 81ffd1bd20..fe97fad031 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber); if (_part < 0) exitWith {false}; // Get the open wounds for this unit -_openWounds = _target getvariable [QGVAR(openWounds), []]; +_openWounds = _target getVariable [QGVAR(openWounds), []]; if (count _openWounds == 0) exitWith {false}; // nothing to do here! // Get the default effectiveness for the used bandage @@ -84,7 +84,7 @@ _impact = if ((_mostEffectiveInjury select 3) >= _effectivenessFound) then {_eff _mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _impact) max 0]; _openWounds set [_mostEffectiveSpot, _mostEffectiveInjury]; -_target setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; +_target setVariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; if (USE_WOUND_EVENT_SYNC) then { ["medical_propagateWound", [_target, _mostEffectiveInjury]] call EFUNC(common,globalEvent); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index 8f27901eaa..e3befb13a9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -20,17 +20,17 @@ if (alive _target) exitWith { _target setVariable [QGVAR(bloodVolume), 100, true]; // tourniquets - _target setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; + _target setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true]; // wounds and injuries - _target setvariable [QGVAR(openWounds), [], true]; - _target setvariable [QGVAR(bandagedWounds), [], true]; + _target setVariable [QGVAR(openWounds), [], true]; + _target setVariable [QGVAR(bandagedWounds), [], true]; _target setVariable [QGVAR(internalWounds), [], true]; // vitals _target setVariable [QGVAR(heartRate), 80]; - _target setvariable [QGVAR(heartRateAdjustments), []]; - _target setvariable [QGVAR(bloodPressure), [80, 120]]; + _target setVariable [QGVAR(heartRateAdjustments), []]; + _target setVariable [QGVAR(bloodPressure), [80, 120]]; _target setVariable [QGVAR(peripheralResistance), 100]; // fractures @@ -42,27 +42,27 @@ if (alive _target) exitWith { _target setVariable [QGVAR(bloodIVVolume), 0]; // damage storage - _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; + _target setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; // airway - _target setvariable [QGVAR(airwayStatus), 100, true]; + _target setVariable [QGVAR(airwayStatus), 100, true]; _target setVariable [QGVAR(airwayOccluded), false, true]; - _target setvariable [QGVAR(airwayCollapsed), false, true]; + _target setVariable [QGVAR(airwayCollapsed), false, true]; // generic medical admin - _target setvariable [QGVAR(addedToUnitLoop), false, true]; - _target setvariable [QGVAR(inCardiacArrest), false, true]; - _target setvariable [QGVAR(inReviveState), false, true]; + _target setVariable [QGVAR(addedToUnitLoop), false, true]; + _target setVariable [QGVAR(inCardiacArrest), false, true]; + _target setVariable [QGVAR(inReviveState), false, true]; _target setVariable ["ACE_isUnconscious", false, true]; - _target setvariable [QGVAR(hasLostBlood), 0, true]; - _target setvariable [QGVAR(isBleeding), false, true]; - _target setvariable [QGVAR(hasPain), false, true]; - _target setvariable [QGVAR(painSuppress), 0, true]; + _target setVariable [QGVAR(hasLostBlood), 0, true]; + _target setVariable [QGVAR(isBleeding), false, true]; + _target setVariable [QGVAR(hasPain), false, true]; + _target setVariable [QGVAR(painSuppress), 0, true]; // medication _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; { - _target setvariable [_x select 0, nil]; + _target setVariable [_x select 0, nil]; } forEach _allUsedMedication; // Resetting damage diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index c2797d825d..952f245da9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -20,9 +20,9 @@ params ["_target", "_className"]; // We have added a new dose of this medication to our system, so let's increase it _varName = format[QGVAR(%1_inSystem), _className]; -_currentInSystem = _target getvariable [_varName, 0]; +_currentInSystem = _target getVariable [_varName, 0]; _currentInSystem = _currentInSystem + 1; -_target setvariable [_varName, _currentInSystem]; +_target setVariable [_varName, _currentInSystem]; // Find the proper attributes for the used medication _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication"); @@ -51,11 +51,11 @@ if (isClass (_medicationConfig >> _className)) then { if (isNil _hrCallback) then { _hrCallback = compile _hrCallback; } else { - _hrCallback = missionNamespace getvariable _hrCallback; + _hrCallback = missionNamespace getVariable _hrCallback; }; // Adjust the heart rate based upon config entry -_heartRate = _target getvariable [QGVAR(heartRate), 70]; +_heartRate = _target getVariable [QGVAR(heartRate), 70]; if (alive _target) then { if (_heartRate > 0) then { if (_heartRate <= 45) then { @@ -72,17 +72,17 @@ if (alive _target) then { if (_painReduce > 0) then { // Reduce pain - _painSuppress = _target getvariable [QGVAR(painSuppress), 0]; - _target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; + _painSuppress = _target getVariable [QGVAR(painSuppress), 0]; + _target setVariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; if (!GVAR(painIsOnlySuppressed)) then { - _pain = _target getvariable [QGVAR(pain), 0]; - _target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; + _pain = _target getVariable [QGVAR(pain), 0]; + _target setVariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; }; }; -_resistance = _target getvariable [QGVAR(peripheralResistance), 100]; +_resistance = _target getVariable [QGVAR(peripheralResistance), 100]; _resistance = _resistance + _viscosityChange; -_target setvariable [QGVAR(peripheralResistance), _resistance max 0]; +_target setVariable [QGVAR(peripheralResistance), _resistance max 0]; // Call back to ensure that the medication is decreased over time [_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage); diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index 7e85900a59..da01b9ba68 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -18,7 +18,7 @@ params ["_target", "_selectionName"]; -_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); @@ -33,8 +33,8 @@ if ((_damageBodyParts select _part) > 0) then { _damageOnPart = _damageOnPart - BANDAGEHEAL; }; _damageBodyParts set [_part, _damageOnPart max 0]; - _target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; - TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); + _target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; + TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus)); }; EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); diff --git a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf index d387e91f89..f15dbd0c71 100644 --- a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf @@ -19,6 +19,6 @@ params ["_caller", "_target","_className"]; [_target, false] call FUNC(setUnconscious); -if (_target getvariable [QGVAR(inReviveState), false]) then { - _target setvariable [QGVAR(inReviveState), nil, true]; +if (_target getVariable [QGVAR(inReviveState), false]) then { + _target setVariable [QGVAR(inReviveState), nil, true]; }; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index bd0f9b623a..ef8a83af65 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -18,7 +18,7 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; params ["_target", "_treatmentClassname"]; -_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; +_bloodVolume = _target getVariable [QGVAR(bloodVolume), 100]; if (_bloodVolume >= 100) exitWith {}; // Find the proper attributes for the used IV @@ -35,7 +35,7 @@ if (isClass (_config >> _treatmentClassname)) then { }; _varName = format["ACE_Medical_IVVolume_%1",_typeOf]; -_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded, true]; +_target setVariable [_varName, (_target getVariable [_varName, 0]) + _volumeAdded, true]; if !(_varName in GVAR(IVBags)) then { GVAR(IVBags) pushBack _varName; diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index 45d5f58630..8f45ada7c3 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -32,7 +32,7 @@ if (_part == 0 || _part == 1) exitWith { false; }; -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; if ((_tourniquets select _part) > 0) exitWith { _output = "There is already a tourniquet on this body part!"; // TODO localization ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index ae25b8c748..be9b03c9f1 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -21,10 +21,10 @@ params ["_target", "_tourniquetItem", "_selectionName"]; _part = [_selectionName] call FUNC(selectionNameToNumber); // Place a tourniquet on the bodypart -_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; +_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; _applyingTo = (_tourniquets select _part) + 1 + round(random(100)); _tourniquets set[_part, _applyingTo]; -_target setvariable [QGVAR(tourniquets), _tourniquets, true]; +_target setVariable [QGVAR(tourniquets), _tourniquets, true]; [{ params ["_args", "_idPFH"]; @@ -34,13 +34,13 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; - _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; + _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; if !((_tourniquets select _part) == _applyingTo) exitWith { // Tourniquet has been removed [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (ACE_time - _time > 120) then { - _target setvariable [QGVAR(pain), (_target getvariable [QGVAR(pain), 0]) + 0.005]; + _target setVariable [QGVAR(pain), (_target getVariable [QGVAR(pain), 0]) + 0.005]; }; }, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index b0c0c5c5ad..4029721566 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; //Don't play another medic animation (when player is rapidily treating) TRACE_2("Reseting to old animation", animationState player, _lastAnim); switch (toLower _lastAnim) do { @@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then { [_caller, _lastAnim, 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; +_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; @@ -67,7 +67,7 @@ _callback = getText (_config >> "callbackFailure"); _callback = if (isNil _callback) then { compile _callback } else { - missionNamespace getvariable _callback + missionNamespace getVariable _callback }; _args call _callback; diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index c2347c59ee..edd4f23f1d 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; //Don't play another medic animation (when player is rapidily treating) TRACE_2("Reseting to old animation", animationState player, _lastAnim); switch (toLower _lastAnim) do { @@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then { [_caller, _lastAnim, 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; +_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; @@ -62,7 +62,7 @@ _callback = getText (_config >> "callbackSuccess"); if (isNil _callback) then { _callback = compile _callback; } else { - _callback = missionNamespace getvariable _callback; + _callback = missionNamespace getVariable _callback; }; //Get current damage before treatment (for litter) @@ -81,7 +81,7 @@ _args pushBack _previousDamage; _args call FUNC(createLitter); //If we're not already tracking vitals, start: -if (!(_target getvariable [QGVAR(addedToUnitLoop),false])) then { +if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then { [_target] call FUNC(addToInjuredCollection); }; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 698e327d0e..2922cae465 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -47,8 +47,8 @@ if (!alive _unit) exitWith { }; // In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation -if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith { - TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit); +if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith { + TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit); // TODO, handle this with carry instead, so we can remove the PFH here. // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then { @@ -129,9 +129,9 @@ if (_parachuteCheck) then { }; if (!local _unit) exitWith { - TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); + TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments)); _args set [3, _minWaitingTime - (ACE_time - _startingTime)]; - _unit setvariable [QGVAR(unconsciousArguments), _args, true]; + _unit setVariable [QGVAR(unconsciousArguments), _args, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; @@ -139,6 +139,6 @@ if (!local _unit) exitWith { if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); if (!([_unit] call FUNC(getUnconsciousCondition))) then { - _unit setvariable ["ACE_isUnconscious", false, true]; + _unit setVariable ["ACE_isUnconscious", false, true]; }; }; diff --git a/addons/medical/ui/RscTitles.hpp b/addons/medical/ui/RscTitles.hpp index 06d1dda866..b81643990c 100644 --- a/addons/medical/ui/RscTitles.hpp +++ b/addons/medical/ui/RscTitles.hpp @@ -59,7 +59,7 @@ class Rsctitles { style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW font = "PuristaMedium"; colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(Injuries); }; class InjuryList: ACE_gui_listBoxBase { diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp index f8b0b21a71..74ce4a8e18 100644 --- a/addons/medical/ui/triagecard.hpp +++ b/addons/medical/ui/triagecard.hpp @@ -113,7 +113,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',0,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',0,true)];); }; class selectTriageStatusMinor: selectTriageStatus { idc = 2003; @@ -131,7 +131,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',1,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',1,true)];); }; class selectTriageStatusDelayed: selectTriageStatus { idc = 2004; @@ -149,7 +149,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',2,true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel',2,true)];); }; class selectTriageStatusImmediate: selectTriageStatus { idc = 2005; @@ -167,7 +167,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 3, true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel', 3, true)];); }; class selectTriageStatusDeceased: selectTriageStatus { idc = 2006; @@ -185,7 +185,7 @@ class GVAR(triageCard) { animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; - action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 4, true)];); + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setVariable [ARR_3('ACE_medical_triageLevel', 4, true)];); }; }; }; \ No newline at end of file diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index 9fb41eb97f..67e295e22e 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -65,7 +65,7 @@ if (_name isEqualTo "triage") exitWith { ctrlEnable [212, true]; private ["_log", "_triageCardTexts", "_message"]; - _log = GVAR(INTERACTION_TARGET) getvariable [QEGVAR(medical,triageCard), []]; + _log = GVAR(INTERACTION_TARGET) getVariable [QEGVAR(medical,triageCard), []]; _triageCardTexts = []; { _x params ["_item", "_amount", "_time"]; diff --git a/addons/medical_menu/functions/fnc_setTriageStatus.sqf b/addons/medical_menu/functions/fnc_setTriageStatus.sqf index 7e7c764aee..8a85eeb950 100644 --- a/addons/medical_menu/functions/fnc_setTriageStatus.sqf +++ b/addons/medical_menu/functions/fnc_setTriageStatus.sqf @@ -15,4 +15,4 @@ params ["_target", "_status"]; -_target setvariable [QEGVAR(medical,triageLevel), _status, true]; +_target setVariable [QEGVAR(medical,triageLevel), _status, true]; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 8c2090fc73..412a2045e6 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -128,7 +128,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab ] select _forEachIndex); _allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]]; }; - } forEach (_target getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]); + } forEach (_target getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]); }; [_selectionBloodLoss, _damaged, _display] call FUNC(updateBodyImage); diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp index 29247b6071..5968a643ff 100644 --- a/addons/medical_menu/ui/menu.hpp +++ b/addons/medical_menu/ui/menu.hpp @@ -19,8 +19,8 @@ class GVAR(medicalMenu) { y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; h = "16 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; - colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; - colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; }; class BottomBackground: CenterBackground { y = "(18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; @@ -40,7 +40,7 @@ class GVAR(medicalMenu) { font = "PuristaMedium"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = ""; }; diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp index 2eeb99563c..28c664b6d8 100644 --- a/addons/microdagr/gui.hpp +++ b/addons/microdagr/gui.hpp @@ -59,10 +59,10 @@ class GVAR(TheDialog) { //Redfine Scaling for the RscTitle -#define PROFILE_X (profilenamespace getvariable ['IGUI_GRID_GPS_X', 0]) -#define PROFILE_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y', 0]) -#define PROFILE_W (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1]) -#define PROFILE_H ((16/9) * (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1])) +#define PROFILE_X (profilenamespace getVariable ['IGUI_GRID_GPS_X', 0]) +#define PROFILE_Y (profilenamespace getVariable ['IGUI_GRID_GPS_Y', 0]) +#define PROFILE_W (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1]) +#define PROFILE_H ((16/9) * (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1])) #define X_PART(num) QUOTE((num) / 25 * PROFILE_W + PROFILE_X) #define Y_PART(num) QUOTE((num) / 25 * PROFILE_H + PROFILE_Y) diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp index 740334886c..a114896044 100644 --- a/addons/mk6mortar/RscInGameUI.hpp +++ b/addons/mk6mortar/RscInGameUI.hpp @@ -9,8 +9,8 @@ class RscInGameUI { idc = 80085; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0.1}; - x = "(profilenamespace getvariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; + x = "(profilenamespace getVariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; }; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index bbc27b7eef..0b8cc67842 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -12,7 +12,7 @@ private _logicType = typeOf _logic; _logic hideobject true; - if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; + if (_logic getVariable [QGVAR(initalized), false]) exitWith {}; private _config = (configFile >> "CfgVehicles" >> _logicType); if !(isClass _config) exitWith {}; @@ -24,7 +24,7 @@ if (isNil _function) then { _function = compile _function; } else { - _function = missionNamespace getvariable _function; + _function = missionNamespace getVariable _function; }; if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); @@ -36,7 +36,7 @@ }; if !(_isPersistent) then { - _logic setvariable [QGVAR(initalized), true]; + _logic setVariable [QGVAR(initalized), true]; }; if (_isDisposable) then { diff --git a/addons/nametags/RscTitles.hpp b/addons/nametags/RscTitles.hpp index 7f0ddc2135..f0d5678603 100644 --- a/addons/nametags/RscTitles.hpp +++ b/addons/nametags/RscTitles.hpp @@ -27,10 +27,10 @@ class RscTitles { size = 0.018; colorBackground[] = { 0, 0, 0, 0 }; colortext[] = { - "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" + "(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])", + "(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])" }; text = ""; class Attributes { diff --git a/addons/optionsmenu/functions/fnc_exportSettings.sqf b/addons/optionsmenu/functions/fnc_exportSettings.sqf index 172a95808e..32e52c41df 100644 --- a/addons/optionsmenu/functions/fnc_exportSettings.sqf +++ b/addons/optionsmenu/functions/fnc_exportSettings.sqf @@ -39,7 +39,7 @@ private ["_compiledConfig", "_name", "_typeName", "_isClientSetable", "_localize _defaultValue = _x select 6; if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then { - _value = missionNamespace getvariable [_name, _defaultValue]; + _value = missionNamespace getVariable [_name, _defaultValue]; _formatedValue = switch (toLower _typeName) do { case ("scalar"): { format['value = %1;', _value]; diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf index 5cc16312f9..5b302a510d 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -18,7 +18,7 @@ _logic = _this select 0; if (isMultiplayer) exitWith {}; -if (_logic getvariable ["allowconfigurationExport", false]) then { +if (_logic getVariable ["allowconfigurationExport", false]) then { GVAR(serverConfigGeneration) = 1; } else { GVAR(serverConfigGeneration) = 0; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 4283f43218..8e09608e07 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -57,7 +57,7 @@ GVAR(serverSideValues) = []; [{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); disableSerialization; -_menu = uiNamespace getvariable "ACE_serverSettingsMenu"; +_menu = uiNamespace getVariable "ACE_serverSettingsMenu"; (_menu displayCtrl 1003) ctrlEnable false; if (GVAR(ClientSettingsExportIncluded)) then { diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf index c71a26a6e7..104d8195cf 100644 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf @@ -44,7 +44,7 @@ GVAR(clientSideColors) = []; [{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); disableSerialization; -_menu = uiNamespace getvariable "ACE_settingsMenu"; +_menu = uiNamespace getVariable "ACE_settingsMenu"; (_menu displayCtrl 1002) ctrlEnable false; (_menu displayCtrl 1003) ctrlEnable false; diff --git a/addons/optionsmenu/functions/fnc_updateSetting.sqf b/addons/optionsmenu/functions/fnc_updateSetting.sqf index 370aa1f766..7374d1f2c1 100644 --- a/addons/optionsmenu/functions/fnc_updateSetting.sqf +++ b/addons/optionsmenu/functions/fnc_updateSetting.sqf @@ -85,7 +85,7 @@ switch (_type) do { if (_changed) then { if (GVAR(serverConfigGeneration) > 0) then { if !(isMultiplayer) then { - missionNamespace setvariable [_name, _newValue]; + missionNamespace setVariable [_name, _newValue]; }; } else { profileNamespace setVariable [_name, _newValue]; diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index 513692eaab..3333c5476f 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -166,8 +166,8 @@ class RscDisplayMain: RscStandardDisplay { fontBold = "PuristaLight"; }; colorBold[] = {0.6,0.6,0.6,1}; - colorLink[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorLinkActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + colorLink[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; + colorLinkActive[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; }; }; }; diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp index cd65eb966d..37950b1c42 100644 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ b/addons/optionsmenu/gui/settingsMenu.hpp @@ -33,15 +33,15 @@ class ACE_settingsMenu { font = "PuristaMedium"; SizeEx = H_PART(1); colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = ""; }; class CenterBackground: HeaderBackground { y = Y_PART(2.1); h = H_PART(2.5); text = ""; - colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; - colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; }; class LeftBackground: CenterBackground { y = Y_PART(4.8); diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index d7f40c4d91..6680b759c4 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -161,7 +161,7 @@ if (stance _unit == "PRONE") then { }; }; -if ("Jam" in (missionNamespace getvariable ["ACE_Debug", []])) then { +if ("Jam" in (missionNamespace getVariable ["ACE_Debug", []])) then { _jamChance = 0.5; }; diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf index e457e023c6..9ade177af0 100644 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf @@ -62,7 +62,7 @@ if (_distance < _backblastRange) then { [_damage * 100] call BIS_fnc_bloodEffect; if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then { - [_firer, "body", ((_firer getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); + [_firer, "body", ((_firer getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); } else { _firer setDamage (damage _firer + _damage); }; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index f9c58050e0..efba4ed73e 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -56,7 +56,7 @@ TRACE_4("Parameters:",_overpressureAngle,_overpressureRange,_overpressureDamage, if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect}; if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_x] call EFUNC(medical,hasMedicalEnabled))}) then { - [_x, "body", ((_x getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); + [_x, "body", ((_x getVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage); } else { _x setDamage (damage _x + _damage); }; diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf index 8301007fa3..dfe22b4bc0 100644 --- a/addons/parachute/functions/fnc_checkCutParachute.sqf +++ b/addons/parachute/functions/fnc_checkCutParachute.sqf @@ -16,4 +16,4 @@ #include "script_component.hpp" private["_unit"]; _unit = _this select 0; -(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getvariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) \ No newline at end of file +(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) \ No newline at end of file diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index baa93bbae0..42ad18b304 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -18,7 +18,7 @@ private ["_unit","_backpack"]; _unit = _this select 0; _backpack = (_this select 1) select 6; -if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then { +if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) then { _unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); } else { if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then { diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index cf2d4276cf..db942f8c2e 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -131,7 +131,7 @@ if (isNil _callbackProgress) then { // Player Animation _callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE"); -_caller setvariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; +_caller setVariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { @@ -149,9 +149,9 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { }; if (stance _caller == "STAND") then { - _caller setvariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; + _caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; } else { - _caller setvariable [QGVAR(repairPrevAnimCaller), animationState _caller]; + _caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller]; }; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 6e27ab07a7..780e9f273e 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -33,7 +33,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (vehicle _caller == _caller) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; +_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index ccad93663f..da4b607048 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -31,7 +31,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (vehicle _caller == _caller) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; -_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; +_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index a3ad215ea2..392cd9a43d 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -184,9 +184,9 @@ class GVAR(interface) { colorBorder[] = {0,0,0,0}; colorBackground[] = {COL_BACK}; colorSelect[] = { - "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", - "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", - "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", + "profilenamespace getVariable ['GUI_BCG_RGB_R',0.77]", + "profilenamespace getVariable ['GUI_BCG_RGB_G',0.51]", + "profilenamespace getVariable ['GUI_BCG_RGB_B',0.08]", 1 }; multiselectEnabled = 0; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index c79310217c..897f51532d 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -17,7 +17,7 @@ if (!isServer) exitWith {}; params ["_object"]; -if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; +if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; { _x addCuratorEditableObjects [[_object], true]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index aa7b91b753..55da13212a 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -30,7 +30,7 @@ if (_activated) then { }; //--- Get curator owner - _ownerVar = _logic getvariable ["owner",""]; + _ownerVar = _logic getVariable ["owner",""]; _ownerUID = parsenumber _ownerVar; if (cheatsenabled) then { _ownerVarArray = toarray _ownerVar; @@ -47,7 +47,7 @@ if (_activated) then { _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted"; //--- Wipe out the variable so clients can't access it - _logic setvariable ["owner",nil]; + _logic setVariable ["owner",nil]; //--- Server if (isserver) then { @@ -58,11 +58,11 @@ if (_activated) then { _letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; _adminVar = "admin_"; for "_i" from 0 to 9 do {_adminVar = _adminVar + (_letters call bis_fnc_selectrandom);}; - _logic setvariable ["adminVar",_adminVar,true]; + _logic setVariable ["adminVar",_adminVar,true]; }; //--- Get allowed addons - _addonsType = _logic getvariable ["Addons",0]; + _addonsType = _logic getVariable ["Addons",0]; _addons = []; switch _addonsType do { @@ -108,8 +108,8 @@ if (_activated) then { if (_adminVar != "") then {_ownerVar = _adminVar;}; - _forced = _logic getvariable ["forced",0] > 0; - _name = _logic getvariable ["name",""]; + _forced = _logic getVariable ["forced",0] > 0; + _name = _logic getVariable ["name",""]; if (_name == "") then {_name = localize "STR_A3_curator";}; //--- Wait until mission starts @@ -130,7 +130,7 @@ if (_activated) then { }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; + waituntil {isplayer (missionnamespace getVariable [_ownerVar,objnull]) || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -144,7 +144,7 @@ if (_activated) then { } forEach playableunits; }; default { - _player = missionnamespace getvariable [_ownerVar,objnull]; + _player = missionnamespace getVariable [_ownerVar,objnull]; }; }; @@ -155,7 +155,7 @@ if (_activated) then { //--- Add radio channels { _x radiochanneladd [_player]; - } forEach (_logic getvariable ["channels",[]]); + } forEach (_logic getVariable ["channels",[]]); // Added by ace_zeus to delay ascension message at mission start [{ @@ -163,7 +163,7 @@ if (_activated) then { _player = _this select 1; //--- Sent notification to all assigned players - if ((_logic getvariable ["showNotification",true]) && GVAR(zeusAscension)) then { + if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then { { if (isplayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; @@ -191,7 +191,7 @@ if (_activated) then { }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; + waituntil {_player != missionnamespace getVariable [_ownerVar,objnull] || isnull _logic}; }; }; if (isnull _logic) exitWith {}; @@ -199,7 +199,7 @@ if (_activated) then { //--- Add radio channels { _x radiochannelremove [_player]; - } forEach (_logic getvariable ["channels",[]]); + } forEach (_logic getVariable ["channels",[]]); //--- Unassign waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; @@ -211,7 +211,7 @@ if (_activated) then { _addons = []; { if (typeOf _x == "ModuleCuratorAddAddons_F") then { - _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); + _paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]"); { if !(_x in _addons) then {_addons set [count _addons,_x];}; { @@ -228,10 +228,10 @@ if (_activated) then { if (GVAR(zeusBird)) then { //--- Create bird - _birdType = _logic getvariable ["birdType","eagle_f"]; + _birdType = _logic getVariable ["birdType","eagle_f"]; if (_birdType != "") then { _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; - _logic setvariable ["bird",_bird,true]; + _logic setVariable ["bird",_bird,true]; }; //--- Locality changed @@ -239,7 +239,7 @@ if (_activated) then { "local", { _logic = _this select 0; - _bird = _logic getvariable ["bird",objnull]; + _bird = _logic getVariable ["bird",objnull]; _bird setowner owner _logic; } ]; @@ -253,7 +253,7 @@ if (_activated) then { _serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"}; //--- Black effect until the interface is open - _forced = _logic getvariable ["forced",0] > 0; + _forced = _logic getVariable ["forced",0] > 0; if (_forced) then { _isCurator = switch true do { case (_ownerUID > 0): { @@ -263,7 +263,7 @@ if (_activated) then { isserver || servercommandavailable _serverCommand }; default { - player == missionnamespace getvariable [_ownerVar,objnull] + player == missionnamespace getVariable [_ownerVar,objnull] }; }; if (_isCurator) then { @@ -274,11 +274,11 @@ if (_activated) then { //--- Check if player is server admin if (_isAdmin) then { - _adminVar = _logic getvariable ["adminVar",""]; - _logic setvariable ["adminVar",nil]; + _adminVar = _logic getVariable ["adminVar",""]; + _logic setVariable ["adminVar",nil]; if (isserver) then { //--- Host - missionnamespace setvariable [_adminVar,player]; + missionnamespace setVariable [_adminVar,player]; } else { //--- Client [_logic,_adminVar,_serverCommand] spawn { @@ -289,12 +289,12 @@ if (_activated) then { _serverCommand = _this select 2; while {true} do { waituntil {sleep 0.1; servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,player]; + missionnamespace setVariable [_adminVar,player]; publicvariable _adminVar; _respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; waituntil {sleep 0.1; !servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,objnull]; + missionnamespace setVariable [_adminVar,objnull]; publicvariable _adminVar; player removeeventhandler ["respawn",_respawn]; }; @@ -319,7 +319,7 @@ if (_activated) then { //--- Show hint about pinging for players if ( - isNil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} + isNil {profilenamespace getVariable "bis_fnc_curatorPinged_done"} && {isTutHintsEnabled} && diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 5154844eb7..dd139a3c5c 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -39,12 +39,12 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; + _ammo = _logic getVariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; if (_ammo != "") then { _CfgAmmo = configFile >> "CfgAmmo" >> _ammo; //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeOf _logic; - _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction + _logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; @@ -104,9 +104,9 @@ if (_activated) then { _side = side group _x; if (_side in [east,west,resistance,civilian]) then { //--- Play radio (only if it wasn't played recently) - if (ACE_time > _x getvariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { + if (ACE_time > _x getVariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { [[_side,_radio,"side"],"bis_fnc_sayMessage",_x] call bis_fnc_mp; - _x setvariable ["BIS_fnc_moduleProjectile_radio",ACE_time + _delay]; + _x setVariable ["BIS_fnc_moduleProjectile_radio",ACE_time + _delay]; }; }; }; @@ -117,8 +117,8 @@ if (_activated) then { [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber; - _radio = _logic getvariable ["radio",_radio]; + _altitude = (_logic getVariable ["altitude",_altitude]) call bis_fnc_parsenumber; + _radio = _logic getVariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; @@ -164,7 +164,7 @@ if (_activated) then { _projectile setposasl _posNew; _pos = getposatl _logic; _dir = direction _logic; - missionnamespace setvariable [_dirVar,_dir]; + missionnamespace setVariable [_dirVar,_dir]; }; sleep 0.1; isnull _projectile || isnull _logic @@ -183,7 +183,7 @@ if (_activated) then { } else { //--- Repeat to achieve permanent effect - _repeat = _logic getvariable ["repeat",0] > 0; + _repeat = _logic getVariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6077e447df..d4032e1b42 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -23,11 +23,11 @@ _activated = _this select 2; if (_activated && local _logic && !isnull curatorcamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; + if !(isnull (missionnamespace getVariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; //--- Get unit under cursor _unit = objnull; - _mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; + _mouseOver = missionnamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; _unit = effectivecommander _unit; @@ -37,7 +37,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if !(isnull (_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { @@ -47,7 +47,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { _vehicleRole = str assignedvehiclerole _unit; bis_fnc_moduleRemoteControl_unit = _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",player,true]; // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { @@ -125,12 +125,12 @@ if (_activated && local _logic && !isnull curatorcamera) then { || {isnull getassignedcuratorlogic player} //|| - //{_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] != player} //--- Another curator stole the unit + //{_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] != player} //--- Another curator stole the unit }; player addrating (-rating player + _rating); objnull remotecontrol _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; //--- Death screen if ( @@ -142,7 +142,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { && {!isnull getassignedcuratorlogic player} //&& - //{(_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} + //{(_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} ) then { sleep 2; ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1]; @@ -152,7 +152,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { _camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos; _camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10]; //[_camPos,_unit] call bis_fnc_setcuratorcamera; - (getassignedcuratorlogic player) setvariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; + (getassignedcuratorlogic player) setVariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index 661e33f907..d4acda3f54 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -41,7 +41,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { - _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + _unit setVariable [QEGVAR(medical,medicClass), 1, true]; }; }; }; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 22826108e7..1e710bf41b 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -40,7 +40,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then { - _unit setvariable [QEGVAR(medical,isMedicalFacility), true, true]; + _unit setVariable [QEGVAR(medical,isMedicalFacility), true, true]; }; }; }; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index 9e5e788461..4ffec3460e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -41,7 +41,7 @@ if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { - _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + _unit setVariable [QEGVAR(medical,medicClass), 1, true]; }; }; };