fix setVariable and getVariable capitalization

This commit is contained in:
commy2 2015-11-30 17:27:09 +01:00
parent d037f00a92
commit a9ebcf8543
119 changed files with 444 additions and 444 deletions

View File

@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) {
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {1,1,1,0.5}; 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)"; texture = "#(argb,8,8,3)color(1,1,1,0.7)";
}; };
class TitleText: TitleBackground { class TitleText: TitleBackground {

View File

@ -115,18 +115,18 @@ class RscDisplayInventory {
// map // map
class RscDisplayMainMap { 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 { 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 { 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 { 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););
}; };

View File

@ -88,7 +88,7 @@ class CfgUIGrids {
// check dll // check dll
class RscStandardDisplay; class RscStandardDisplay;
class RscDisplayMain: 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));
}; };
*/ */

View File

@ -116,9 +116,9 @@ class ACE_gui_editBase
}; };
colorSelection[] = colorSelection[] =
{ {
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])",
1 1
}; };
autocomplete = ""; autocomplete = "";
@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{
colorSelect2[] = {0.95, 0.95, 0.95, 1}; colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 1}; colorSelectBackground[] = {0, 0, 0, 1};
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0}; 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; period = 1.2;
rowHeight = 0.03; rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 1}; colorBackground[] = {0, 0, 0, 1};
@ -505,7 +505,7 @@ onMouseButtonDblClick = "";
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_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}; colorCreated[] = {1,1,1,1};
colorCanceled[] = {0.7,0.7,0.7,1}; colorCanceled[] = {0.7,0.7,0.7,1};
colorDone[] = {0.7,1,0.3,1}; colorDone[] = {0.7,1,0.3,1};

View File

@ -18,6 +18,6 @@ _dlg = ctrlParent _this;
_dlg displayAddEventHandler ["unload", { _dlg displayAddEventHandler ["unload", {
if (_this select 1 == 1) then { 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);
}; };
}]; }];

View File

@ -14,5 +14,5 @@
params ["_entity"]; params ["_entity"];
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]); GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]);
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]); GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]);

View File

@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
/* /*
// This does not function at the moment. Has been disabled until it fixed. // 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))]; _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]; _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))]; _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))]; _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)); _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));

View File

@ -27,7 +27,7 @@ private ["_return", "_val"];
_return = []; _return = [];
{ {
_val = _object getvariable (_x select 0); _val = _object getVariable (_x select 0);
if (!isNil "_val") then { if (!isNil "_val") then {
if (_category == "" || _category == _x select 3) then { if (_category == "" || _category == _x select 3) then {

View File

@ -16,7 +16,7 @@
params ["_unit", "_variable", "_defaultValue"]; params ["_unit", "_variable", "_defaultValue"];
private "_value"; private "_value";
_value = _unit getvariable _variable; _value = _unit getVariable _variable;
if (isNil "_value") then { if (isNil "_value") then {
if (!isNil "_defaultValue") then { if (!isNil "_defaultValue") then {

View File

@ -14,4 +14,4 @@
params ["_unit"]; 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

View File

@ -16,7 +16,7 @@ params ["_unit", "_id", "_accepted"];
private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"]; private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"];
_info = _unit getvariable _id; _info = _unit getVariable _id;
if (!isNil "_info") then { if (!isNil "_info") then {
_caller = _info select 0; _caller = _info select 0;
@ -26,7 +26,7 @@ if (!isNil "_info") then {
_callBack = _info select 4; _callBack = _info select 4;
_replyParams = [_info, _accepted]; _replyParams = [_info, _accepted];
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc); [_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
_unit setvariable [_id, nil]; _unit setVariable [_id, nil];
}; };
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil; GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;

View File

@ -17,7 +17,7 @@
#include "script_component.hpp" #include "script_component.hpp"
//paramsArray is a normal variable not a command //paramsArray is a normal variable not a command
private _paramsArray = missionnamespace getvariable ["paramsArray", []]; private _paramsArray = missionnamespace getVariable ["paramsArray", []];
TRACE_1("Reading missionConfigFile params",_paramsArray); TRACE_1("Reading missionConfigFile params",_paramsArray);

View File

@ -14,8 +14,8 @@
params ["_unit"]; params ["_unit"];
_unit setvariable ["ACE_isDead", nil, true]; _unit setVariable ["ACE_isDead", nil, true];
_unit setvariable ["ACE_isUnconscious", nil, true]; _unit setVariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then { if (isPlayer _unit) then {
[true] call FUNC(setVolume); [true] call FUNC(setVolume);
@ -36,7 +36,7 @@ if (isPlayer _unit) then {
{ {
if !(_x select 4) 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 false
} count ([_unit] call FUNC(getAllDefinedSetVariables)); } count ([_unit] call FUNC(getAllDefinedSetVariables));

View File

@ -18,7 +18,7 @@
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]]; params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
private "_previousGroupsList"; private "_previousGroupsList";
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []]; _previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];
if (_switch) then { if (_switch) then {
// go forward // go forward

View File

@ -95,9 +95,9 @@ _unit action ["Eject", vehicle _unit];
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide); [_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); _loaded deleteAt (_loaded find _unit);
_vehicle setvariable [QGVAR(loaded_persons), _loaded, true]; _vehicle setVariable [QGVAR(loaded_persons), _loaded, true];
true true

View File

@ -33,13 +33,13 @@ class GVAR(remoteInventory) {
fadeout = 0; fadeout = 0;
class Colors { 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}; 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}; 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}; 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}; 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}; 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}; 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}; 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 {}; class controlsBackground {};

View File

@ -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) // 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}; 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})}

View File

@ -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) // 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}; 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})};

View File

@ -22,7 +22,7 @@ params ["_unit", "_target"];
private "_inBuilding"; private "_inBuilding";
_inBuilding = [_unit] call FUNC(isObjectOnObject); _inBuilding = [_unit] call FUNC(isObjectOnObject);
if !(_unit getvariable ["ACE_isUnconscious", false]) then { if !(_unit getVariable ["ACE_isUnconscious", false]) then {
// play release animation // play release animation
_unit playAction "released"; _unit playAction "released";
}; };
@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then {
["fixFloating", _target, _target] call EFUNC(common,targetEvent); ["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); [_unit, "unconscious", 2, true] call EFUNC(common,doAnimation);
}; };

View File

@ -31,7 +31,7 @@ detach _target;
// fix anim when aborting carrying persons // fix anim when aborting carrying persons
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then { 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); [_unit, "", 2, true] call EFUNC(common,doAnimation);
}; };

View File

@ -19,9 +19,9 @@ class Rsc_ACE_CallScreen_Edit:RscEdit {
colorText[] = {0,0,0,1}; colorText[] = {0,0,0,1};
colorDisabled[] = {1,1,1,0.25}; colorDisabled[] = {1,1,1,0.25};
colorSelection[] = { colorSelection[] = {
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", "(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",
1 1
}; };
text = ""; text = "";

View File

@ -26,7 +26,7 @@ GVAR(time4) = 0;
["playerChanged", { ["playerChanged", {
GVAR(deafnessDV) = 0; GVAR(deafnessDV) = 0;
GVAR(deafnessPrior) = 0; GVAR(deafnessPrior) = 0;
ACE_player setvariable [QGVAR(deaf), false]; ACE_player setVariable [QGVAR(deaf), false];
GVAR(beep) = false; GVAR(beep) = false;
GVAR(beep2) = false; GVAR(beep2) = false;

View File

@ -42,7 +42,7 @@ if (!_justUpdateVolume) then {
GVAR(deafnessPrior) = GVAR(deafnessDV); GVAR(deafnessPrior) = GVAR(deafnessDV);
if (GVAR(deafnessDV) > 19.75) then { 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 { if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then {
playSound "ACE_Combat_Deafness"; playSound "ACE_Combat_Deafness";
GVAR(beep2) = true; GVAR(beep2) = true;
@ -50,7 +50,7 @@ if (!_justUpdateVolume) then {
GVAR(time4) = ACE_time + 30; GVAR(time4) = ACE_time + 30;
}; };
} else { } else {
ACE_player setvariable [QGVAR(deaf), false]; ACE_player setVariable [QGVAR(deaf), false];
}; };
if (GVAR(deafnessDV) > 10) then { if (GVAR(deafnessDV) > 10) then {

View File

@ -497,7 +497,7 @@ class CfgVehicles {
class GVAR(loadPatient) { class GVAR(loadPatient) {
displayName = CSTRING(LoadPatient); displayName = CSTRING(LoadPatient);
distance = 5; 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)); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -507,7 +507,7 @@ class CfgVehicles {
class GVAR(UnLoadPatient) { class GVAR(UnLoadPatient) {
displayName = CSTRING(UnloadPatient); displayName = CSTRING(UnloadPatient);
distance = 5; 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)); statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;

View File

@ -175,11 +175,11 @@ GVAR(lastHeartBeatSound) = ACE_time;
// Pain effect, no pain effect in zeus camera // Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then { 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)]); _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then { if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false; 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; _strength = _strength * 0.15;
GVAR(effectPainCA) ppEffectEnable true; GVAR(effectPainCA) ppEffectEnable true;
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
@ -201,7 +201,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
}; };
} else { } else {
GVAR(effectPainCA) ppEffectEnable false; 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; _strength = _strength * 0.9;
GVAR(effectPainCC) ppEffectEnable true; 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]]; 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", { ["SettingsInitialized", {
if (GVAR(level) == 2) exitWith { if (GVAR(level) == 2) exitWith {
[ [
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)}, {(((_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(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getvariable [QGVAR(inReviveState), false])}, {((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])}, {((_this select 0) getVariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getvariable ["ACE_isDead", false])}, {((_this select 0) getVariable ["ACE_isDead", false])},
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)} {(((_this select 0) getVariable [QGVAR(airwayStatus), 100]) < 80)}
] call FUNC(addUnconsciousCondition); ] call FUNC(addUnconsciousCondition);
}; };
[ [
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)}, {(((_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(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.6},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.1)}, {(([_this select 0] call FUNC(getBloodLoss)) > 0.1)},
{((_this select 0) getvariable [QGVAR(inReviveState), false])}, {((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getvariable ["ACE_isDead", false])} {((_this select 0) getVariable ["ACE_isDead", false])}
] call FUNC(addUnconsciousCondition); ] call FUNC(addUnconsciousCondition);
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);

View File

@ -17,7 +17,7 @@
private ["_heartRateOutput", "_heartRate", "_logOutPut"]; private ["_heartRateOutput", "_heartRate", "_logOutPut"];
params ["_caller", "_unit", "_selectionName"]; params ["_caller", "_unit", "_selectionName"];
_heartRate = _unit getvariable [QGVAR(heartRate), 80]; _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (!alive _unit) then { if (!alive _unit) then {
_heartRate = 0; _heartRate = 0;
}; };

View File

@ -25,8 +25,8 @@ if (alive _target) then {
} else { } else {
_genericMessages pushBack LSTRING(diagnoseDead); _genericMessages pushBack LSTRING(diagnoseDead);
}; };
if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then { if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then { if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushBack LSTRING(lostBloodALot); _genericMessages pushBack LSTRING(lostBloodALot);
} else { } else {
_genericMessages pushBack LSTRING(lostBlood); _genericMessages pushBack LSTRING(lostBlood);
@ -36,7 +36,7 @@ if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then {
}; };
if (alive _target) then { if (alive _target) then {
if (_target getvariable[QGVAR(hasPain), false]) then { if (_target getVariable[QGVAR(hasPain), false]) then {
_genericMessages pushBack LSTRING(inPain); _genericMessages pushBack LSTRING(inPain);
} else { } else {
_genericMessages pushBack LSTRING(noPain); _genericMessages pushBack LSTRING(noPain);

View File

@ -20,7 +20,7 @@ params ["_caller", "_target", "_selectionName"];
// grab the required data // grab the required data
_part = [_selectionName] call FUNC(selectionNameToNumber); _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 // Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitWith { if ((_tourniquets select _part) == 0) exitWith {
@ -30,7 +30,7 @@ if ((_tourniquets select _part) == 0) exitWith {
// Removing the tourniquet // Removing the tourniquet
_tourniquets set[_part, 0]; _tourniquets set[_part, 0];
_target setvariable [QGVAR(tourniquets), _tourniquets, true]; _target setVariable [QGVAR(tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller // Adding the tourniquet item to the caller
_caller addItem "ACE_tourniquet"; _caller addItem "ACE_tourniquet";

View File

@ -19,7 +19,7 @@
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]]; 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]; _adjustment pushBack [_value, _time, _callBack];
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; _unit setVariable [QGVAR(heartRateAdjustments), _adjustment ];
["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); ["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);

View File

@ -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 */ [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
}; };
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
_unit setvariable [QGVAR(addedToUnitLoop), true, true]; _unit setVariable [QGVAR(addedToUnitLoop), true, true];
[{ [{
params ["_args", "_idPFH"]; params ["_args", "_idPFH"];
@ -34,17 +34,17 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
if (!local _unit) then { if (!local _unit) then {
if (GVAR(level) >= 2) then { if (GVAR(level) >= 2) then {
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], 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(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 { } else {
[_unit, _interval] call FUNC(handleUnitVitals); [_unit, _interval] call FUNC(handleUnitVitals);
private "_pain"; private "_pain";
_pain = _unit getvariable [QGVAR(pain), 0]; _pain = _unit getVariable [QGVAR(pain), 0];
if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then { if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then {
// This introduces wierd unconscious behaviour for basic medical and possibly also advanced. // This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
// TODO This is disabled as it's considered non critical code. // 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. // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.

View File

@ -29,7 +29,7 @@ _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
_logVarName = format[QGVAR(logFile_%1), _type]; _logVarName = format[QGVAR(logFile_%1), _type];
_log = _unit getvariable [_logVarName, []]; _log = _unit getVariable [_logVarName, []];
if (count _log >= 8) then { if (count _log >= 8) then {
_newLog = []; _newLog = [];
{ {
@ -42,11 +42,11 @@ if (count _log >= 8) then {
}; };
_log pushBack [_message, _moment, _type, _arguments]; _log pushBack [_message, _moment, _type, _arguments];
_unit setvariable [_logVarName, _log, true]; _unit setVariable [_logVarName, _log, true];
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); ["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 { if !(_logVarName in _logs) then {
_logs pushBack _logVarName; _logs pushBack _logVarName;
_unit setvariable [QGVAR(allLogs), _logs, true]; _unit setVariable [QGVAR(allLogs), _logs, true];
}; };

View File

@ -21,7 +21,7 @@ if (!local _unit) exitWith {
[_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [_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; _inList = false;
_amount = 1; _amount = 1;
{ {
@ -40,5 +40,5 @@ _amount = 1;
if (!_inList) then { if (!_inList) then {
_log pushBack [_newItem, 1, ACE_gameTime]; _log pushBack [_newItem, 1, ACE_gameTime];
}; };
_unit setvariable [QGVAR(triageCard), _log, true]; _unit setVariable [QGVAR(triageCard), _log, true];
["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); ["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent);

View File

@ -17,7 +17,7 @@
private ["_accessLevel", "_return"]; private ["_accessLevel", "_return"];
params ["_caller", "_target"]; params ["_caller", "_target"];
_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; _accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1];
_return = false; _return = false;

View File

@ -37,7 +37,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
} else { } else {
// Check for required class // Check for required class
if (isText (_config >> "requiredMedic")) exitWith { if (isText (_config >> "requiredMedic")) exitWith {
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]
}; };
0; 0;
}; };
@ -55,7 +55,7 @@ if (getText (_config >> "condition") != "") then {
if (isNil _condition) then { if (isNil _condition) then {
_condition = compile _condition; _condition = compile _condition;
} else { } else {
_condition = missionNamespace getvariable _condition; _condition = missionNamespace getVariable _condition;
}; };
if (typeName _condition == "BOOL") then { if (typeName _condition == "BOOL") then {
_return = _condition; _return = _condition;
@ -66,7 +66,7 @@ if (getText (_config >> "condition") != "") then {
if (!_return) exitWith { false }; if (!_return) exitWith { false };
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then { _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else { } else {
getNumber(_config >> "patientStateCondition") getNumber(_config >> "patientStateCondition")
}; };
@ -85,7 +85,7 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI
if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;};
if !(isNil _x) exitWith { if !(isNil _x) exitWith {
private "_val"; private "_val";
_val = missionNamespace getvariable _x; _val = missionNamespace getVariable _x;
if (typeName _val == "SCALAR") then { if (typeName _val == "SCALAR") then {
_return = switch (_val) do { _return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere case 0: {true}; //AdvancedMedicalSettings_anywhere

View File

@ -19,7 +19,7 @@ params ["_oldBody", "_caller"];
if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies
_name = _oldBody getvariable ["ACE_name", "unknown"]; _name = _oldBody getVariable ["ACE_name", "unknown"];
_class = typeOf _oldBody; _class = typeOf _oldBody;
_side = side _caller; _side = side _caller;
_group = createGroup _side; _group = createGroup _side;
@ -71,12 +71,12 @@ if (isMultiplayer) then {
hideObject _oldBody; hideObject _oldBody;
}; };
_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true]; _newUnit setVariable [QGVAR(copyOfUnit), _oldBody, true];
_oldBody setvariable [QGVAR(hasCopy), _newUnit, true]; _oldBody setVariable [QGVAR(hasCopy), _newUnit, true];
_newUnit setvariable ["ACE_isDead", true, true]; _newUnit setVariable ["ACE_isDead", true, true];
_newUnit setvariable ["ACE_isUnconscious", true, true]; _newUnit setVariable ["ACE_isUnconscious", true, true];
_newUnit setvariable [QGVAR(disableInteraction), true, true]; _newUnit setVariable [QGVAR(disableInteraction), true, true];
_oldBody setvariable [QGVAR(disableInteraction), true, true]; _oldBody setVariable [QGVAR(disableInteraction), true, true];
[_newUnit, 0.89] call FUNC(setStructuralDamage); [_newUnit, 0.89] call FUNC(setStructuralDamage);
_newUnit; _newUnit;

View File

@ -69,7 +69,7 @@ _createdLitter = [];
if (isNil _litterCondition) then { if (isNil _litterCondition) then {
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
} else { } else {
_litterCondition = missionNamespace getvariable _litterCondition; _litterCondition = missionNamespace getVariable _litterCondition;
if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}};
}; };
if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {}; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {};

View File

@ -32,13 +32,13 @@ if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true };
// Find the correct Damage threshold for unit. // Find the correct Damage threshold for unit.
_damageThreshold = [1,1,1]; _damageThreshold = [1,1,1];
if ([_unit] call EFUNC(common,IsPlayer)) then { 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 { } 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"]; _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 // Check if damage to body part is higher as damage head
if (_part == 0) exitWith { if (_part == 0) exitWith {

View File

@ -46,7 +46,7 @@ if (_show) then {
}; };
disableSerialization; disableSerialization;
_display = uiNamespace getvariable QGVAR(DisplayInformation); _display = uiNamespace getVariable QGVAR(DisplayInformation);
if (isNil "_display") exitWith { if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
@ -59,26 +59,26 @@ if (_show) then {
_genericMessages pushBack [localize _partText, [1, 1, 1, 1]]; _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]]; _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]]; _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]]; _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]]; _genericMessages pushBack [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
}; };
_totalIvVolume = 0; _totalIvVolume = 0;
{ {
private "_value"; private "_value";
_value = _target getvariable _x; _value = _target getVariable _x;
if !(isNil "_value") then { if !(isNil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]); _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
}; };
} forEach GVAR(IVBags); } forEach GVAR(IVBags);
if (_totalIvVolume >= 1) then { if (_totalIvVolume >= 1) then {
@ -88,7 +88,7 @@ if (_show) then {
_damaged = [false, false, false, false, false, false]; _damaged = [false, false, false, false, false, false];
_selectionBloodLoss = [0,0,0,0,0,0]; _selectionBloodLoss = [0,0,0,0,0,0];
if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then { if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then {
_openWounds = _target getvariable [QGVAR(openWounds), []]; _openWounds = _target getVariable [QGVAR(openWounds), []];
private "_amountOf"; private "_amountOf";
{ {
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"]; _x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
@ -110,7 +110,7 @@ if (_show) then {
}; };
} forEach _openWounds; } forEach _openWounds;
_bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []]; _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
{ {
_x params ["", "", "_selectionX", "_amountOf", "_x4"]; _x params ["", "", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding // Find how much this bodypart is bleeding
@ -200,7 +200,7 @@ if (_show) then {
lbClear _logCtrl; lbClear _logCtrl;
private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"]; private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"];
_logs = _target getvariable [QGVAR(logFile_Activity), []]; _logs = _target getVariable [QGVAR(logFile_Activity), []];
{ {
// [_message,_moment,_type, _arguments] // [_message,_moment,_type, _arguments]
_x params ["_message", "_moment", "_type", "_arguments"]; _x params ["_message", "_moment", "_type", "_arguments"];

View File

@ -32,7 +32,7 @@ if (_show) then {
}; };
disableSerialization; disableSerialization;
_display = uiNamespace getvariable QGVAR(triageCard); _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith { if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
@ -43,7 +43,7 @@ if (_show) then {
_lbCtrl = (_display displayCtrl 200); _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl; lbClear _lbCtrl;
_log = _target getvariable [QGVAR(triageCard), []]; _log = _target getVariable [QGVAR(triageCard), []];
{ {
_x params ["_item", "_amount"]; _x params ["_item", "_amount"];
_message = _item; _message = _item;

View File

@ -17,7 +17,7 @@ private ["_ctrl", "_display", "_idc", "_pos"];
params ["_show"]; params ["_show"];
disableSerialization; disableSerialization;
_display = uiNamespace getvariable QGVAR(triageCard); _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {}; if (isNil "_display") exitWith {};
_pos = [0,0,0,0]; _pos = [0,0,0,0];

View File

@ -22,8 +22,8 @@ _totalBloodLoss = 0;
// Advanced medical bloodloss handling // Advanced medical bloodloss handling
if (GVAR(level) >= 2) then { if (GVAR(level) >= 2) then {
_tourniquets = _unit getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; _tourniquets = _unit getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
_openWounds = _unit getvariable [QGVAR(openWounds), []]; _openWounds = _unit getVariable [QGVAR(openWounds), []];
//_cardiacOutput = [_unit] call FUNC(getCardiacOutput); //_cardiacOutput = [_unit] call FUNC(getCardiacOutput);
{ {
@ -35,7 +35,7 @@ if (GVAR(level) >= 2) then {
}; };
} forEach _openWounds; } forEach _openWounds;
_internalWounds = _unit getvariable [QGVAR(internalWounds), []]; _internalWounds = _unit getVariable [QGVAR(internalWounds), []];
{ {
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
} forEach _internalWounds; } forEach _internalWounds;
@ -43,7 +43,7 @@ if (GVAR(level) >= 2) then {
// cap the blood loss to be no greater as the current cardiac output // cap the blood loss to be no greater as the current cardiac output
//(_totalBloodLoss min _cardiacOutput); //(_totalBloodLoss min _cardiacOutput);
} else { } else {
{ _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getvariable [QGVAR(bodyPartStatus), []]); { _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getVariable [QGVAR(bodyPartStatus), []]);
_totalBloodLoss = (_totalBloodLoss / 6) * BLOODLOSSRATE_BASIC; _totalBloodLoss = (_totalBloodLoss / 6) * BLOODLOSSRATE_BASIC;
}; };
_totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0); _totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0);

View File

@ -25,7 +25,7 @@ private ["_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistan
params ["_unit"]; params ["_unit"];
_cardiacOutput = [_unit] call FUNC(getCardiacOutput); _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100]; _resistance = _unit getVariable [QGVAR(peripheralResistance), 100];
_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance; _bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance; _bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;

View File

@ -31,21 +31,21 @@
private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"]; private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"];
params ["_unit"]; params ["_unit"];
_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
_bloodVolumeChange = -([_unit] call FUNC(getBloodLoss)); _bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
if (_bloodVolume < 100.0) then { 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; _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
_ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND; _ivVolume = (_unit getVariable [_x, 0]) + IV_CHANGE_PER_SECOND;
_unit setvariable [_x,_ivVolume]; _unit setVariable [_x,_ivVolume];
}; };
} forEach GVAR(IVBags); } forEach GVAR(IVBags);
} else { } else {
{ {
if ((_unit getvariable [_x, 0]) > 0) then { if ((_unit getVariable [_x, 0]) > 0) then {
_unit setvariable [_x, 0]; // lets get rid of exessive IV volume _unit setVariable [_x, 0]; // lets get rid of exessive IV volume
}; };
} forEach GVAR(IVBags); } forEach GVAR(IVBags);
}; };

View File

@ -24,4 +24,4 @@
params ["_unit"]; 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);

View File

@ -19,11 +19,11 @@ private ["_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjust
params ["_unit"]; params ["_unit"];
_hrIncrease = 0; _hrIncrease = 0;
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then {
_heartRate = _unit getvariable [QGVAR(heartRate), 80]; _heartRate = _unit getVariable [QGVAR(heartRate), 80];
_bloodLoss = [_unit] call FUNC(getBloodLoss); _bloodLoss = [_unit] call FUNC(getBloodLoss);
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
{ {
_x params ["_values", "_time", "_callBack"]; _x params ["_values", "_time", "_callBack"];
if (abs _values > 0) then { if (abs _values > 0) then {
@ -48,9 +48,9 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
} forEach _adjustment; } forEach _adjustment;
_adjustment = _adjustment - [ObjNull]; _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 (_bloodVolume > 75) then {
if (_bloodLoss >0.0) then { if (_bloodLoss >0.0) then {
if (_bloodLoss <0.5) then { if (_bloodLoss <0.5) then {

View File

@ -17,7 +17,7 @@
private ["_unit","_return","_status"]; private ["_unit","_return","_status"];
params ["_unit"]; params ["_unit"];
_status = _unit getvariable [QGVAR(triageLevel), -1]; _status = _unit getVariable [QGVAR(triageLevel), -1];
_return = switch (_status) do { _return = switch (_status) do {
case 1: {[localize LSTRING(Triage_Status_Minor), 1, [0, 0.5, 0, 0.9]]}; 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]]}; case 2: {[localize LSTRING(Triage_Status_Delayed), 2, [0.7, 0.5, 0, 0.9]]};

View File

@ -51,7 +51,7 @@ if (isClass (_config >> _className)) then {
}; };
}; };
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
_injuryType = _injury select 1; _injuryType = _injury select 1;
_exist = false; _exist = false;
_bandagedInjury = []; _bandagedInjury = [];
@ -72,7 +72,7 @@ if !(_exist) then {
_bandagedWounds pushBack _bandagedInjury; _bandagedWounds pushBack _bandagedInjury;
}; };
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; _target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
// Check if we are ever going to reopen this // Check if we are ever going to reopen this
if (random(1) <= _reopeningChance) then { if (random(1) <= _reopeningChance) then {
@ -82,14 +82,14 @@ if (random(1) <= _reopeningChance) then {
params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; params ["_target", "_impact", "_part", "_injuryIndex", "_injury"];
//if (alive _target) then { //if (alive _target) then {
_openWounds = _target getvariable [QGVAR(openWounds), []]; _openWounds = _target getVariable [QGVAR(openWounds), []];
if ((count _openWounds)-1 < _injuryIndex) exitWith {}; if ((count _openWounds)-1 < _injuryIndex) exitWith {};
_selectedInjury = _openWounds select _injuryIndex; _selectedInjury = _openWounds select _injuryIndex;
if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs
_selectedInjury set [3, (_selectedInjury select 3) + _impact]; _selectedInjury set [3, (_selectedInjury select 3) + _impact];
_openWounds set [_injuryIndex, _selectedInjury]; _openWounds set [_injuryIndex, _selectedInjury];
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
_exist = false; _exist = false;
_injuryId = _injury select 1; _injuryId = _injury select 1;
{ {
@ -102,8 +102,8 @@ if (random(1) <= _reopeningChance) then {
} forEach _bandagedWounds; } forEach _bandagedWounds;
if (_exist) then { if (_exist) then {
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; _target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
_target setvariable [QGVAR(openWounds), _openWounds, true]; _target setVariable [QGVAR(openWounds), _openWounds, true];
}; };
}; };
// Otherwise something went wrong, we we don't reopen them.. // Otherwise something went wrong, we we don't reopen them..

View File

@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
}; };
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { 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); [_unit] call FUNC(setDead);
0.89; 0.89;
}; };

View File

@ -27,10 +27,10 @@ if (_part < 0) exitWith {};
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
// Sorting out the damage // 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]; _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; _unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
@ -47,7 +47,7 @@ _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); // [_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 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 { if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then {
[_unit] call FUNC(setUnconscious); [_unit] call FUNC(setUnconscious);

View File

@ -25,8 +25,8 @@ if (_bodyPartn > 1) exitWith {};
if (_amountOfDamage > 0.5) then { if (_amountOfDamage > 0.5) then {
if (random(1) >= 0.8) then { if (random(1) >= 0.8) then {
if !(_unit getvariable[QGVAR(airwayCollapsed), false]) then { if !(_unit getVariable[QGVAR(airwayCollapsed), false]) then {
_unit setvariable [QGVAR(airwayCollapsed), true, true]; _unit setVariable [QGVAR(airwayCollapsed), true, true];
}; };
}; };
}; };

View File

@ -16,7 +16,7 @@ private ["_damageBodyParts", "_cache_params", "_cache_damages"];
params ["_target"]; params ["_target"];
TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_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_params = _target getVariable [QGVAR(cachedHandleDamageParams), []];
_cache_damages = _target getVariable QGVAR(cachedDamages); _cache_damages = _target getVariable QGVAR(cachedDamages);
@ -31,9 +31,9 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c
private ["_newDamage", "_pain"]; private ["_newDamage", "_pain"];
_newDamage = (_cache_damages select _forEachIndex); _newDamage = (_cache_damages select _forEachIndex);
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; _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 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 { 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); [_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; }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 // 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]; _target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getVariable QGVAR(bodyPartStatus));
EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL);
_target setHitPointDamage ["hitHead", _headDamage min 0.95]; _target setHitPointDamage ["hitHead", _headDamage min 0.95];

View File

@ -59,12 +59,12 @@ if (_amountOfDamage > 0.05) then {
}; };
private ["_fractures", "_fractureID", "_amountOf"]; private ["_fractures", "_fractureID", "_amountOf"];
_fractures = _unit getvariable[QGVAR(fractures), []]; _fractures = _unit getVariable[QGVAR(fractures), []];
_fractureID = 1; _fractureID = 1;
_amountOf = count _fractures; _amountOf = count _fractures;
if (_amountOf > 0) then { if (_amountOf > 0) then {
_fractureID = (_fractures select (_amountOf - 1) select 0) + 1; _fractureID = (_fractures select (_amountOf - 1) select 0) + 1;
}; };
_fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; _fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */];
_unit setvariable [QGVAR(fractures), _fractures, true]; _unit setVariable [QGVAR(fractures), _fractures, true];
}; };

View File

@ -22,8 +22,8 @@ params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamag
TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage); TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
// Administration for open wounds and ids // Administration for open wounds and ids
_openWounds = _unit getvariable[QGVAR(openWounds), []]; _openWounds = _unit getVariable[QGVAR(openWounds), []];
_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
_extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _selectionName, _damage, _typeOfDamage, _woundID]; _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _selectionName, _damage, _typeOfDamage, _woundID];
@ -52,13 +52,13 @@ _foundIndex = -1;
}; };
} forEach _woundsCreated; } forEach _woundsCreated;
_unit setvariable [QGVAR(openWounds), _openWounds, true]; _unit setVariable [QGVAR(openWounds), _openWounds, true];
// Only update if new wounds have been created // Only update if new wounds have been created
if (count _woundsCreated > 0) then { if (count _woundsCreated > 0) then {
_unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true];
}; };
_painLevel = _unit getvariable [QGVAR(pain), 0]; _painLevel = _unit getVariable [QGVAR(pain), 0];
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; _unit setVariable [QGVAR(pain), _painLevel + _painToAdd];
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated);

View File

@ -26,7 +26,7 @@ _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
if (_bodyPartn < 0) exitWith {}; if (_bodyPartn < 0) exitWith {};
// Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] // 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], ..] // This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..]
_allInjuriesForDamageType = _injuryTypeInfo select 2; _allInjuriesForDamageType = _injuryTypeInfo select 2;
@ -34,7 +34,7 @@ _allInjuriesForDamageType = _injuryTypeInfo select 2;
if (count _allInjuriesForDamageType == 0) then { if (count _allInjuriesForDamageType == 0) then {
// grabbing the configuration for unknown damage type // 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; _allInjuriesForDamageType = _injuryTypeInfo select 2;
}; };
@ -73,8 +73,8 @@ _allPossibleInjuries = [];
if (_highestPossibleSpot < 0) exitWith {}; if (_highestPossibleSpot < 0) exitWith {};
// Administration for open wounds and ids // Administration for open wounds and ids
_openWounds = _unit getvariable[QGVAR(openWounds), []]; _openWounds = _unit getVariable[QGVAR(openWounds), []];
_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
_painToAdd = 0; _painToAdd = 0;
_woundsCreated = []; _woundsCreated = [];
@ -122,13 +122,13 @@ _woundsCreated = [];
}; };
} forEach (_injuryTypeInfo select 0); // forEach damage thresholds } forEach (_injuryTypeInfo select 0); // forEach damage thresholds
_unit setvariable [QGVAR(openWounds), _openWounds, true]; _unit setVariable [QGVAR(openWounds), _openWounds, true];
// Only update if new wounds have been created // Only update if new wounds have been created
if (count _woundsCreated > 0) then { if (count _woundsCreated > 0) then {
_unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; _unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true];
}; };
_painLevel = _unit getvariable [QGVAR(pain), 0]; _painLevel = _unit getVariable [QGVAR(pain), 0];
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; _unit setVariable [QGVAR(pain), _painLevel + _painToAdd];
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated); TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated);

View File

@ -17,9 +17,9 @@ private "_openWounds";
params ["_unit"]; params ["_unit"];
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
_unit setvariable [QGVAR(pain), 0]; _unit setVariable [QGVAR(pain), 0];
if (GVAR(level) >= 2) then { if (GVAR(level) >= 2) then {
_unit setvariable [QGVAR(heartRate), 0]; _unit setVariable [QGVAR(heartRate), 0];
_unit setvariable [QGVAR(bloodPressure), [0, 0]]; _unit setVariable [QGVAR(bloodPressure), [0, 0]];
_unit setvariable [QGVAR(airwayStatus), 0]; _unit setVariable [QGVAR(airwayStatus), 0];
}; };

View File

@ -17,17 +17,17 @@
params ["_unit", "_local"]; params ["_unit", "_local"];
if (_local) then { if (_local) then {
if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then { if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then {
[_unit, true] call FUNC(addToInjuredCollection); [_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"; private "_arguments";
_arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]); _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]);
_arguments set [2, ACE_time]; _arguments set [2, ACE_time];
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler; [DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
_unit setvariable [QGVAR(unconsciousArguments), nil, true]; _unit setVariable [QGVAR(unconsciousArguments), nil, true];
}; };
}; };

View File

@ -18,58 +18,58 @@ params ["_unit", "_interval"];
TRACE_3("ACE_DEBUG",_unit,_interval,_unit); TRACE_3("ACE_DEBUG",_unit,_interval,_unit);
if (_interval == 0) exitWith {}; 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)); _syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
if (_syncValues) then { 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; _bloodVolume = _bloodVolume max 0;
_unit setvariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; _unit setVariable [QGVAR(bloodVolume), _bloodVolume, _syncValues];
TRACE_3("ACE_DEBUG",_bloodVolume,_syncValues,_unit); TRACE_3("ACE_DEBUG",_bloodVolume,_syncValues,_unit);
// Set variables for synchronizing information across the net // Set variables for synchronizing information across the net
if (_bloodVolume < 100) then { if (_bloodVolume < 100) then {
if ((_bloodVolume < 90 && (GVAR(level) == 2)) || _bloodVolume <= 45) then { if ((_bloodVolume < 90 && (GVAR(level) == 2)) || _bloodVolume <= 45) then {
TRACE_4("ACE_DEBUG_ADVANCED",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); TRACE_4("ACE_DEBUG_ADVANCED",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit);
if (_unit getvariable [QGVAR(hasLostBlood), 0] != 2) then { if (_unit getVariable [QGVAR(hasLostBlood), 0] != 2) then {
_unit setvariable [QGVAR(hasLostBlood), 2, true]; _unit setVariable [QGVAR(hasLostBlood), 2, true];
}; };
} else { } else {
TRACE_4("ACE_DEBUG", _bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); TRACE_4("ACE_DEBUG", _bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit);
if (_unit getvariable [QGVAR(hasLostBlood), 0] != 1) then { if (_unit getVariable [QGVAR(hasLostBlood), 0] != 1) then {
_unit setvariable [QGVAR(hasLostBlood), 1, true]; _unit setVariable [QGVAR(hasLostBlood), 1, true];
}; };
} }
} else { } else {
TRACE_4("ACE_DEBUG",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit); TRACE_4("ACE_DEBUG",_bloodVolume,_unit getVariable QGVAR(hasLostBlood),_syncValues,_unit);
if (_unit getvariable [QGVAR(hasLostBlood), 0] != 0) then { if (_unit getVariable [QGVAR(hasLostBlood), 0] != 0) then {
_unit setvariable [QGVAR(hasLostBlood), 0, true]; _unit setVariable [QGVAR(hasLostBlood), 0, true];
}; };
}; };
TRACE_3("ACE_DEBUG",[_unit] call FUNC(getBloodLoss),_unit getVariable QGVAR(isBleeding),_unit); TRACE_3("ACE_DEBUG",[_unit] call FUNC(getBloodLoss),_unit getVariable QGVAR(isBleeding),_unit);
if (([_unit] call FUNC(getBloodLoss)) > 0) then { if (([_unit] call FUNC(getBloodLoss)) > 0) then {
if !(_unit getvariable [QGVAR(isBleeding), false]) then { if !(_unit getVariable [QGVAR(isBleeding), false]) then {
_unit setvariable [QGVAR(isBleeding), true, true]; _unit setVariable [QGVAR(isBleeding), true, true];
}; };
} else { } else {
if (_unit getvariable [QGVAR(isBleeding), false]) then { if (_unit getVariable [QGVAR(isBleeding), false]) then {
_unit setvariable [QGVAR(isBleeding), false, true]; _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); TRACE_4("ACE_DEBUG",_painStatus,_unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(painSuppress),_unit);
if (_painStatus > (_unit getvariable [QGVAR(painSuppress), 0])) then { if (_painStatus > (_unit getVariable [QGVAR(painSuppress), 0])) then {
if !(_unit getvariable [QGVAR(hasPain), false]) then { if !(_unit getVariable [QGVAR(hasPain), false]) then {
_unit setvariable [QGVAR(hasPain), true, true]; _unit setVariable [QGVAR(hasPain), true, true];
}; };
} else { } else {
if (_unit getvariable [QGVAR(hasPain), false]) then { if (_unit getVariable [QGVAR(hasPain), false]) then {
_unit setvariable [QGVAR(hasPain), false, true]; _unit setVariable [QGVAR(hasPain), false, true];
}; };
}; };
@ -111,11 +111,11 @@ if (GVAR(level) >= 2) then {
}; };
// Set the vitals // Set the vitals
_heartRate = (_unit getvariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval);
_unit setvariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; _unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues];
_bloodPressure = [_unit] call FUNC(getBloodPressure); _bloodPressure = [_unit] call FUNC(getBloodPressure);
_unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; _unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues];
if (_painStatus > 0 && {_painStatus < 10}) then { if (_painStatus > 0 && {_painStatus < 10}) then {
_painReduce = if (_painStatus > 5) then {0.002} else {0.001}; _painReduce = if (_painStatus > 5) then {0.002} else {0.001};
@ -125,15 +125,15 @@ if (GVAR(level) >= 2) then {
// TODO Disabled until implemented fully // TODO Disabled until implemented fully
// Handle airway // Handle airway
/*if (GVAR(setting_allowAirwayInjuries)) then { /*if (GVAR(setting_allowAirwayInjuries)) then {
_airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100]; _airwayStatus = _unit getVariable [QGVAR(airwayStatus), 100];
if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then { if (((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) && !((_unit getVariable [QGVAR(airwaySecured), false]))) then {
if (_airwayStatus >= 0.5) 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 { } 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 { 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 // TODO check for in revive state instead of variable
_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; _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 { 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. [_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); TRACE_3("ACE_DEBUG_IVBAGS_SYNC",GVAR(IVBags),_syncValues,_unit);
{ {
private "_value"; private "_value";
_value = _unit getvariable _x; _value = _unit getVariable _x;
if !(isNil "_value") then { if !(isNil "_value") then {
_unit setvariable [_x,(_unit getvariable [_x, 0]), true]; _unit setVariable [_x,(_unit getVariable [_x, 0]), true];
}; };
} forEach GVAR(IVBags); } forEach GVAR(IVBags);
}; };

View File

@ -19,9 +19,9 @@
private "_medicalEnabled"; private "_medicalEnabled";
params ["_unit"]; params ["_unit"];
_medicalEnabled = _unit getvariable QGVAR(enableMedical); _medicalEnabled = _unit getVariable QGVAR(enableMedical);
if (isNil "_medicalEnabled") exitWith { if (isNil "_medicalEnabled") exitWith {
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getVariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1)
}; };
_medicalEnabled _medicalEnabled

View File

@ -16,4 +16,4 @@
params ["_target", "_selectionName"]; 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);

View File

@ -22,26 +22,26 @@ _unit setVariable ["ACE_isUnconscious", false, true];
// advanced // advanced
// tourniquets // 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 // wounds and injuries
_unit setvariable [QGVAR(openWounds), [], true]; _unit setVariable [QGVAR(openWounds), [], true];
_unit setvariable [QGVAR(bandagedWounds), [], true]; _unit setVariable [QGVAR(bandagedWounds), [], true];
_unit setVariable [QGVAR(internalWounds), [], true]; _unit setVariable [QGVAR(internalWounds), [], true];
_unit setvariable [QGVAR(lastUniqueWoundID), 1, true]; _unit setVariable [QGVAR(lastUniqueWoundID), 1, true];
// vitals // vitals
_unit setVariable [QGVAR(heartRate), 80]; _unit setVariable [QGVAR(heartRate), 80];
_unit setvariable [QGVAR(heartRateAdjustments), []]; _unit setVariable [QGVAR(heartRateAdjustments), []];
_unit setvariable [QGVAR(bloodPressure), [80, 120]]; _unit setVariable [QGVAR(bloodPressure), [80, 120]];
_unit setVariable [QGVAR(peripheralResistance), 100]; _unit setVariable [QGVAR(peripheralResistance), 100];
// fractures // fractures
_unit setVariable [QGVAR(fractures), [], true]; _unit setVariable [QGVAR(fractures), [], true];
// triage card and logs // triage card and logs
_unit setvariable [QGVAR(triageLevel), 0, true]; _unit setVariable [QGVAR(triageLevel), 0, true];
_unit setvariable [QGVAR(triageCard), [], true]; _unit setVariable [QGVAR(triageCard), [], true];
// IVs // IVs
_unit setVariable [QGVAR(salineIVVolume), 0, true]; _unit setVariable [QGVAR(salineIVVolume), 0, true];
@ -49,36 +49,36 @@ _unit setVariable [QGVAR(plasmaIVVolume), 0, true];
_unit setVariable [QGVAR(bloodIVVolume), 0, true]; _unit setVariable [QGVAR(bloodIVVolume), 0, true];
// damage storage // 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 // airway
_unit setvariable [QGVAR(airwayStatus), 100]; _unit setVariable [QGVAR(airwayStatus), 100];
_unit setVariable [QGVAR(airwayOccluded), false]; _unit setVariable [QGVAR(airwayOccluded), false];
_unit setvariable [QGVAR(airwayCollapsed), false]; _unit setVariable [QGVAR(airwayCollapsed), false];
// generic medical admin // generic medical admin
_unit setvariable [QGVAR(addedToUnitLoop), false, true]; _unit setVariable [QGVAR(addedToUnitLoop), false, true];
_unit setvariable [QGVAR(inCardiacArrest), false, true]; _unit setVariable [QGVAR(inCardiacArrest), false, true];
_unit setvariable [QGVAR(hasLostBlood), 0, true]; _unit setVariable [QGVAR(hasLostBlood), 0, true];
_unit setvariable [QGVAR(isBleeding), false, true]; _unit setVariable [QGVAR(isBleeding), false, true];
_unit setvariable [QGVAR(hasPain), false, true]; _unit setVariable [QGVAR(hasPain), false, true];
_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true]; _unit setVariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
_unit setvariable [QGVAR(painSuppress), 0, true]; _unit setVariable [QGVAR(painSuppress), 0, true];
private ["_allUsedMedication", "_logs"]; private ["_allUsedMedication", "_logs"];
// medication // medication
_allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []]; _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
{ {
_unit setvariable [_x select 0, nil]; _unit setVariable [_x select 0, nil];
} forEach _allUsedMedication; } forEach _allUsedMedication;
_unit setVariable [QGVAR(allUsedMedication), [], true]; _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; } forEach _logs;
_unit setvariable [QGVAR(allLogs), [], true]; _unit setVariable [QGVAR(allLogs), [], true];
// items // items
[{ [{

View File

@ -21,7 +21,7 @@ if (GVAR(level) <= 1) exitWith {
}; };
_totalBloodLoss = 0; _totalBloodLoss = 0;
_openWounds = _unit getvariable [QGVAR(openWounds), []]; _openWounds = _unit getVariable [QGVAR(openWounds), []];
{ {
// total bleeding ratio * percentage of injury left // total bleeding ratio * percentage of injury left
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));

View File

@ -21,7 +21,7 @@ params ["_target", "_player", "_selectionN", "_actionData"];
if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith {
private ["_pointDamage"]; 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 { if (_pointDamage >= 0.8) exitWith {
_actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; _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"]; private ["_openWounds", "_amountOf"];
_openWounds = _target getvariable [QGVAR(openWounds), []]; _openWounds = _target getVariable [QGVAR(openWounds), []];
{ {
_x params ["", "", "_selectionX", "_amountOf", "_x4"]; _x params ["", "", "_selectionX", "_amountOf", "_x4"];
if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith {

View File

@ -18,11 +18,11 @@
private ["_setting", "_objects"]; private ["_setting", "_objects"];
params [["_logic", objNull, [objNull]]]; params [["_logic", objNull, [objNull]]];
if (!isNull _logic) then { if (!isNull _logic) then {
_setting = _logic getvariable ["class",0]; _setting = _logic getVariable ["class",0];
_objects = synchronizedObjects _logic; _objects = synchronizedObjects _logic;
{ {
if (local _x) then { if (local _x) then {
_x setvariable[QGVAR(isMedicalFacility), true, true]; _x setVariable[QGVAR(isMedicalFacility), true, true];
}; };
} forEach _objects; } forEach _objects;
}; };

View File

@ -22,7 +22,7 @@ private ["_foundEntry", "_allUsedMedication","_allMedsFromClassname", "_usedMeds
params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"]; params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"];
_foundEntry = false; _foundEntry = false;
_allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{ {
_x params ["_variableX", "_allMedsFromClassname"]; _x params ["_variableX", "_allMedsFromClassname"];
if (_variableX== _variable) exitWith { if (_variableX== _variable) exitWith {
@ -30,7 +30,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []];
_allMedsFromClassname pushBack _className; _allMedsFromClassname pushBack _className;
_x set [1, _allMedsFromClassname]; _x set [1, _allMedsFromClassname];
_allUsedMedication set [_forEachIndex, _x]; _allUsedMedication set [_forEachIndex, _x];
_target setvariable [QGVAR(allUsedMedication), _allUsedMedication]; _target setVariable [QGVAR(allUsedMedication), _allUsedMedication];
}; };
_foundEntry = true; _foundEntry = true;
}; };
@ -38,11 +38,11 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []];
if (!_foundEntry) then { if (!_foundEntry) then {
_allUsedMedication pushBack [_variable, [_className]]; _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 { if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then {
[_target] call FUNC(setDead); [_target] call FUNC(setDead);
}; };
@ -68,7 +68,7 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
if (isNil _onOverDose) then { if (isNil _onOverDose) then {
_onOverDose = compile _onOverDose; _onOverDose = compile _onOverDose;
} else { } else {
_onOverDose = missionNamespace getvariable _onOverDose; _onOverDose = missionNamespace getVariable _onOverDose;
}; };
[_target, _className] call _onOverDose; [_target, _className] call _onOverDose;
}; };
@ -80,15 +80,15 @@ _viscosityAdjustment = _viscosityChange / _timeInSystem;
params ["_args", "_idPFH"]; params ["_args", "_idPFH"];
_args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"]; _args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"];
private "_usedMeds"; private "_usedMeds";
_usedMeds = _target getvariable [_variable, 0]; _usedMeds = _target getVariable [_variable, 0];
_usedMeds = _usedMeds - _decreaseAmount; _usedMeds = _usedMeds - _decreaseAmount;
_target setvariable [_variable, _usedMeds]; _target setVariable [_variable, _usedMeds];
_amountDecreased = _amountDecreased + _decreaseAmount; _amountDecreased = _amountDecreased + _decreaseAmount;
// Restoring the viscosity while the medication is leaving the system // 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(peripheralResistance), ((_target getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0];
_target setvariable [QGVAR(painSuppress), ((_target getvariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; _target setVariable [QGVAR(painSuppress), ((_target getVariable [QGVAR(painSuppress), 0]) - _painReduce) max 0];
if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then { if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;

View File

@ -18,7 +18,7 @@ private ["_unit", "_injury", "_openWounds", "_injuryID", "_exists"];
params ["_unit", "_injury"]; params ["_unit", "_injury"];
if (!local _unit) then { if (!local _unit) then {
_openWounds = _unit getvariable[QGVAR(openWounds), []]; _openWounds = _unit getVariable[QGVAR(openWounds), []];
_injuryID = _injury select 0; _injuryID = _injury select 0;
_exists = false; _exists = false;
@ -32,5 +32,5 @@ if (!local _unit) then {
if (!_exists) then { if (!_exists) then {
_openWounds pushBack _injury; _openWounds pushBack _injury;
}; };
_unit setvariable [QGVAR(openWounds), _openWounds]; _unit setVariable [QGVAR(openWounds), _openWounds];
}; };

View File

@ -17,7 +17,7 @@ private ["_unit", "_openWounds", "_originOfrequest"];
params ["_unit", "_originOfrequest"]; params ["_unit", "_originOfrequest"];
if (local _unit && !(local _originOfrequest)) then { 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); ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
} forEach _openWounds; } forEach _openWounds;

View File

@ -116,7 +116,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific");
if (isArray(_damageTypesConfig >> _x >> "thresholds")) then { _typeThresholds = getArray(_damageTypesConfig >> _x >> "thresholds");}; if (isArray(_damageTypesConfig >> _x >> "thresholds")) then { _typeThresholds = getArray(_damageTypesConfig >> _x >> "thresholds");};
if (isNumber(_damageTypesConfig >> _x >> "selectionSpecific")) then { _selectionSpecificType = getNumber(_damageTypesConfig >> _x >> "selectionSpecific");}; 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"]; private ["_minDamageThresholds", "_amountThresholds"];
// extension loading // extension loading

View File

@ -21,8 +21,8 @@ params ["_unit", "_pain"];
if (!local _unit || !GVAR(enableScreams)) exitWith{}; if (!local _unit || !GVAR(enableScreams)) exitWith{};
// Lock if the unit is already playing a sound. // Lock if the unit is already playing a sound.
if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {}; if ((_unit getVariable [QGVAR(playingInjuredSound),false])) exitWith {};
_unit setvariable [QGVAR(playingInjuredSound),true]; _unit setVariable [QGVAR(playingInjuredSound),true];
// Play the sound if there is any damage present. // Play the sound if there is any damage present.
if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
@ -75,9 +75,9 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
// Clean up the lock // 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); }, [_unit], _delay, _delay] call EFUNC(common,waitAndExecute);
}; };
// Clean up in case there has not been played any sounds. // Clean up in case there has not been played any sounds.
_unit setvariable [QGVAR(playingInjuredSound),nil]; _unit setVariable [QGVAR(playingInjuredSound),nil];

View File

@ -17,6 +17,6 @@
params [ "_target", "_caller"]; 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 (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information
if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {}; if (_target getVariable [QGVAR(isWoundSynced), false]) exitWith {};
_target setvariable [QGVAR(isWoundSynced), true]; _target setVariable [QGVAR(isWoundSynced), true];
["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent); ["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent);

View File

@ -17,9 +17,9 @@
private "_timeInCardiacArrest"; private "_timeInCardiacArrest";
params ["_unit"]; params ["_unit"];
if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {}; if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {};
_unit setvariable [QGVAR(inCardiacArrest), true,true]; _unit setVariable [QGVAR(inCardiacArrest), true,true];
_unit setvariable [QGVAR(heartRate), 0]; _unit setVariable [QGVAR(heartRate), 0];
["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent); ["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent);
@ -31,14 +31,14 @@ _timeInCardiacArrest = 120 + round(random(600));
params ["_args", "_idPFH"]; params ["_args", "_idPFH"];
_args params ["_unit", "_startTime", "_timeInCardiacArrest"]; _args params ["_unit", "_startTime", "_timeInCardiacArrest"];
_heartRate = _unit getvariable [QGVAR(heartRate), 80]; _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (_heartRate > 0 || !alive _unit) exitWith { if (_heartRate > 0 || !alive _unit) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setvariable [QGVAR(inCardiacArrest), nil,true]; _unit setVariable [QGVAR(inCardiacArrest), nil,true];
}; };
if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setvariable [QGVAR(inCardiacArrest), nil,true]; _unit setVariable [QGVAR(inCardiacArrest), nil,true];
[_unit] call FUNC(setDead); [_unit] call FUNC(setDead);
}; };
}, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler; }, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;

View File

@ -24,9 +24,9 @@ if (!local _unit) exitWith {
_reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)];
if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith { 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 { if (GVAR(amountOfReviveLives) > 0) then {
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
if (_lifesLeft == 0) then { if (_lifesLeft == 0) then {
[_unit, true] call FUNC(setDead); [_unit, true] call FUNC(setDead);
}; };
@ -35,45 +35,45 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
false; false;
}; };
_unit setvariable [QGVAR(inReviveState), true, true]; _unit setVariable [QGVAR(inReviveState), true, true];
_unit setvariable [QGVAR(reviveStartTime), ACE_time]; _unit setVariable [QGVAR(reviveStartTime), ACE_time];
[_unit, true] call FUNC(setUnconscious); [_unit, true] call FUNC(setUnconscious);
[{ [{
private "_startTime"; private "_startTime";
params ["_args", "_idPFH"]; params ["_args", "_idPFH"];
_args params ["_unit"]; _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 { if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setvariable [QGVAR(inReviveState), nil, true]; _unit setVariable [QGVAR(inReviveState), nil, true];
_unit setvariable [QGVAR(reviveStartTime), nil]; _unit setVariable [QGVAR(reviveStartTime), nil];
[_unit, true] call FUNC(setDead); [_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. // revived without dieing, so in case we have lifes, remove one.
if (GVAR(amountOfReviveLives) > 0) then { if (GVAR(amountOfReviveLives) > 0) then {
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
_unit setvariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
}; };
_unit setvariable [QGVAR(reviveStartTime), nil]; _unit setVariable [QGVAR(reviveStartTime), nil];
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
if (GVAR(level) >= 2) then { if (GVAR(level) >= 2) then {
if (_unit getvariable [QGVAR(heartRate), 60] > 0) then { if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
_unit setvariable [QGVAR(heartRate), 0]; _unit setVariable [QGVAR(heartRate), 0];
}; };
}; };
}, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler;
false; false;
}; };
_unit setvariable ["ACE_isDead", true, true]; _unit setVariable ["ACE_isDead", true, true];
if (isPLayer _unit) then { if (isPLayer _unit) then {
_unit setvariable ["isDeadPlayer", true, true]; _unit setVariable ["isDeadPlayer", true, true];
}; };
["medical_onSetDead", [_unit]] call EFUNC(common,localEvent); ["medical_onSetDead", [_unit]] call EFUNC(common,localEvent);

View File

@ -33,7 +33,7 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force",
if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {}; if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {};
if !(_set) 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{}; 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, _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; _unit setUnconscious true;
if (_unit == ACE_player) then { if (_unit == ACE_player) then {

View File

@ -42,7 +42,7 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
} else { } else {
// Check for required class // Check for required class
if (isText (_config >> "requiredMedic")) exitWith { if (isText (_config >> "requiredMedic")) exitWith {
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0];
}; };
0; 0;
}; };
@ -63,7 +63,7 @@ if (isText (_config >> "Condition")) then {
if (isNil _condition) then { if (isNil _condition) then {
_condition = compile _condition; _condition = compile _condition;
} else { } else {
_condition = missionNamespace getvariable _condition; _condition = missionNamespace getVariable _condition;
}; };
if (typeName _condition == "BOOL") then { if (typeName _condition == "BOOL") then {
_return = _condition; _return = _condition;
@ -75,7 +75,7 @@ if (isText (_config >> "Condition")) then {
if (!_return) exitWith {false}; if (!_return) exitWith {false};
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then { _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else { } else {
getNumber(_config >> "patientStateCondition") getNumber(_config >> "patientStateCondition")
}; };
@ -97,7 +97,7 @@ if ("All" in _locations) then {
if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;};
if !(isNil _x) exitWith { if !(isNil _x) exitWith {
private "_val"; private "_val";
_val = missionNamespace getvariable _x; _val = missionNamespace getVariable _x;
if (typeName _val == "SCALAR") then { if (typeName _val == "SCALAR") then {
_return = switch (_val) do { _return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere case 0: {true}; //AdvancedMedicalSettings_anywhere
@ -119,7 +119,7 @@ _consumeItems = if (isNumber (_config >> "itemConsumed")) then {
} else { } else {
// Check for required class // Check for required class
if (isText (_config >> "itemConsumed")) exitWith { if (isText (_config >> "itemConsumed")) exitWith {
missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0];
}; };
0; 0;
}; };
@ -135,19 +135,19 @@ if (_callbackProgress == "") then {
if (isNil _callbackProgress) then { if (isNil _callbackProgress) then {
_callbackProgress = compile _callbackProgress; _callbackProgress = compile _callbackProgress;
} else { } else {
_callbackProgress = missionNamespace getvariable _callbackProgress; _callbackProgress = missionNamespace getVariable _callbackProgress;
}; };
// Patient Animation // Patient Animation
_patientAnim = getText (_config >> "animationPatient"); _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 { if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
_patientAnim = getText (_config >> "animationPatientUnconscious"); _patientAnim = getText (_config >> "animationPatientUnconscious");
}; };
}; };
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then { 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); [_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
} else { } else {
[_target, _patientAnim, 1, true] call EFUNC(common,doAnimation); [_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"); _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 // Cannot use secondairy weapon for animation
if (currentWeapon _caller == secondaryWeapon _caller) then { if (currentWeapon _caller == secondaryWeapon _caller) then {
@ -184,12 +184,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
if ((stance _caller) == "STAND") then { if ((stance _caller) == "STAND") then {
switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon
case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];}; case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];}; case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];}; case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
}; };
} else { } else {
_caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; _caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
}; };
[_caller, _callerAnim] call EFUNC(common,doAnimation); [_caller, _callerAnim] call EFUNC(common,doAnimation);
}; };
@ -203,7 +203,7 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
if (isNil _treatmentTimeConfig) then { if (isNil _treatmentTimeConfig) then {
_treatmentTimeConfig = compile _treatmentTimeConfig; _treatmentTimeConfig = compile _treatmentTimeConfig;
} else { } else {
_treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; _treatmentTimeConfig = missionNamespace getVariable _treatmentTimeConfig;
}; };
if (typeName _treatmentTimeConfig == "SCALAR") exitWith { if (typeName _treatmentTimeConfig == "SCALAR") exitWith {
_treatmentTimeConfig; _treatmentTimeConfig;

View File

@ -18,7 +18,7 @@
params ["_caller", "_target", "_selectionName", "_className", "_items"]; 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 */ [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
}; };
true; true;

View File

@ -17,17 +17,17 @@
private "_reviveStartTime"; private "_reviveStartTime";
params ["_caller","_target"]; params ["_caller","_target"];
if (_target getvariable [QGVAR(inReviveState), false]) then { if (_target getVariable [QGVAR(inReviveState), false]) then {
_reviveStartTime = _target getvariable [QGVAR(reviveStartTime),0]; _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0];
if (_reviveStartTime > 0) then { 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 { if (GVAR(level) > 1 && {(random 1) >= 0.6}) then {
_target setvariable [QGVAR(inCardiacArrest), nil,true]; _target setVariable [QGVAR(inCardiacArrest), nil,true];
_target setvariable [QGVAR(heartRate), 40]; _target setVariable [QGVAR(heartRate), 40];
_target setvariable [QGVAR(bloodPressure), [50,70]]; _target setVariable [QGVAR(bloodPressure), [50,70]];
}; };
[_target, "activity", LSTRING(Activity_CPR), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", LSTRING(Activity_CPR), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitWith {false}; if (_part < 0) exitWith {false};
// Get the open wounds for this unit // 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! if (count _openWounds == 0) exitWith {false}; // nothing to do here!
// Get the default effectiveness for the used bandage // 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]; _mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _impact) max 0];
_openWounds set [_mostEffectiveSpot, _mostEffectiveInjury]; _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 { if (USE_WOUND_EVENT_SYNC) then {
["medical_propagateWound", [_target, _mostEffectiveInjury]] call EFUNC(common,globalEvent); ["medical_propagateWound", [_target, _mostEffectiveInjury]] call EFUNC(common,globalEvent);

View File

@ -20,17 +20,17 @@ if (alive _target) exitWith {
_target setVariable [QGVAR(bloodVolume), 100, true]; _target setVariable [QGVAR(bloodVolume), 100, true];
// tourniquets // 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 // wounds and injuries
_target setvariable [QGVAR(openWounds), [], true]; _target setVariable [QGVAR(openWounds), [], true];
_target setvariable [QGVAR(bandagedWounds), [], true]; _target setVariable [QGVAR(bandagedWounds), [], true];
_target setVariable [QGVAR(internalWounds), [], true]; _target setVariable [QGVAR(internalWounds), [], true];
// vitals // vitals
_target setVariable [QGVAR(heartRate), 80]; _target setVariable [QGVAR(heartRate), 80];
_target setvariable [QGVAR(heartRateAdjustments), []]; _target setVariable [QGVAR(heartRateAdjustments), []];
_target setvariable [QGVAR(bloodPressure), [80, 120]]; _target setVariable [QGVAR(bloodPressure), [80, 120]];
_target setVariable [QGVAR(peripheralResistance), 100]; _target setVariable [QGVAR(peripheralResistance), 100];
// fractures // fractures
@ -42,27 +42,27 @@ if (alive _target) exitWith {
_target setVariable [QGVAR(bloodIVVolume), 0]; _target setVariable [QGVAR(bloodIVVolume), 0];
// damage storage // 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 // airway
_target setvariable [QGVAR(airwayStatus), 100, true]; _target setVariable [QGVAR(airwayStatus), 100, true];
_target setVariable [QGVAR(airwayOccluded), false, true]; _target setVariable [QGVAR(airwayOccluded), false, true];
_target setvariable [QGVAR(airwayCollapsed), false, true]; _target setVariable [QGVAR(airwayCollapsed), false, true];
// generic medical admin // generic medical admin
_target setvariable [QGVAR(addedToUnitLoop), false, true]; _target setVariable [QGVAR(addedToUnitLoop), false, true];
_target setvariable [QGVAR(inCardiacArrest), false, true]; _target setVariable [QGVAR(inCardiacArrest), false, true];
_target setvariable [QGVAR(inReviveState), false, true]; _target setVariable [QGVAR(inReviveState), false, true];
_target setVariable ["ACE_isUnconscious", false, true]; _target setVariable ["ACE_isUnconscious", false, true];
_target setvariable [QGVAR(hasLostBlood), 0, true]; _target setVariable [QGVAR(hasLostBlood), 0, true];
_target setvariable [QGVAR(isBleeding), false, true]; _target setVariable [QGVAR(isBleeding), false, true];
_target setvariable [QGVAR(hasPain), false, true]; _target setVariable [QGVAR(hasPain), false, true];
_target setvariable [QGVAR(painSuppress), 0, true]; _target setVariable [QGVAR(painSuppress), 0, true];
// medication // medication
_allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []]; _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{ {
_target setvariable [_x select 0, nil]; _target setVariable [_x select 0, nil];
} forEach _allUsedMedication; } forEach _allUsedMedication;
// Resetting damage // Resetting damage

View File

@ -20,9 +20,9 @@ params ["_target", "_className"];
// We have added a new dose of this medication to our system, so let's increase it // We have added a new dose of this medication to our system, so let's increase it
_varName = format[QGVAR(%1_inSystem), _className]; _varName = format[QGVAR(%1_inSystem), _className];
_currentInSystem = _target getvariable [_varName, 0]; _currentInSystem = _target getVariable [_varName, 0];
_currentInSystem = _currentInSystem + 1; _currentInSystem = _currentInSystem + 1;
_target setvariable [_varName, _currentInSystem]; _target setVariable [_varName, _currentInSystem];
// Find the proper attributes for the used medication // Find the proper attributes for the used medication
_medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication"); _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
@ -51,11 +51,11 @@ if (isClass (_medicationConfig >> _className)) then {
if (isNil _hrCallback) then { if (isNil _hrCallback) then {
_hrCallback = compile _hrCallback; _hrCallback = compile _hrCallback;
} else { } else {
_hrCallback = missionNamespace getvariable _hrCallback; _hrCallback = missionNamespace getVariable _hrCallback;
}; };
// Adjust the heart rate based upon config entry // 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 (alive _target) then {
if (_heartRate > 0) then { if (_heartRate > 0) then {
if (_heartRate <= 45) then { if (_heartRate <= 45) then {
@ -72,17 +72,17 @@ if (alive _target) then {
if (_painReduce > 0) then { if (_painReduce > 0) then {
// Reduce pain // Reduce pain
_painSuppress = _target getvariable [QGVAR(painSuppress), 0]; _painSuppress = _target getVariable [QGVAR(painSuppress), 0];
_target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; _target setVariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0];
if (!GVAR(painIsOnlySuppressed)) then { if (!GVAR(painIsOnlySuppressed)) then {
_pain = _target getvariable [QGVAR(pain), 0]; _pain = _target getVariable [QGVAR(pain), 0];
_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; _target setVariable [QGVAR(pain), (_pain - _painReduce) max 0, true];
}; };
}; };
_resistance = _target getvariable [QGVAR(peripheralResistance), 100]; _resistance = _target getVariable [QGVAR(peripheralResistance), 100];
_resistance = _resistance + _viscosityChange; _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 // Call back to ensure that the medication is decreased over time
[_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage); [_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage);

View File

@ -18,7 +18,7 @@
params ["_target", "_selectionName"]; 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 // Ensure it is a valid bodypart
_part = [_selectionName] call FUNC(selectionNameToNumber); _part = [_selectionName] call FUNC(selectionNameToNumber);
@ -33,8 +33,8 @@ if ((_damageBodyParts select _part) > 0) then {
_damageOnPart = _damageOnPart - BANDAGEHEAL; _damageOnPart = _damageOnPart - BANDAGEHEAL;
}; };
_damageBodyParts set [_part, _damageOnPart max 0]; _damageBodyParts set [_part, _damageOnPart max 0];
_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; _target setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus)); 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); EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL);

View File

@ -19,6 +19,6 @@ params ["_caller", "_target","_className"];
[_target, false] call FUNC(setUnconscious); [_target, false] call FUNC(setUnconscious);
if (_target getvariable [QGVAR(inReviveState), false]) then { if (_target getVariable [QGVAR(inReviveState), false]) then {
_target setvariable [QGVAR(inReviveState), nil, true]; _target setVariable [QGVAR(inReviveState), nil, true];
}; };

View File

@ -18,7 +18,7 @@
private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"];
params ["_target", "_treatmentClassname"]; params ["_target", "_treatmentClassname"];
_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; _bloodVolume = _target getVariable [QGVAR(bloodVolume), 100];
if (_bloodVolume >= 100) exitWith {}; if (_bloodVolume >= 100) exitWith {};
// Find the proper attributes for the used IV // Find the proper attributes for the used IV
@ -35,7 +35,7 @@ if (isClass (_config >> _treatmentClassname)) then {
}; };
_varName = format["ACE_Medical_IVVolume_%1",_typeOf]; _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 { if !(_varName in GVAR(IVBags)) then {
GVAR(IVBags) pushBack _varName; GVAR(IVBags) pushBack _varName;

View File

@ -32,7 +32,7 @@ if (_part == 0 || _part == 1) exitWith {
false; 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 { if ((_tourniquets select _part) > 0) exitWith {
_output = "There is already a tourniquet on this body part!"; // TODO localization _output = "There is already a tourniquet on this body part!"; // TODO localization
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);

View File

@ -21,10 +21,10 @@ params ["_target", "_tourniquetItem", "_selectionName"];
_part = [_selectionName] call FUNC(selectionNameToNumber); _part = [_selectionName] call FUNC(selectionNameToNumber);
// Place a tourniquet on the bodypart // 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)); _applyingTo = (_tourniquets select _part) + 1 + round(random(100));
_tourniquets set[_part, _applyingTo]; _tourniquets set[_part, _applyingTo];
_target setvariable [QGVAR(tourniquets), _tourniquets, true]; _target setVariable [QGVAR(tourniquets), _tourniquets, true];
[{ [{
params ["_args", "_idPFH"]; params ["_args", "_idPFH"];
@ -34,13 +34,13 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true];
[_idPFH] call CBA_fnc_removePerFrameHandler; [_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 { if !((_tourniquets select _part) == _applyingTo) exitWith {
// Tourniquet has been removed // Tourniquet has been removed
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
if (ACE_time - _time > 120) then { 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; }, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler;

View File

@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { 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) //Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim); TRACE_2("Reseting to old animation", animationState player, _lastAnim);
switch (toLower _lastAnim) do { switch (toLower _lastAnim) do {
@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then {
[_caller, _lastAnim, 2] call EFUNC(common,doAnimation); [_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 { if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
for "_index" from 0 to 99 do { for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index]; _caller action ["SwitchWeapon", _caller, _caller, _index];
@ -67,7 +67,7 @@ _callback = getText (_config >> "callbackFailure");
_callback = if (isNil _callback) then { _callback = if (isNil _callback) then {
compile _callback compile _callback
} else { } else {
missionNamespace getvariable _callback missionNamespace getVariable _callback
}; };
_args call _callback; _args call _callback;

View File

@ -25,7 +25,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { 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) //Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim); TRACE_2("Reseting to old animation", animationState player, _lastAnim);
switch (toLower _lastAnim) do { switch (toLower _lastAnim) do {
@ -38,9 +38,9 @@ if (vehicle _caller == _caller) then {
[_caller, _lastAnim, 2] call EFUNC(common,doAnimation); [_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 { if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
for "_index" from 0 to 99 do { for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index]; _caller action ["SwitchWeapon", _caller, _caller, _index];
@ -62,7 +62,7 @@ _callback = getText (_config >> "callbackSuccess");
if (isNil _callback) then { if (isNil _callback) then {
_callback = compile _callback; _callback = compile _callback;
} else { } else {
_callback = missionNamespace getvariable _callback; _callback = missionNamespace getVariable _callback;
}; };
//Get current damage before treatment (for litter) //Get current damage before treatment (for litter)
@ -81,7 +81,7 @@ _args pushBack _previousDamage;
_args call FUNC(createLitter); _args call FUNC(createLitter);
//If we're not already tracking vitals, start: //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); [_target] call FUNC(addToInjuredCollection);
}; };

View File

@ -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 // In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith { if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit); 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. // 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 // 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 { if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
@ -129,9 +129,9 @@ if (_parachuteCheck) then {
}; };
if (!local _unit) exitWith { if (!local _unit) exitWith {
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments));
_args set [3, _minWaitingTime - (ACE_time - _startingTime)]; _args set [3, _minWaitingTime - (ACE_time - _startingTime)];
_unit setvariable [QGVAR(unconsciousArguments), _args, true]; _unit setVariable [QGVAR(unconsciousArguments), _args, true];
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
@ -139,6 +139,6 @@ if (!local _unit) exitWith {
if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith {
TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition));
if (!([_unit] call FUNC(getUnconsciousCondition))) then { if (!([_unit] call FUNC(getUnconsciousCondition))) then {
_unit setvariable ["ACE_isUnconscious", false, true]; _unit setVariable ["ACE_isUnconscious", false, true];
}; };
}; };

View File

@ -59,7 +59,7 @@ class Rsctitles {
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
font = "PuristaMedium"; font = "PuristaMedium";
colorText[] = {0.95, 0.95, 0.95, 0.75}; 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); text = CSTRING(Injuries);
}; };
class InjuryList: ACE_gui_listBoxBase { class InjuryList: ACE_gui_listBoxBase {

View File

@ -113,7 +113,7 @@ class GVAR(triageCard) {
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
animTexturePressed = "#(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)"; 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 { class selectTriageStatusMinor: selectTriageStatus {
idc = 2003; idc = 2003;
@ -131,7 +131,7 @@ class GVAR(triageCard) {
animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)"; animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)";
animTexturePressed = "#(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)"; 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 { class selectTriageStatusDelayed: selectTriageStatus {
idc = 2004; idc = 2004;
@ -149,7 +149,7 @@ class GVAR(triageCard) {
animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; 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)"; 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)"; 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 { class selectTriageStatusImmediate: selectTriageStatus {
idc = 2005; idc = 2005;
@ -167,7 +167,7 @@ class GVAR(triageCard) {
animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; 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)"; 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)"; 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 { class selectTriageStatusDeceased: selectTriageStatus {
idc = 2006; idc = 2006;
@ -185,7 +185,7 @@ class GVAR(triageCard) {
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
animTexturePressed = "#(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)"; 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)];);
}; };
}; };
}; };

View File

@ -65,7 +65,7 @@ if (_name isEqualTo "triage") exitWith {
ctrlEnable [212, true]; ctrlEnable [212, true];
private ["_log", "_triageCardTexts", "_message"]; private ["_log", "_triageCardTexts", "_message"];
_log = GVAR(INTERACTION_TARGET) getvariable [QEGVAR(medical,triageCard), []]; _log = GVAR(INTERACTION_TARGET) getVariable [QEGVAR(medical,triageCard), []];
_triageCardTexts = []; _triageCardTexts = [];
{ {
_x params ["_item", "_amount", "_time"]; _x params ["_item", "_amount", "_time"];

View File

@ -15,4 +15,4 @@
params ["_target", "_status"]; params ["_target", "_status"];
_target setvariable [QEGVAR(medical,triageLevel), _status, true]; _target setVariable [QEGVAR(medical,triageLevel), _status, true];

View File

@ -128,7 +128,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab
] select _forEachIndex); ] select _forEachIndex);
_allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]]; _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); [_selectionBloodLoss, _damaged, _display] call FUNC(updateBodyImage);

View File

@ -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)"; 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)"; h = "16 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "#(argb,8,8,3)color(0,0,0,0.8)"; text = "#(argb,8,8,3)color(0,0,0,0.8)";
colorText[] = {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])"}; colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
}; };
class BottomBackground: CenterBackground { class BottomBackground: CenterBackground {
y = "(18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; 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"; font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 0.75}; 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 = ""; text = "";
}; };

View File

@ -59,10 +59,10 @@ class GVAR(TheDialog) {
//Redfine Scaling for the RscTitle //Redfine Scaling for the RscTitle
#define PROFILE_X (profilenamespace getvariable ['IGUI_GRID_GPS_X', 0]) #define PROFILE_X (profilenamespace getVariable ['IGUI_GRID_GPS_X', 0])
#define PROFILE_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y', 0]) #define PROFILE_Y (profilenamespace getVariable ['IGUI_GRID_GPS_Y', 0])
#define PROFILE_W (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1]) #define PROFILE_W (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1])
#define PROFILE_H ((16/9) * (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 X_PART(num) QUOTE((num) / 25 * PROFILE_W + PROFILE_X)
#define Y_PART(num) QUOTE((num) / 25 * PROFILE_H + PROFILE_Y) #define Y_PART(num) QUOTE((num) / 25 * PROFILE_H + PROFILE_Y)

View File

@ -9,8 +9,8 @@ class RscInGameUI {
idc = 80085; idc = 80085;
colorText[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0.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))])"; 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))])"; 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)"; w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
}; };

View File

@ -12,7 +12,7 @@
private _logicType = typeOf _logic; private _logicType = typeOf _logic;
_logic hideobject true; _logic hideobject true;
if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; if (_logic getVariable [QGVAR(initalized), false]) exitWith {};
private _config = (configFile >> "CfgVehicles" >> _logicType); private _config = (configFile >> "CfgVehicles" >> _logicType);
if !(isClass _config) exitWith {}; if !(isClass _config) exitWith {};
@ -24,7 +24,7 @@
if (isNil _function) then { if (isNil _function) then {
_function = compile _function; _function = compile _function;
} else { } else {
_function = missionNamespace getvariable _function; _function = missionNamespace getVariable _function;
}; };
if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit?
ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType);
@ -36,7 +36,7 @@
}; };
if !(_isPersistent) then { if !(_isPersistent) then {
_logic setvariable [QGVAR(initalized), true]; _logic setVariable [QGVAR(initalized), true];
}; };
if (_isDisposable) then { if (_isDisposable) then {

View File

@ -27,10 +27,10 @@ class RscTitles {
size = 0.018; size = 0.018;
colorBackground[] = { 0, 0, 0, 0 }; colorBackground[] = { 0, 0, 0, 0 };
colortext[] = { colortext[] = {
"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", "(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])",
"(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", "(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])",
"(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", "(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",
"(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" "(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"
}; };
text = ""; text = "";
class Attributes { class Attributes {

View File

@ -39,7 +39,7 @@ private ["_compiledConfig", "_name", "_typeName", "_isClientSetable", "_localize
_defaultValue = _x select 6; _defaultValue = _x select 6;
if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then { if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then {
_value = missionNamespace getvariable [_name, _defaultValue]; _value = missionNamespace getVariable [_name, _defaultValue];
_formatedValue = switch (toLower _typeName) do { _formatedValue = switch (toLower _typeName) do {
case ("scalar"): { case ("scalar"): {
format['value = %1;', _value]; format['value = %1;', _value];

View File

@ -18,7 +18,7 @@ _logic = _this select 0;
if (isMultiplayer) exitWith {}; if (isMultiplayer) exitWith {};
if (_logic getvariable ["allowconfigurationExport", false]) then { if (_logic getVariable ["allowconfigurationExport", false]) then {
GVAR(serverConfigGeneration) = 1; GVAR(serverConfigGeneration) = 1;
} else { } else {
GVAR(serverConfigGeneration) = 0; GVAR(serverConfigGeneration) = 0;

View File

@ -57,7 +57,7 @@ GVAR(serverSideValues) = [];
[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); [{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
disableSerialization; disableSerialization;
_menu = uiNamespace getvariable "ACE_serverSettingsMenu"; _menu = uiNamespace getVariable "ACE_serverSettingsMenu";
(_menu displayCtrl 1003) ctrlEnable false; (_menu displayCtrl 1003) ctrlEnable false;
if (GVAR(ClientSettingsExportIncluded)) then { if (GVAR(ClientSettingsExportIncluded)) then {

View File

@ -44,7 +44,7 @@ GVAR(clientSideColors) = [];
[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); [{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
disableSerialization; disableSerialization;
_menu = uiNamespace getvariable "ACE_settingsMenu"; _menu = uiNamespace getVariable "ACE_settingsMenu";
(_menu displayCtrl 1002) ctrlEnable false; (_menu displayCtrl 1002) ctrlEnable false;
(_menu displayCtrl 1003) ctrlEnable false; (_menu displayCtrl 1003) ctrlEnable false;

Some files were not shown because too many files have changed in this diff Show More