From 1da67d7b483a822638e4291ef7a763c38d869b92 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 10 Mar 2015 21:12:35 +0100 Subject: [PATCH 01/22] First draft of triage card --- addons/medical/XEH_preInit.sqf | 2 + addons/medical/config.cpp | 1 + .../fnc_displayPatientInformation.sqf | 2 +- .../functions/fnc_displayTriageCard.sqf | 78 ++++++++ .../functions/fnc_dropDownTriageCard.sqf | 34 ++++ addons/medical/ui/triagecard.hpp | 175 ++++++++++++++++++ 6 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 addons/medical/functions/fnc_displayTriageCard.sqf create mode 100644 addons/medical/functions/fnc_dropDownTriageCard.sqf create mode 100644 addons/medical/ui/triagecard.hpp diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c6ddbf0783..a670244302 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -79,6 +79,8 @@ PREP(treatmentTourniquetLocal); PREP(useItem); PREP(useItems); PREP(displayPatientInformation); +PREP(displayTriageCard); +PREP(dropDownTriageCard); PREP(moduleMedicalSettings); PREP(moduleAssignMedicRoles); PREP(moduleAssignMedicalVehicle); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 3e8aaa8d55..17060716a8 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -20,3 +20,4 @@ class CfgPatches { #include "ACE_Medical_Treatments.hpp" #include "ACE_Settings.hpp" #include "UI\RscTitles.hpp" +#include "UI\triagecard.hpp" diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index b9b450ea65..dafc0bf55d 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -149,4 +149,4 @@ if (_show) then { } else { ("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; -}; \ No newline at end of file +}; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf new file mode 100644 index 0000000000..95e6713d9a --- /dev/null +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -0,0 +1,78 @@ +/* + * Author: Glowbal + * Display triage card for a unit + * + * Arguments: + * 0: The unit + * + * Return Value: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_target", "_show"]; +_target = _this select 0; +_show = if (count _this > 1) then {_this select 1} else {true}; +GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0}; + +GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull}; + +if (_show) then { + //("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"]; + createDialog QGVAR(triageCard); + + [{ + private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"]; + _target = (_this select 0) select 0; + if (GVAR(TriageCardTarget) != _target) exitwith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + disableSerialization; + _display = uiNamespace getvariable QGVAR(triageCard); + if (isnil "_display") exitwith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + _triageCardTexts = []; + + // TODO fill the lb with the appropiate information for the patient + _lbCtrl = (_display displayCtrl 200); + lbClear _lbCtrl; + + _log = _target getvariable ["myVariableTESTKOEAKJR", []]; + { + // [_message,_moment,_type, _arguments] + _message = _x select 0; + _moment = _x select 1; + _arguments = _x select 3; + if (isLocalized _message) then { + _message = localize _message; + }; + + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _arguments set [_foreachIndex, localize _x]; + }; + }foreach _arguments; + _message = format([_message] + _arguments); + _lbCtrl lbAdd format["%1 %2", _moment, _message]; + }foreach _log; + + if (count _triageCardTexts == 0) then { + _lbCtrl lbAdd "No entries on this triage card.."; + }; + + _triageStatus = [_target] call FUNC(getTriageStatus); + (_display displayCtrl 2000) ctrlSetText (_triageStatus select 0); + (_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2); + + }, 0, [_target]] call CBA_fnc_addPerFrameHandler; + +} else { + //("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; + closeDialog 7010; +}; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf new file mode 100644 index 0000000000..c9a85d91af --- /dev/null +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -0,0 +1,34 @@ +/* + * Author: Glowbal + * Display triage card for a unit + * + * Arguments: + * 0: The unit + * + * Return Value: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_show"]; +_show = _this select 0; +disableSerialization; + +_display = uiNamespace getvariable QGVAR(triageCard); +if (isnil "_display") exitwith {}; + +_pos = [0,0,0,0]; +if (_show) then { + _pos = ctrlPosition (_display displayCtrl 2001); +}; +for "_idc" from 2002 to 2006 step 1 do +{ + _pos set [1, (_pos select 1) + (_pos select 3)]; + _ctrl = (_display displayCtrl _idc); + _ctrl ctrlSetPosition _pos; + _ctrl ctrlCommit 0; +}; + diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp new file mode 100644 index 0000000000..22cd9fcc51 --- /dev/null +++ b/addons/medical/ui/triagecard.hpp @@ -0,0 +1,175 @@ +class ACE_gui_buttonBase; + +class GVAR(triageCard) { + idd = 7010; + movingenable = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), _this select 0)]); + onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), nil)]); + class controlsBackground { + class Background: ACE_gui_backgroundBase { + idc = -1; + type = CT_STATIC; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "19 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_LEFT + ST_SHADOW; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.0, 0.0, 0.0, 1}; + colorBackground[] = {1,1,1,1}; + text = ""; + }; + + class TriageCardLabel { + idc = 199; + type = CT_STATIC; + x = "14.25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + style = 0x02 + 0x100; // ST_LEFT + ST_SHADOW + font = "PuristaMedium"; + colorText[] = {0,0,0,1}; + colorBackground[] = {0,0,0,0}; + text = "TRIAGE CARD"; + }; + class TriageList: ACE_gui_listBoxBase { + idc = 200; + x = "11 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + rowHeight = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + colorBackground[] = {0, 0, 0, 0}; + colorText[] = {0,0,0, 1.0}; + colorScrollbar[] = {0.95, 0.95, 0.95, 0}; + colorSelect[] = {0.0, 0.0, 0.0, 1}; + colorSelect2[] = {0.0, 0.0, 0.0, 1}; + colorSelectBackground[] = {0, 0, 0, 0.0}; + colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0}; + }; + class TriageTextBottom: TriageCardLabel { + idc = 2000; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = 0x02; + colorText[] = {1, 1, 1.0, 1}; + colorBackground[] = {0,0.0,0.0,0.7}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + }; + class selectTriageStatus: ACE_gui_buttonBase { + idc = 2001; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; + action = QUOTE([true] call FUNC(dropDownTriageCard);); + text = ""; + }; + class selectTriageStatusNone: selectTriageStatus { + idc = 2002; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_NONE; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(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)"; + 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)];); + }; + class selectTriageStatusMinor: selectTriageStatus { + idc = 2003; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_MINOR; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureOver = "#(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)"; + 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)];); + }; + class selectTriageStatusDelayed: selectTriageStatus { + idc = 2004; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DELAYED; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureOver = "#(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)"; + 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)];); + }; + class selectTriageStatusImmediate: selectTriageStatus { + idc = 2005; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_IMMEDIATE; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureOver = "#(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)"; + 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)];); + }; + class selectTriageStatusDeceased: selectTriageStatus { + idc = 2006; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DECEASED; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(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)"; + 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)];); + }; + }; +}; \ No newline at end of file From b5c6e52416a62bd393e9e6b46b9623941e06a97a Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 10:54:52 +0100 Subject: [PATCH 02/22] fixed #201 --- addons/medical/functions/fnc_handleDamage_fractures.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 0a22365044..31fa1c8873 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -70,5 +70,5 @@ if (_amountOfDamage > 0.05) then { _fractureID = (_fractures select (_amountOf - 1) select 0) + 1; }; _fractures pushback [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; - _unit setvariable [GVAR(fractures), _fractures, true]; -}; \ No newline at end of file + _unit setvariable [QGVAR(fractures), _fractures, true]; +}; From bc082783c903a5b3bdd9552103d1a8a808306980 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 10:55:27 +0100 Subject: [PATCH 03/22] check if unit is in a vehicle before checking the vehicle --- addons/medical/functions/fnc_hasItem.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index d02abb9187..551d532ae4 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -32,7 +32,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { }; _return = false; -if ([vehicle _medic] call FUNC(isMedicalVehicle) && {(vehicle _medic != _medic)}) then { +if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then { _crew = crew vehicle _medic; { if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { From 7c30127ffbeb952c1995e6b8edca5b5672624dd2 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 10:55:40 +0100 Subject: [PATCH 04/22] Disabled unimplemented medical systems --- .../functions/fnc_handleDamage_advanced.sqf | 19 ++++++++++--------- .../functions/fnc_handleUnitVitals.sqf | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 0158608067..8d4f14315a 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -45,15 +45,16 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; [_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds); -if (GVAR(enableAirway)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); -}; -if (GVAR(enableFractures)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); -}; -if (GVAR(enableInternalBleeding)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); -}; +// TODO Disabled until implemented fully +//if (GVAR(enableAirway)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); +//}; +//if (GVAR(enableFractures)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); +//}; +//if (GVAR(enableInternalBleeding)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); +//}; if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { [_unit, _newDamage] call FUNC(reactionToDamage); diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index e7c55d5d08..1828028f33 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -83,8 +83,9 @@ if (GVAR(level) >= 2) then { _bloodPressure = [_unit] call FUNC(getBloodPressure); _unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; + // TODO Disabled until implemented fully // Handle airway - if (GVAR(setting_allowAirwayInjuries)) then { + /*if (GVAR(setting_allowAirwayInjuries)) then { _airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100]; if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then { if (_airwayStatus >= 0.5) then { @@ -103,12 +104,11 @@ if (GVAR(level) >= 2) then { [_unit, true] call FUNC(setDead); }; }; - }; + };*/ // Check vitals for medical status // TODO check for in revive state instead of variable - // TODO Implement cardiac arrest. - _bloodPressureL = _bloodPressure select 0; + _bloodPressureL = _bloodPressure select 0; _bloodPressureH = _bloodPressure select 1; if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then { From 77210581f504e4bc1938e3f89caf26b58bf009d7 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 14:40:26 +0100 Subject: [PATCH 05/22] Added corners to triage card --- .../functions/fnc_dropDownTriageCard.sqf | 4 +--- addons/medical/ui/triage_card_corner_l.paa | Bin 0 -> 22016 bytes addons/medical/ui/triage_card_corner_r.paa | Bin 0 -> 22016 bytes addons/medical/ui/triagecard.hpp | 16 ++++++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 addons/medical/ui/triage_card_corner_l.paa create mode 100644 addons/medical/ui/triage_card_corner_r.paa diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index c9a85d91af..5e763822db 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -24,11 +24,9 @@ _pos = [0,0,0,0]; if (_show) then { _pos = ctrlPosition (_display displayCtrl 2001); }; -for "_idc" from 2002 to 2006 step 1 do -{ +for "_idc" from 2002 to 2006 step 1 do { _pos set [1, (_pos select 1) + (_pos select 3)]; _ctrl = (_display displayCtrl _idc); _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; }; - diff --git a/addons/medical/ui/triage_card_corner_l.paa b/addons/medical/ui/triage_card_corner_l.paa new file mode 100644 index 0000000000000000000000000000000000000000..a713f43e2df6981becccc005180bb326140d253a GIT binary patch literal 22016 zcmeI4L2DC16vszdYdr*0P{=`{hhFyJ(Q}dtiJ^+3wRn*96ZjcyMJR{}h6*Y|Z-QRL zi@l0P`~dbK^cD|-AXs|QOU7B3#Lj;( z|3B7}bF@UD^esuiU+)y&(BH@#HLdq)MtqqM72cZuM&782zuWxt=1u%P<83&fBVV1S{x7#4l>RQ5 zH`W93x65DQopJp}o~D}k7t3GaZMna7^+5dd<-auKym{xxyYcslcz6BW;r$jJ58KCy ze>VQeducd*zr{9RT|DA%#$Vz6)i2&y55#{ue}%Va{f)d)6MvaM@{Wg(r28e9Ki_rL z`6F-N*6*zKS2g}s=Z*CeI)CDw5+8pb4V^#np3XZo{;uz@VZL3{zRmx{+pNEJ_2xSN zcpLUp9os+G<=6G&uJNb-&bPmH^;b53;%%2V)`M;S#JgPHw)qopw|E!LpLn~?J8%BP z+b`Z(`K!F&1bu%D^A(!beg0E<`~CM0q4CS=2l*54G^78zUy?Q7uDzdlSBp2+UrYQ3 z0IOH--~OB5_`&g$XFiYH9H+t1H2Pg+7Y7Ty!9uA17lAMO#WwJrH~MV?U-XOGH~+eN zMt?f(y8r%9dA_=4$k#Xj=yx?|znG7*`J>;Jg8i25zyC|F=e}jXw*8Cwimx8}yivB_ zqWw3&%Y04OBfP$%b=LmJ^~iO`Iu+( zj78SB0qP&*Wx{kCG98cc=Af)i&!-!In)jZaif>J}889AV)16OuyzxoSX9N6UJk+}L z4z{5T%Ag8%>k literal 0 HcmV?d00001 diff --git a/addons/medical/ui/triage_card_corner_r.paa b/addons/medical/ui/triage_card_corner_r.paa new file mode 100644 index 0000000000000000000000000000000000000000..5d095321b90b199a425af4dc19be50260da68964 GIT binary patch literal 22016 zcmeHP&ubGw6n@HDdJ*D5DD+Y=2z&ElE*_Fp*brh-v=%|AlAcZeh0=>4q9PR(1P_8x zFTJIALGW&G-l8BB#G51#vd(l_HE%J`ac1_{yug;c&di(lzVDkiyVEqM!d9!fez~>L z^Z;Nwo$eglx0-9x4#i8_t>%?L+9$*%?HfUGwISYbi|f94^XMADvvq)%HvvA2>)&77 z(nkaQu>G!jw|hZOCH}-&8y6q1bw$_*HG^`^jSIL6u+C{;Y?5>p_)I-Tu5^ zx=6{gvkHu0pnS8+aC^Q{+`AA#e97foo_0Bt`BbWkM+TN znAHQu$2Hq^J-EgZ1yH`p@y|9WZ1&-0npn{ItzKFsowHJ++^$U0u0->&{BJv79306+!mN8`tn zpm#1l*38?-RBgwz3hgJ=_S0&dziW8lWr*=uExA5${@AV~eUuFkoG)c#eH4AYQ2A2r z*O5LpN5!hARDP=McM67wYJRHyH*$`LYCgLCH!&XLY}bo!KDy&E9`&PeKTPp{OgDbh zU@ z0q~&m-fo$t9^=m-+R}~((}LqU8?Nn~54K*%#{^V9s_l4wY%d{vmOh&03(rT{iFgk6 z;-TiF+A9bjRsB%@RohkLQT4Cd|1^P5MH~f+?;7>q=+Wq*X%_a?{Nc0~kU#J3e1CX6 zwsCwo-$huI$D+G0M*Yc;-le~-_LC^A-RI-}q}E%G`+KsY0z7y)`Yzo3`gIh|Pk4tQ AjsO4v literal 0 HcmV?d00001 diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp index 22cd9fcc51..f1b98f1e2d 100644 --- a/addons/medical/ui/triagecard.hpp +++ b/addons/medical/ui/triagecard.hpp @@ -20,6 +20,22 @@ class GVAR(triageCard) { colorBackground[] = {1,1,1,1}; text = ""; }; + class cornor_top_l: ACE_gui_backgroundBase { + idc = -1; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {1,1,0,1}; + colorBackground[] = {0,0,0,0}; + text = QUOTE(PATHTOF(ui\triage_card_corner_l.paa)); + }; + class cornor_top_r: cornor_top_l { + x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(ui\triage_card_corner_r.paa)); + }; class TriageCardLabel { idc = 199; From ff5c8e911d2162e28d924fd27988b75b908cac94 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 14:40:51 +0100 Subject: [PATCH 06/22] Added InteractionMenuClosed event for closing the patient information display --- addons/medical/XEH_postInit.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index d23a02225f..235f235255 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -12,6 +12,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; ["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler; ["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler; ["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler; +["InteractionMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler; // Initialize all effects _fnc_createEffect = { From 8de985d7549eb1bbd3ee54811efff2e90b7146cf Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 15:45:35 +0100 Subject: [PATCH 07/22] Added medical icons --- addons/medical/ui/icons/icon_autoInjector.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_bandage.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_bodybag.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_iv.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_medical_cross.paa | Bin 0 -> 2897 bytes addons/medical/ui/icons/icon_packingBandage.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_surgicalKit.paa | Bin 0 -> 5625 bytes addons/medical/ui/icons/icon_tourniquet.paa | Bin 0 -> 5625 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 addons/medical/ui/icons/icon_autoInjector.paa create mode 100644 addons/medical/ui/icons/icon_bandage.paa create mode 100644 addons/medical/ui/icons/icon_bodybag.paa create mode 100644 addons/medical/ui/icons/icon_iv.paa create mode 100644 addons/medical/ui/icons/icon_medical_cross.paa create mode 100644 addons/medical/ui/icons/icon_packingBandage.paa create mode 100644 addons/medical/ui/icons/icon_surgicalKit.paa create mode 100644 addons/medical/ui/icons/icon_tourniquet.paa diff --git a/addons/medical/ui/icons/icon_autoInjector.paa b/addons/medical/ui/icons/icon_autoInjector.paa new file mode 100644 index 0000000000000000000000000000000000000000..f1707d2b823641025354351bef4636a8cca5ba6c GIT binary patch literal 5625 zcmeHLZ)jUp6u&R+i|J-v3}&5cOT&yE&JIN|AXNH-(5_%Hu-vB5c4i&QkgoBAA4FCY z=U}3+>ZF2THuTd_v{UqbP;9#4Hnkf?!P=57t=g=aN|QNiJDTkJJMX@9U4}5B4x%~m z{+yThUhetb^E>BvpDJ2fy#B{p+P&qBvAMaqjfUUhZ6ja6$ZzpJ-b}uNjr{G+%};1J zk6=4sXYAlzj14*&JBRI`nZ`86@P?9=5GWzAj6fA@J>+gZRNkFtjC1a+cuwCF*P|y) zUt7NMKYC*M*7Hod{a}vbRaJ#G9uH@z7=Ni!~ z<9BBRU9-T$ud#9?pZ2-?Wj^`k)5Wtt%^rE9FU*H8H4&kJPau4CvHlOedve{SCc=Z*vt}>V zo7xG94=*}C-CKaq+Rk-+yMnCj>{uoSbf$n02S8gc zNlj|PFZwmrbIyIZQe37uJU#JzzM$Sz&yI#N`cslmOy$-K zAWLo_N&SgMMuK@hb*Dcc$1)+vPR25}&2}Z8K)z^N@h3>Z^lf-c;zRSR0-uJS-o20sVI0Rw49VIZixH;&cr1E6Ja5PpYQyVamGf!Jw&gaoTH~u3T+t>WtJI_zx_YXo zTH>WRcjg|*9uPxWA(j$Hr!&txFYAv^ywqm23GVZ)`gkxKhPklE%n3H-vuwk84P?H8 zK2^oG(Psv?(U#D*jGM7@VKeSGFWf5MPM-o5c88?lJtpnE<|uA@SR2wio+h;)MOrF~ zI#~CeUOO3nH%qjkG^ps8X;8Sj`MWS3scUMPR-aqr17~8*q0R)}M?kuM0xdVcGe$H3 zE%6W1TsYhejMf)zy`&D7NF8AsY|KWgdh7SN_Db)k6bAQ2luahvyNpFE_bY)F*@nj^ kSMa{vb;@Say{qW{HN8n1{%Qw z@6Rvi=HB}|_ndprd0N`gU~7J^p~a>lgv4SoUcpY=i-;)*;s)D6J7N`Fh!5NChd6le zhU-`rAs<&0;xiEPGh7=Jj&OuP5C2O+EwKBoU}q%QxrOb!TxGy7x)%KQvkRhj6V zlF@rXuzPlA4xNifB)}mmN7U?h#7`UO106yo0Pty#)W~IYMd^(Ly#GAdW4I>5?7?rj zJv686Zh68Z3nBz5NQN)|Qew(r_LjjT5*Nz0&xmB!XXE_#QM6}w-LGea+0*fH)bbpM zCfQQaEKhjm?e6(}{sUsGXhkPbya0I#qS_P=XE5@ij=#lUzm(QTX+k>f_xnk`_s*l% z5!@o=O4wq z5b(jK#vEMw)O%PzDS96C#m(-&KRY8a5`teCm>A)aN!kf26U6{!^TnaIyn^j`PEjd0BiuJL{yYqxSi~}~Ros)cZQ-$|9vVugbr`mz zpf7oZu6XJ4PMqHXv)P=Q!Dh$57@id4P-fzIK7%3a7!kywZ%IYU9&FnP1m^B}<*QU4 zN4x~`ug8}rJnWcL%9`}Hj`K0)@dx_;(dojD|5*F|Q7R8o9Phl@oX`KEeEugd6n1=T z^u8F6x!AU@QW+lq9j5YQWg^YrqgZ$^+B*RJ%g4O&tCf3|G#&EP^k<6Au7CdeZL7Dt zaGO-(0RnPcy{;p*ZE{)L=6c7g!cT$tk&%fJ9zc+8r@_t_UOUUe7}QT(37TfSvKP(m z;8N+P3-QbEK8Vskd*MwG&Av;fBgg2G10t`+xN}vbYd@B{G1gv0Ce>rj4IX4ku3^!lzG{)cED396yVeT(Y!FUG7_G zT`kCtv0>qQZ(K<_A?M(a+_rcmi!1UK(;G_9f$}>&JG6MdSpz#N*wY#L{I|G(SJrGB>|4H=YpE)zxKTxF~l4VhRm$e(wA{!~#5sU(3r|D8m06 z;MtN)$o5AF*=-=?5K zgp6MgSazM#uq56?Q%7X!DVOE48HL+b_{vy18-Y?H?arRSJ0Q7?wiyA?%BcUytUS^Wm3wZPSbPWq+`a-}*^{pDVSYV3( zwbh)K?X$AWRR`D$e1+5DeyTJfAI7(iQq3IB_cpkjf8P+yQ9hHu*~>8>pLdB~Yuua0 z_!7}<9%-`aEwX)7X~~C7Ux?ai$7Q{7WtcL)uy}d6684t@wkd3XqkL^j5~U}&{S84! zz*B$7!!hSG9CxFCM91eSd-pVaOZyqa$-Mu1@6pArUupYofi}|oAM?s(Q`eP;(I3&D z=~cmqYc>QI2du;FMJ(NdbCf!dXBFq;3ZyD9OwX|!^^hcqW2O&{!Jc~QN|**GIR~DM z@UNSB>DYo6ueu!f!(t;Oo)pxi7i^522kEZ$nE4&XBl}eC{1}7@s%$S^Rm0AsK}X1Y zp?Ni`m%@1j`!`f9;r22-Fl4VA{57M#FT}rh1O|PTORZLp-N8YhUZ0rAG4g%A;v^IX zs3swTz6I`^l0kF+1L4^JL zHc>&oWt^|>jgQXmK>x-4#iE3U6Ic;}{5DiBiQ1o|4EmU(N9;v@&3*NmL-r2(e(+aR za-6CRTmW~7`g21tRnhCRn)&y>pgRa(ujCl@uvo3um-{F+(VLSve`7TSH!vCbTP(Nd z7t8)p<{vfj+Wtz0dERwBp?-|VoG-G*c%0JauPlo0Z>;^X82M+yhI0E6+ibSK^&Sv{Z(C0u7tzC(?*KNhQ~XRb0Q#H=Lo9)vk;G z)Zg!%>B#gLi6AKDLcN#ojAm(1mQ!Hdb)Z<=IzSu4waBukp5EOh4-m83-cO}A93 zTHJa})Azsd_mN@wVAlIZ0V6SDQN$Yn_S?h#hU0c^wtvvs#M1O4K_Ky8%b9pBVrdPM zVx|wy*pZM~OLOpI8!|i>NqdrbJHF#;VZ6NT8Ew2ym-H)K+sy9BH3l@hrj-S(EcMh! z(;P3uX^5?0#A{03p~GLkw5v9am*tSPqGhNNx?$3reQOz_o7xUFSe{S2MqpVzI8=ss zh-cV(DQ$7nCuZ@qg7%z{3e9_ZX)ksD-WUnH;^dBFu8Zk!X=RcqN~3RG&oDJ`V@>FE z8(WW+0g*I}WseQg44)s<&^B*rDaQ?vma}#@HxFT(;=kH0XLLc00@pBHA8ujMGKKTK zLJIawgs{lcE~MGD*Jv9(UB2Ij=>gM(ihq&`PYZm0T)(keKaFFaCJw7u77jvLIOzMh z=$(Qj7t{zx>@2K;+|jbv2(zNzI6F2YJcxyuG?%q;#Za1qu>G()f6YN~31%PIo7Vw@ zib^ACju=P>4US2iJT`~fFN!cNYex9Q`871O-o3`j_*0Fcc6CMkfUc(X@ALB-I*2{0U`)W0}g=0xoZ4GuCiX+ueIh<;vGjzs|VDj%^#; z1}IlD_S2-%U~($kmZ56N2&*991d_mh7JVD~WS1!Dt#D-$GA_&CpQ6{spjqfTQ@lMp s)a>Q0+U_Pw$$L$q#%epmP=ibH5K%$TwC%Egj=Jm&P6JoNxiAvi9|BT1u>b%7 literal 0 HcmV?d00001 diff --git a/addons/medical/ui/icons/icon_iv.paa b/addons/medical/ui/icons/icon_iv.paa new file mode 100644 index 0000000000000000000000000000000000000000..ef7048dfd1b3066be53ea8ab6a6ee09bf4fb994b GIT binary patch literal 5625 zcmeHLZ%k8H6u+TM`8C_yF{$z%1V@`;f@5>fJbl@UEH>eQ`bKax2R5oy6<-<<; z())Y&-gE9b_x!o{u{1kdo4YMLPa8}KvD@vtWc;dj7h(#8I9t0j3o!!^;@w$UIUKYr z;Hi!v08W>6m;du~#7#>y4I|}B=npmOODyZL3 zFi)8Eh-=$tFc;wEE?Qh@q;PPnP!x;nj{;D-;ytn=k&SyMK5TH890fqZo95#yP_W(75&=>5^1$xK@5xKE)m@y z32(i!LGIUc+(t3w^yScdD-eVF53ELg>$*Y8DjC9l2FOL;`!cEYaH7mluMfP#KCr^s zF9f2ic~e&>?;mV0ulc>zePzoRUwQOf-*@D0u#3|34$v2-hWB-U^dkf}VhrkxQSk5M zqe(a(<6+J1GJ{xAH)KQoSwc1+G8?VcQV))Y?MD{Nik|8f4h#*OX{`wU%`lL-l;s)4 ze6b10gDEwN7AC0Ci_bfrkn@}}o>J79O!)Rgn!EGjh-oxawwF;nXW{v@Az_uZQfjLM zd+^J^9_8OnUZqYO?59!81M;rlDDpf%OMhQ%1A73zZ!fgZLU8%dCaKdTUBvMd6BCc! z7v4SYyh^9cbLelQDwWDdKgBX$`}{k$(P_uGv;4F+=i9$&lP|W>J$bWndwUznDFppn-Jm~8nInPX z>j09vXVBm-D;dZ5XBd|C>Z7!l8gCm3celY0`9l5R0;uYoqT;90_x~Ui#$tYEp#V@h zBqLy7AC3N7hL@NAk++0`&xHdn%*UWUOGT_|=(pz`K|w0jQtyA5g}Qr8QV8068Eik< zdo#UcysSj7e=N)T#J^EgktW`&KW2#e@H2kn$pbigFC8;cXC~(V-riozoK6|QmpR4` z(LIy@@Vw^H*T4QR6+Saf$1>@7E7sc+Jpb7Bf9X<(;kHm@MgNEN$LmKS@ToZg*9Y}{ z@Wx%l>sHsoc?cS+v)2?n)8AADCq+u@S9|b|G8u`wUpa%rVh8AWc6h24^DRWc zvbzri(DnWowFDN>5Dg*tg+U<={Gr3mK`B(W`#Ow9B^YNRnUt^EHr@mfLi2O0l#7di=HS`R?wMjmBS(3%{lC8qNGuRJl zn5^ymKHqvy-9HFnnd@_H{wICrlYgie?l@Ate9V1q5ASo0F^VZEkfmoVrmTl=UU@Ox z9YP%@3{%d-9R4-%EX2N^DW35MJDv4ZGQ(7($g+(gUU^sur+}w21Iunh!zr>c19BvF ztixk+a!gFJKfi~?@zP~+deAV0_QVbF%2QhYSZz0rhQQBPSCpxN$M@YrapHJ~D2<42 z)E311=qv9(umr|H^06CS^0`JVlden(g}I@$^mV28zsry8o@%C(hQDNKumr0ewW#-` z^`@_XnT@MmC_L$clC~{riOyxH z)G$1KX*tgX4K&aI{aq6XodfHf1Lcj(@ZCA^8BD6 z=9?p3bZi}UWGZ1+amRnWKi)a!GAFLb{!=I2y~YRoj}IlGa<~qV;E%c0L+EW$ zkWS*dS~B{ZrG7Mn9;k6Dz2r|}zZIhay7`~PYU9AkVi`j>9}F24>^Vxtp43DhOGh?Z HAVu2W9`xi| literal 0 HcmV?d00001 diff --git a/addons/medical/ui/icons/icon_medical_cross.paa b/addons/medical/ui/icons/icon_medical_cross.paa new file mode 100644 index 0000000000000000000000000000000000000000..656ebc000baa6685c07f4d17a9cb60b8a40b340f GIT binary patch literal 2897 zcmdT`!AiqG5FKp~MGxu4dq2Ss5Yiwt7ez!7KgWaMMf@A@3&mgX=r`o1hrl{-lV{72 zNouX23(3pO&UA~D8!if@baHcsLV=i+MRnVd4@xS5QJGze1!=K)dr`xz@S%b~mVf7eW-nM;M9mep< zbO5`wS!c1U*3&@V@)={U&!0Z5Co;b&l4o&Sf9eeRLqFzuo=}UsFl+Ok79LC&FNP32 z4)frteGX)9SE%-3NDIDyz#nb6%c%F@zW;qZz5T&8<$K~G^!wg_kH`Gb`g5N37Juqb zJ^EPWyobN-&wl#-(Z%{#cNKd)o2SpFNWNFkc@I6_uJYUZ&Sci?E}Bo)uG>iuW;7Zl zRB^WH`5fP0KBAU&xK?`NgJb8d4(hYDdc?MdalnO+^%`6&edzN-POyCTO>FhP`e&ZF zAs;g7b4Z>=t7GHW=Z_a?c)Y1h)1Fd!C~HRE?s8&9xi+5zGyM$$E1d<#SXVf=|4wa} vyOb*Bt9tb)P?zO6D_;+`HPIdEjB>4gT?dr0Jk)g@%NSc%q~mg#9-8NC+@k855=mybX$PY_GkZb6?+D!5KvqNOqFG zzTZ9f zhy`Nw0G6yLsmAvVI?)5dcu3RNn9#>!=_^f}_`(qt^~WScW85%QC9DMHCZN3Vj@UsO z?FxfEJOUvjJHZ}lb^FcUuz+!*^7{wVc;*k2I&p#2lJGC3Am%1;{1pwU6Xv{ z$a=P($P-dgFTLY}-Z($TwyjRs+vB`*qiL-X> zjR`-j%q=U6=zPTKoB`UC{IYVdcgmRq){~*YX>9j+1VQ88`O|RAem{KKRe53I-sFA{ z=o^%G?rdt(<%!U7k*dDUVI4OpXJufg@Iik%3pCVZYgZbSd>|d8ew5ZUr{d8QvUa6n z82L&P2V_-^(~@{7mQmB!h3&ZcGk%b=+J1=^A{L>6`I}@C7zT$iZDH{_O2gDqPrXYBDp>X0jOh28x;G2#uTh^l6>uLtUM=LQPcCIzLJ3ye+2o= zj$E%-yv-nwT`65&2_|EsIZ@1wx4t+EFvc%fSR}i@HSL2phJkPWnI4_!cunh1c+uNS zL-x8Q2~5Pj-^0pF7q>+;J)CCnT-s{#p?$>)i0>Z2ZuE1&AWZ>y4Rz;o7%wQp7Zik@ zUpXG*ABbmi!3*?aGY*ae^1f<9^3FD^E&1vx)=&8N@xr9|A0Ih~UCX;%S7RtY2Q;|8 zY)5J-*hwIUMhf`_#57zd)!QbO9AoTuOie2s>DXaqwXunO98pIntybnLf^}_F4N=Dn?;JTp3&kT3Yz;{``e{E zM~3GVCgdkhRKOO}^}zzoNU8_)^E`n1-LCOa%a8^BI}6x|jS&38ppgy!^wfea_X-!R zf}AJ$w&Sr6QOsFbnfiu30>>cWfwXt<+JK zzoK$Fn=j><$Fj4wasPV#*bmXqu|NWXiGZ+-9QpPK1DHZtZZK3eO>3*^X5HXgl94eb zV|9lVOlJ*H_Q5!All1H<)9dUSA$kPQ`=oWPog+jYl^GDdD~Y zN3Hwshuw_!6@K-itfJfCZRME;?l&|?gqC+ro-(;9yJdb)4ZRL60r|7s+)pUZeWUPdH4XMi96YC z_v?2a-|zQ*=bW$QX--bIG&3hZJDw17{`~nx3>RcSkC;M3oRdArg_wf}@e3~3Tmk;C zhNmWpkhez@vc*EkNqGKR6No?v%rMvn6&O_Dz9}&8h*IuV%Ewt%LS$LyE?-4#Glenv z`6A-FWDOtwiP;~}aQ!}p<20P{4#VwXEZ#Rq@6$wPAiK~}dKUe&Sa^Q=KxHo;URE`& zV>dKPLkryz56q6k9ufOMt`R@d94F}P{CmnI?>bvZ4@vyT^%zr$`j~;Mk34^f=D*L6ST4|Tm~X!UvwKXZ zha}Crt6da}40etS8n7T#(ZJ%czG)p9rntDy>s3AIAEi#UxHey&b0#B@L;GkW`Zup2 zH**Q-@u|(r;w4E^$eTOArhMUYce>ocLg3Fqi>~kUV`4_JQxy!@s#;R5C!={q+x+Z&l7@`Kd?|T`=>rKnZ2ghF6jsG}W@ea8+I;v4@X_&y5zWgC@lUn1TB7|~ zMjHA9ed%s?pf5)4$Umsl->O3R1N!R9t-$K ze*3Yf2=>DVZ3KiNB&`p~uMM^%mSs^)+3Kjcq?Dy${CVDDsr8{=n*tbr^A=fdXQw$$ zK)w?4{TL=8rxLaENaG)i*?9oVYxXc69fM=-5kBGm2K{0A82&pV<1rs(d3Ow65W)M~ z&@LAS=$g9YJ8dTlJna0u<^C`~R#1ldfqLKto?fh6h?0hOgFtAJ1lG z%jS4I_F&iZ?v-!`=)Oitiy4l5jhYlLbHe>2W#6CWm-q(GxADpFc=FnXS1SU(rT}6n z%OclG9TduV2x$swcoyAR*Sw*21onrrjf{E|=d&HevIG1VV)Y$$Nh$fzQ98~E{h{pU zX*1L?(AYItRUMfh%iR73^B!$IwC~zAbeA40O1eS^2vjdP-l?WOQTyUc*XCZC4spdY zsBlGF-uQ17v-hiDGx{S*qOi2h;Z}X!16UUFhO!qJ2%@fRv8twq23=WbRfmED`t{Sn zfhbtmk_HmV2=J#7%CZfavi$N#G|*lX{4S)AD42YgE6%~Sh5R{=mq+$fdX`&M7L?Fc1;P;pRs@!J3Q#we+?($ zPl2J7L)Yx^pqt4~OxyBw3hEHbO>`)jB(2X@aykh^PRZ4l8uRFkMf5@Y;Z(ZAt zpLfu-4!PmLQxA4k^%MbSVOucqP<)FrseNQ1mGy_OCkg(`P4sA4F{ULn4yt)*Nd(7F zo*WF)9}p9JqyMIF#*8XT$5h9SCl{x#?#}WI=`UKstk?k_ScZ<8Iy(|JBtWuq*;&WZ z>Na6XB#BrhC)X?GX|6pK-H>^XjOc~k@^~PJVQ|y-ey}M3*&1?_m#zEh^_uEvkrfXo XD(Ly_1!ZG=;1zEnsF%(Dz%BASCEq~? literal 0 HcmV?d00001 diff --git a/addons/medical/ui/icons/icon_tourniquet.paa b/addons/medical/ui/icons/icon_tourniquet.paa new file mode 100644 index 0000000000000000000000000000000000000000..6497420e54070ceb28abffa8e9bb58eefa241bd9 GIT binary patch literal 5625 zcmeHLZ%kWN6hE)@4N7Fxu^N|BEgNNVj0`oaOVIGp3`QKT#$McJAh1No$e{a3G=y%$ z7{3g4L1Q9waWN{IY$N#egO)BvmZ^!vg{`jAlFWabk|Hn)qwV#a_joOX8Uk6i#&D9? z*K^Oi=ic)>=bn4+6?sKPne(ZN>M}h5jE#+LR`}gzRm5{7;w#E_mJ=`FL;Q2)<+~*O z@5bjfBfzn>0G%d)U+`HPNgx5Bh80>tU$t^G3H#hq7>Vt9<>>cMPh{r5+?^RhSz~n@7$~n2=zeh_cTOpANPfo~HzS4h66+9#W z{eIMU#^P7;ai%;zHg0b`Wp8}cgZ7D{D5zFZLY@h*cQ$1vcu$y;a)J+%{Sv5 zhvIky!ZQKGAgkpg2nG`I09k_#Q|(bF#tQY8uzlTiIm>@wM&W7otoCBOv`3AE7h`uG zuZ>XoMm{cSvde@E+QN703gkw!YNue@5u!-%*h>EO4iBG1elz+`a80NV zB?%tmr^OxTJ%~pUd%kY29CTaRuVZbaGy>-}AzgR(Cz;>A+IppJQo+Z8aOl+amj z_1=otAOfbz2`@mvR(<(kqyklTh1B?2`U!(r zQKf&;&>4&Gbo3&vH>X3oyI>?4U0-RB$B&5dW4<_@9h3K&gG&4eCigVr!#g5s{Pb?gd^z&kaUkI<(|KL8ECJ!d&?MmH{Nc&vh5NAjOh*SFK@q>xEzdZ4$uc>{*Df`{12 z_EUEF&UIDEzPP~V+iMFD2IJ|Py*UG0a(z8&f60;h_Acg(;@R~?cu;N6P-?<`D=}q-`TSZ<%^BKB40t^|Ac@QtXQPSEkXvj7%iy)2~&a> z{^OW+yXLq4Gr7quA1LwQHpxsTadXh#uWl!~e{>g$x{{&1NFM=%+YW$t)cg^atv!~X zDGjkXb^UVZlX+UkG+(czEm1VFDoXP+u40abjR2CwW9SIHt_g(wfv;Ks_MTVEM5U}Y zT&`Omkh_etv!gSX`8?*p-l&(-Af8Gk>P=+DhpeFgL{@x~@rd^=Ww7Si;lRC;3G zz5g%%W28T^O~1~SV{ie@hswBZKWX#x2XvpefMLSj<>2EAdJ>LVIEu=8EWX+K#p`@4 z%970on-#L+Z!&pKS9$X*sFM64U>&jA$KU6Fy0#FHWZ+*YZ>v@o96i_3>g%1|7I9xx zr1)dSCz<}G%I}%CO&#mcIH+w)bWb3F0j~|zGGsgQOVxk7zcD8XEa@Pd)(_u$HORNIlpnfFrv5}+E@7vTc$Kn=8P|1p~WNyUU8YQeLEJ(kN9md-ZH4Kc%XFvuiG5N5q z!5uk4tLH_4jUOW~TYNMue&xt}Q!QFajR6}b!5cew;ds6}t;0-@85Qw73zd&-d-!do LxkgG8)w%r(;Z6Hd literal 0 HcmV?d00001 From 1d63e94fff12683ab1d52f83373f4aca946780f8 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 16:33:14 +0100 Subject: [PATCH 08/22] canTreatCached --- addons/medical/CfgVehicles.hpp | 198 +++++++++--------- addons/medical/XEH_preInit.sqf | 1 + .../medical/functions/fnc_canTreatCached.sqf | 22 ++ 3 files changed, 122 insertions(+), 99 deletions(-) create mode 100644 addons/medical/functions/fnc_canTreatCached.sqf diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index ad9302a2e8..958c2bea84 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -353,7 +353,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitHead"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -364,7 +364,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -373,32 +373,32 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment)); }; class CheckResponse: CheckPulse { displayName = "Check Response"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment)); }; }; @@ -417,7 +417,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitBody"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -429,7 +429,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -438,47 +438,47 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(treatment)); }; class SurgicalKit: fieldDressing { displayName = "Use Surgical Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); }; class PersonalAidKit: fieldDressing { displayName = "Use Personal Aid Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); }; class CPR: fieldDressing { displayName = "CPR"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); }; }; @@ -490,7 +490,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -502,7 +502,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -511,97 +511,97 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -611,7 +611,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -623,7 +623,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -632,97 +632,97 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; @@ -733,7 +733,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -746,7 +746,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -755,87 +755,87 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -845,7 +845,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -858,7 +858,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -867,87 +867,87 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call EFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index a670244302..014e1645d0 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -18,6 +18,7 @@ PREP(addToTriageCard); PREP(addUnconsciousCondition); PREP(canAccessMedicalEquipment); PREP(canTreat); +PREP(canTreatCached); PREP(determineIfFatal); PREP(getBloodLoss); PREP(getBloodPressure); diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf new file mode 100644 index 0000000000..f375e1417a --- /dev/null +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -0,0 +1,22 @@ +/* + * Author: Glowbal + * Cached Check if the treatment action can be performed. + * + * Arguments: + * 0: The caller + * 1: The target + * 2: Selection name + * 3: ACE_Medical_Treatments Classname + * + * ReturnValue: + * Can Treat + * + * Public: No + */ + +#include "script_component.hpp" + +#define MAX_DURATION_CACHE 1.5 + +// parameters, function, namespace, uid +[_this, FUNC(canTreat), missionNamespace, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,canTreat); From d0b14286ff2bc750a4855f7639481f009953c449 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 16:34:42 +0100 Subject: [PATCH 09/22] Wrong function name --- addons/medical/functions/fnc_canTreatCached.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf index f375e1417a..20a19beb58 100644 --- a/addons/medical/functions/fnc_canTreatCached.sqf +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -19,4 +19,4 @@ #define MAX_DURATION_CACHE 1.5 // parameters, function, namespace, uid -[_this, FUNC(canTreat), missionNamespace, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,canTreat); +[_this, FUNC(canTreat), missionNamespace, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,cachedCall); From 7ae45fbeff3ca348d63fe1a4846f4c4ce868d085 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 16:47:51 +0100 Subject: [PATCH 10/22] Fixed canTreatCached --- addons/medical/CfgVehicles.hpp | 207 ++++++++---------- .../medical/functions/fnc_canTreatCached.sqf | 4 +- 2 files changed, 98 insertions(+), 113 deletions(-) diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 958c2bea84..6040772d07 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -353,7 +353,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitHead"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -364,7 +364,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -373,32 +373,32 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment)); }; class CheckResponse: CheckPulse { displayName = "Check Response"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment)); }; }; @@ -417,7 +417,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitBody"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -429,7 +429,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -438,47 +438,32 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); }; - class Morphine: fieldDressing { - displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call EFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(treatment)); - }; - class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call EFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(treatment)); - }; - class Epinephrine: Morphine { - displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call EFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(treatment)); - }; class SurgicalKit: fieldDressing { displayName = "Use Surgical Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); }; class PersonalAidKit: fieldDressing { displayName = "Use Personal Aid Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); }; class CPR: fieldDressing { displayName = "CPR"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); }; }; @@ -490,7 +475,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -502,7 +487,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -511,97 +496,97 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -611,7 +596,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -623,7 +608,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -632,97 +617,97 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; @@ -733,7 +718,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -746,7 +731,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -755,87 +740,87 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -845,7 +830,7 @@ class CfgVehicles { class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; @@ -858,7 +843,7 @@ class CfgVehicles { class FieldDressing { displayName = "Field Dressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; @@ -867,87 +852,87 @@ class CfgVehicles { }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); }; class Atropine: Morphine { displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call EFUNC(canTreatCached)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf index 20a19beb58..cdc4c10385 100644 --- a/addons/medical/functions/fnc_canTreatCached.sqf +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -16,7 +16,7 @@ #include "script_component.hpp" -#define MAX_DURATION_CACHE 1.5 +#define MAX_DURATION_CACHE 2 // parameters, function, namespace, uid -[_this, FUNC(canTreat), missionNamespace, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,cachedCall); +[_this, DFUNC(canTreat), _this select 0, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,cachedCall); From 82ec93b84ea65ff49b565237557f4cd890ebb1b6 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 17:05:32 +0100 Subject: [PATCH 11/22] Medical icons --- addons/medical/CfgVehicles.hpp | 53 ++++++++++++++++++ ...icon_autoInjector.paa => autoInjector.paa} | Bin .../icons/{icon_bandage.paa => bandage.paa} | Bin .../icons/{icon_bodybag.paa => bodybag.paa} | Bin .../medical/ui/icons/{icon_iv.paa => iv.paa} | Bin ...on_medical_cross.paa => medical_cross.paa} | Bin ..._packingBandage.paa => packingBandage.paa} | Bin .../{icon_surgicalKit.paa => surgicalKit.paa} | Bin .../{icon_tourniquet.paa => tourniquet.paa} | Bin 9 files changed, 53 insertions(+) rename addons/medical/ui/icons/{icon_autoInjector.paa => autoInjector.paa} (100%) rename addons/medical/ui/icons/{icon_bandage.paa => bandage.paa} (100%) rename addons/medical/ui/icons/{icon_bodybag.paa => bodybag.paa} (100%) rename addons/medical/ui/icons/{icon_iv.paa => iv.paa} (100%) rename addons/medical/ui/icons/{icon_medical_cross.paa => medical_cross.paa} (100%) rename addons/medical/ui/icons/{icon_packingBandage.paa => packingBandage.paa} (100%) rename addons/medical/ui/icons/{icon_surgicalKit.paa => surgicalKit.paa} (100%) rename addons/medical/ui/icons/{icon_tourniquet.paa => tourniquet.paa} (100%) diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 6040772d07..c640d411f9 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -349,6 +349,7 @@ class CfgVehicles { class ACE_Head { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitHead"; @@ -359,6 +360,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { @@ -370,26 +372,31 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = "QuikClot"; condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class CheckPulse: fieldDressing { displayName = "Check Pulse"; condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; @@ -413,6 +420,7 @@ class CfgVehicles { priority = 2; hotkey = "M"; enableInside = 1; + icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitBody"; @@ -423,6 +431,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -435,42 +444,50 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = "QuikClot"; condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class SurgicalKit: fieldDressing { displayName = "Use Surgical Kit"; condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\surgicalKit.paa); }; class PersonalAidKit: fieldDressing { displayName = "Use Personal Aid Kit"; condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); + icon = ""; }; class CPR: fieldDressing { displayName = "CPR"; condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); + icon = ""; }; }; }; class ACE_ArmLeft { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; @@ -481,6 +498,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -493,46 +511,55 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = "QuikClot"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class Tourniquet: fieldDressing { displayName = "Tourniquet"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = "Atropine"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class BloodIV: fieldDressing { displayName = "Give Blood IV (1000ml)"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; @@ -578,6 +605,7 @@ class CfgVehicles { displayName = "Check Pulse"; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; @@ -593,6 +621,8 @@ class CfgVehicles { class ACE_ArmRight { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; distance = 2.0; @@ -602,6 +632,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -614,11 +645,13 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; @@ -634,11 +667,13 @@ class CfgVehicles { displayName = "Tourniquet"; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = "Atropine"; @@ -654,6 +689,7 @@ class CfgVehicles { displayName = "Give Blood IV (1000ml)"; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; @@ -699,6 +735,7 @@ class CfgVehicles { displayName = "Check Pulse"; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { displayName = "Check Blood Pressure"; @@ -715,6 +752,8 @@ class CfgVehicles { class ACE_LegLeft { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; distance = 2.0; @@ -724,6 +763,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; @@ -737,11 +777,13 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; @@ -757,6 +799,7 @@ class CfgVehicles { displayName = "Tourniquet"; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; @@ -767,6 +810,7 @@ class CfgVehicles { displayName = "Atropine"; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; @@ -777,6 +821,7 @@ class CfgVehicles { displayName = "Give Blood IV (1000ml)"; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; @@ -827,6 +872,8 @@ class CfgVehicles { class ACE_LegRight { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; distance = 2.0; @@ -836,6 +883,7 @@ class CfgVehicles { priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; @@ -849,11 +897,13 @@ class CfgVehicles { priority = 2; hotkey = ""; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = "Packing Bandage"; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = "Elastic Bandage"; @@ -869,11 +919,13 @@ class CfgVehicles { displayName = "Tourniquet"; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = "Atropine"; @@ -889,6 +941,7 @@ class CfgVehicles { displayName = "Give Blood IV (1000ml)"; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = "Give Blood IV (500ml)"; diff --git a/addons/medical/ui/icons/icon_autoInjector.paa b/addons/medical/ui/icons/autoInjector.paa similarity index 100% rename from addons/medical/ui/icons/icon_autoInjector.paa rename to addons/medical/ui/icons/autoInjector.paa diff --git a/addons/medical/ui/icons/icon_bandage.paa b/addons/medical/ui/icons/bandage.paa similarity index 100% rename from addons/medical/ui/icons/icon_bandage.paa rename to addons/medical/ui/icons/bandage.paa diff --git a/addons/medical/ui/icons/icon_bodybag.paa b/addons/medical/ui/icons/bodybag.paa similarity index 100% rename from addons/medical/ui/icons/icon_bodybag.paa rename to addons/medical/ui/icons/bodybag.paa diff --git a/addons/medical/ui/icons/icon_iv.paa b/addons/medical/ui/icons/iv.paa similarity index 100% rename from addons/medical/ui/icons/icon_iv.paa rename to addons/medical/ui/icons/iv.paa diff --git a/addons/medical/ui/icons/icon_medical_cross.paa b/addons/medical/ui/icons/medical_cross.paa similarity index 100% rename from addons/medical/ui/icons/icon_medical_cross.paa rename to addons/medical/ui/icons/medical_cross.paa diff --git a/addons/medical/ui/icons/icon_packingBandage.paa b/addons/medical/ui/icons/packingBandage.paa similarity index 100% rename from addons/medical/ui/icons/icon_packingBandage.paa rename to addons/medical/ui/icons/packingBandage.paa diff --git a/addons/medical/ui/icons/icon_surgicalKit.paa b/addons/medical/ui/icons/surgicalKit.paa similarity index 100% rename from addons/medical/ui/icons/icon_surgicalKit.paa rename to addons/medical/ui/icons/surgicalKit.paa diff --git a/addons/medical/ui/icons/icon_tourniquet.paa b/addons/medical/ui/icons/tourniquet.paa similarity index 100% rename from addons/medical/ui/icons/icon_tourniquet.paa rename to addons/medical/ui/icons/tourniquet.paa From 7d6afdf1a98d95eedf5a8435b04c5a8f7539b340 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 17:30:49 +0100 Subject: [PATCH 12/22] Added triage card option --- addons/medical/CfgVehicles.hpp | 12 ++++++++++++ addons/medical/ui/icons/triageCard.paa | Bin 0 -> 5625 bytes 2 files changed, 12 insertions(+) create mode 100644 addons/medical/ui/icons/triageCard.paa diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index c640d411f9..af489e1d37 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -434,6 +434,18 @@ class CfgVehicles { icon = PATHTOF(UI\icons\bandage.paa); }; + class TriageCard { + displayName = "Triage Card"; + distance = 2.0; + condition = "true"; + statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + icon = PATHTOF(UI\icons\triageCard.paa); + }; + // Advanced medical class FieldDressing { displayName = "Field Dressing"; diff --git a/addons/medical/ui/icons/triageCard.paa b/addons/medical/ui/icons/triageCard.paa new file mode 100644 index 0000000000000000000000000000000000000000..0a1865fc9fd59d812bf5c4410d0a5038653d22dd GIT binary patch literal 5625 zcmc(j4QNwW6o5}&lA07-GqG4%p>Ote)0UxZS|$o6>iV-OD=x3mQ6ZMO4Z*eyD#~zu z&4zQrW+!xPZl$eG&_YoM7AL6D&8ln!H*A$f5?80ixvl=S(Y1MZ=e+d3_fjp^G15!^ zzIX1=Ip>~x?!B?Ik`j-1X-S301^`Dw(RCWH@~j|cScpqJ%ZrIE_$Ge6xcD_U{#Nk) zkqh9{X#h=G0GILoWW^0`0PJCciwnwjN@Y`FQ6GRT%a#NS=m3pTLy{Y8cXe(EcQ)I& ze1g>n24#&le2FSR78cTrim1{Pnn?P5m?KP7yXV_2T+Y~!svGNZCb{hMmUAAfKk9oT z%XsZ)WKYxl3~mo&n?eF8Zi6o#19(>VAJz9OhCj6SvagcY=l+;T+iC2v>`&;MmCyBM zY@JGr*x;i*e!tSnIm$W@3*cVQnXxEFj@8OpWlPj@x6yth`BRp?q{D=k49L9V&is9w z7XNlT*O%;fS`B>}yLc>-*b>^3y%+GOQGfbzd6tK4H zqI}_%Q|^llG#+21S3VX)zvD5~C1`Ns7w1SUy9>apaAxeKE)eX3!O8V$Lm=Bm%TsRe z=mE#Hzwh4AOzuGKZyCH9_XE)5Arkxiu;B0=<#NWh z^gBRs8q9x9u>IXd)o6cV4xV4^cKd8LO!~NRo;QaSOi5fz##V>YlXzFpz9iP{*XvV$ z#NH&x`f3mR3*y8%ZT*i*};6UA0%6}^YQUtRN=D!LWJ(VTrX6O36qN=&}!oR*{G$7Uw#DdGs$h(p6W-{`gK~?9 zU0`#=_LZ1TiBnv1ZlLkF1m5}%VDoH?ozbZeUEnzjqTFt*cTW&mN#a?gEcXw}XUSp` zi!v?8GxY2Kd8bYoEe?PhZ*ae<<#C_7)-Pe z4WaS%_ul3VQ!R7J-wl6b{Cg`>zW%4(PsINu)YgItkZGq}fZoDWh3#1Q{Pq^^POx?> z0!e2rUp69-)KBo6#0AuTh~im%L6`plLJ)p>gSWRr=`Rwdz}`Z#KlSV1@>Ee(7_X#< zKE(OQ{DaA_k@P88NV8|Kb2Pu0EO(6JvD!}s;cM!D#u^SJRw$(5~L{llUD;bFAT znKXVl@-Bei7%v>Ln~pJz6{~Iq&pl8UplQ>tDW)(Lah!4aV{5{Gx>O|FACAD3d8TXQ zmmwiNxWLfo*B-FiGe^w%&-OQLMdL#?!_EEL_@-lcI5PiK08L1YK*t_&vc= z4@QD@z@q()6OicAgHfw*QzBLykNwKF>ow?qH4wDT@cG*H@jbzS!@SLKzIlh;ZD9ks zp5PuA$)E|%349~>)i(4#uS`*cVBN*R0@ls5SIF5I=jLVamP#7}Kn+|bA#w6KnmWo)&T z-qD_`k(ke!pOvU>N)sawc>5(w@3&CJl zE@oC}y;iWW9pr8syrM13z-evwlpUD2+<0qgD|)AIV|CwG7}dC^VS?Ef51)vKHzAjo z`^#6hp>SjM2Zu;rw|77pIuXCLBjeIRw7)KgHk@z5$DWfn_9wLa E7a_Q*_W%F@ literal 0 HcmV?d00001 From 8a9ac4147f47338db80d22295f81190a6dad93dd Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 21 Mar 2015 12:14:38 -0500 Subject: [PATCH 13/22] Update $PBOPREFIX$ Only getting error on server, not client `Warning Message: Script z\ace\addons\gforces\XEH_preInit.sqf not found` --- addons/gforces/$PBOPREFIX$ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gforces/$PBOPREFIX$ b/addons/gforces/$PBOPREFIX$ index 215e681d94..15f2f61c42 100644 --- a/addons/gforces/$PBOPREFIX$ +++ b/addons/gforces/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\hearing \ No newline at end of file +z\ace\addons\gforces From 054f21eedeb205bc3e030ed6ebc6185255be4a41 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 21 Mar 2015 12:18:19 -0500 Subject: [PATCH 14/22] +2more --- addons/maptools/$PBOPREFIX$ | 2 +- addons/smallarms/$PBOPREFIX$ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/maptools/$PBOPREFIX$ b/addons/maptools/$PBOPREFIX$ index 11a24a58d8..15fe8ae13f 100644 --- a/addons/maptools/$PBOPREFIX$ +++ b/addons/maptools/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\Addons\map \ No newline at end of file +z\ace\Addons\maptools \ No newline at end of file diff --git a/addons/smallarms/$PBOPREFIX$ b/addons/smallarms/$PBOPREFIX$ index 9d0480659e..9d177151a4 100644 --- a/addons/smallarms/$PBOPREFIX$ +++ b/addons/smallarms/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\switchunits \ No newline at end of file +z\ace\addons\smallarms \ No newline at end of file From dbb976503513158288f266d2aade4704443b2e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Sat, 21 Mar 2015 14:28:17 -0300 Subject: [PATCH 15/22] Fix isSubPath --- addons/interact_menu/functions/fnc_isSubPath.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index e90aa12300..1f086fb809 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -20,7 +20,7 @@ _isSubPath = true; if (count _shortPath > count _longPath) exitWith {false}; -for [{_i = 0},{_i < (count _shortPath) - 1},{_i = _i + 1}] do { +for [{_i = 0},{_i < count _shortPath},{_i = _i + 1}] do { if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; }; From 9578024693e778c19317f9b0de797b1e960fef70 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 21 Mar 2015 12:52:08 -0500 Subject: [PATCH 16/22] Dupe stringtable entry `Item STR_ACE_MEDICAL_BANDAGING listed twice` --- addons/medical/stringtable.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6317f97b06..9942ef02c0 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -680,11 +680,6 @@ Вы осмотрели раненого %1 Examinas a %1 - - Bandaging - Перевязка... - Vendando - Bandaged Повязка наложена From f8ea603977dca2fc062e2f64bc6e93adec9faecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Sat, 21 Mar 2015 15:32:32 -0300 Subject: [PATCH 17/22] Added dynamic actions to unload patients (unconscious) from vehicles --- .../functions/fnc_addPassengerActions.sqf | 1 - .../functions/fnc_addPassengersActions.sqf | 3 +- addons/medical/CfgVehicles.hpp | 94 +++++++++++++++++++ addons/medical/XEH_preInit.sqf | 1 + .../functions/fnc_addUnloadPatientActions.sqf | 48 ++++++++++ addons/medical/stringtable.xml | 3 + 6 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 addons/medical/functions/fnc_addUnloadPatientActions.sqf diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index d4a5da3788..dfe3b2e9b6 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -1,7 +1,6 @@ /* * Author: CAA-Picard * Mount unit actions inside passenger submenu - * Note: This function is NOT global. * * Argument: * 0: Vehicle diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 678cbc55db..de0c91e767 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -1,7 +1,6 @@ /* * Author: CAA-Picard * Create one action per passenger - * Note: This function is NOT global. * * Argument: * 0: Vehicle @@ -29,7 +28,7 @@ _actions = []; str(_unit), [_unit, true] call EFUNC(common,getName), "", - {systemChat "selected passenger"}, + {}, {true}, {_this call FUNC(addPassengerActions);}, [_unit] diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index ad9302a2e8..d347e28c66 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -1430,4 +1430,98 @@ class CfgVehicles { }; }; }; + + // Patient unload from vehicle actions + class LandVehicle; + class Car: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + class Tank: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class Air; + class Helicopter: Air { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + class Plane: Air { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class Ship; + class Ship_F: Ship { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class StaticMortar; + class Mortar_01_base_F: StaticMortar { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c6ddbf0783..45662898df 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -16,6 +16,7 @@ PREP(addToInjuredCollection); PREP(addToLog); PREP(addToTriageCard); PREP(addUnconsciousCondition); +PREP(addUnloadPatientActions); PREP(canAccessMedicalEquipment); PREP(canTreat); PREP(determineIfFatal); diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf new file mode 100644 index 0000000000..1b2f874e18 --- /dev/null +++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf @@ -0,0 +1,48 @@ +/* + * Author: CAA-Picard + * Create one unload action per unconscious passenger + * + * Argument: + * 0: Vehicle + * 1: Player + * 3: Parameters + * + * Return value: + * Children actions + * + * Public: No + */ +#include "script_component.hpp" + +EXPLODE_3_PVT(_this,_vehicle,_player,_parameters); + +systemChat format ["Generating for %1 %2", _vehicle, _player]; + +private ["_actions"]; +_actions = []; + +{ + _unit = _x; + systemChat str(_unit); + if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then { + systemChat "Entered"; + _actions pushBack + [ + [ + str(_unit), + [_unit, true] call EFUNC(common,getName), + "", + {[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);}, + {true}, + {}, + [_unit] + ] call EFUNC(interact_menu,createAction), + [], + _unit + ]; + }; +} forEach crew _vehicle; + +systemChat str(count _actions); + +_actions diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6317f97b06..b5269b2526 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -725,6 +725,9 @@ %1 проводит вам интубацию %1 te está intubando + + Unload patient >> + From 89daf840f6a9e0226cf673ea3f022b0f367a05c9 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 20:08:52 +0100 Subject: [PATCH 18/22] fixed incorrect macro --- addons/medical/functions/fnc_onPropagateWound.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index 762afa762c..934899eac4 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -33,5 +33,5 @@ if (!local _unit) then { if (!_exists) then { _openWounds pushback _injury; }; - _unit setvariable [GVAR(openWounds), _openWounds]; + _unit setvariable [QGVAR(openWounds), _openWounds]; }; From ce3ed988a23973fd13c48d7f527a8770f277bcd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Sat, 21 Mar 2015 16:33:59 -0300 Subject: [PATCH 19/22] Removed debug traces --- addons/medical/functions/fnc_addUnloadPatientActions.sqf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf index 1b2f874e18..3a96c0b089 100644 --- a/addons/medical/functions/fnc_addUnloadPatientActions.sqf +++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf @@ -16,16 +16,12 @@ EXPLODE_3_PVT(_this,_vehicle,_player,_parameters); -systemChat format ["Generating for %1 %2", _vehicle, _player]; - private ["_actions"]; _actions = []; { _unit = _x; - systemChat str(_unit); if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then { - systemChat "Entered"; _actions pushBack [ [ From 1d4249a82587c355aeba805bcb533155f306fe6a Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Mar 2015 21:51:27 +0100 Subject: [PATCH 20/22] macros --- addons/main/script_macros.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 8425c4ad1e..ff2c4d615e 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -190,15 +190,21 @@ #define GETVAR(var1,var2,var3) var1 GETVAR_SYS(var2,var3) #define GETMVAR(var1,var2) missionNamespace GETVAR_SYS(var1,var2) #define GETUVAR(var1,var2) uiNamespace GETVAR_SYS(var1,var2) +#define GETPRVAR(var1,var2) profileNamespace GETVAR_SYS(var1,var2) +#define GETPAVAR(var1,var2) parsingNamespace GETVAR_SYS(var1,var2) #define SETVAR(var1,var2,var3) var1 SETVAR_SYS(var2,var3) #define SETPVAR(var1,var2,var3) var1 SETPVAR_SYS(var2,var3) #define SETMVAR(var1,var2) missionNamespace SETVAR_SYS(var1,var2) #define SETUVAR(var1,var2) uiNamespace SETVAR_SYS(var1,var2) +#define SETPRVAR(var1,var2) profileNamespace SETVAR_SYS(var1,var2) +#define SETPAVAR(var1,var2) parsingNamespace SETVAR_SYS(var1,var2) #define GETGVAR(var1,var2) GETMVAR(GVAR(var1),var2) #define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3) +#define ARR_SELECT(ARRAY,INDEX,DEFAULT) if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT} + #define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ weapon = #WEAPON; \ From 1b8a9290cd4a0b657cebe725156a696699241cbf Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Mar 2015 21:56:22 +0100 Subject: [PATCH 21/22] remove obsolete custom eh from agm --- addons/common/XEH_preInit.sqf | 6 --- .../functions/fnc_addCustomEventHandler.sqf | 39 ------------------ .../functions/fnc_callCustomEventHandlers.sqf | 31 -------------- .../fnc_callCustomEventHandlersGlobal.sqf | 16 -------- .../fnc_removeCustomEventHandler.sqf | 40 ------------------- .../functions/fnc_showFriendlyFireMessage.sqf | 2 - 6 files changed, 134 deletions(-) delete mode 100644 addons/common/functions/fnc_addCustomEventHandler.sqf delete mode 100644 addons/common/functions/fnc_callCustomEventHandlers.sqf delete mode 100644 addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf delete mode 100644 addons/common/functions/fnc_removeCustomEventHandler.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index de848941fd..04411ce7e8 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -8,7 +8,6 @@ PREP(addActionEventHandler); PREP(addActionMenuEventHandler); PREP(addCameraEventHandler); PREP(addCanInteractWithCondition); -PREP(addCustomEventHandler); PREP(addLineToDebugDraw); PREP(addMapMarkerCreatedEventHandler); PREP(addScrollWheelEventHandler); @@ -21,8 +20,6 @@ PREP(beingCarried); PREP(binarizeNumber); PREP(blurScreen); PREP(cachedCall); -PREP(callCustomEventHandlers); -PREP(callCustomEventHandlersGlobal); PREP(canGetInPosition); PREP(canInteract); PREP(canInteractWith); @@ -152,7 +149,6 @@ PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); PREP(removeCameraEventHandler); PREP(removeCanInteractWithCondition); -PREP(removeCustomEventHandler); PREP(removeMapMarkerCreatedEventHandler); PREP(removeScrollWheelEventHandler); PREP(removeSpecificMagazine); @@ -258,8 +254,6 @@ if (hasInterface) then { ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]; uiNamespace setVariable ["ACE_player", ACE_player]; - // Raise custom event. @todo, remove - [missionNamespace, "playerChanged", [ACE_player, _oldPlayer]] call FUNC(callCustomEventHandlers); // Raise ACE event ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent); }; diff --git a/addons/common/functions/fnc_addCustomEventHandler.sqf b/addons/common/functions/fnc_addCustomEventHandler.sqf deleted file mode 100644 index e31730dbb3..0000000000 --- a/addons/common/functions/fnc_addCustomEventHandler.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: commy2 - * - * Add a custom event to a unit. The event scripts are called by FUNC(callCustomEventHandlers). - * - * Argument: - * 0: Object the event should be assigned to or namespace (Object OR Namespace) - * 1: Name of the event (String) - * 2: Code to execute (Code or String) - * - * Return value: - * ID of the event script (used to remove it later). - */ -#include "script_component.hpp" - -private ["_object", "_type", "_statement", "_name", "_actionsVar", "_id", "_actionIDs", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_statement = _this select 2; - -if (typeName _statement == "STRING") then { - _statement = compile _statement; -}; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actionsVar = _object getVariable [_name, [-1, [], []]]; - -_id = (_actionsVar select 0) + 1; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_actionIDs pushBack _id; -_actions pushBack _statement; - -_object setVariable [_name, [_id, _actionIDs, _actions]]; - -_id diff --git a/addons/common/functions/fnc_callCustomEventHandlers.sqf b/addons/common/functions/fnc_callCustomEventHandlers.sqf deleted file mode 100644 index 4b822e0754..0000000000 --- a/addons/common/functions/fnc_callCustomEventHandlers.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: commy2 - * - * Execute all custom event script assigned to this object. - * - * Argument: - * 0: Object the eventhandlers are assigned to or namespace (Object or Namespace) - * 1: Name of the event (String) - * 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to]) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_object", "_type", "_argument", "_name", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_argument = _this select 2; - -if (isNil "_argument") then {_argument = [_object]}; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actions = (_object getVariable [_name, [-1, [], []]]) select 2; - -{ - _argument call _x; nil; -} count _actions; -nil diff --git a/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf b/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf deleted file mode 100644 index e1dddd5916..0000000000 --- a/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Author: commy2 - * - * Execute all custom event script assigned to this object on every machine. - * - * Argument: - * 0: Object the eventhandlers are assigned to or namespace (Object or Namespace) - * 1: Name of the event (String) - * 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to]) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -[_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc); diff --git a/addons/common/functions/fnc_removeCustomEventHandler.sqf b/addons/common/functions/fnc_removeCustomEventHandler.sqf deleted file mode 100644 index 771ea9f5bf..0000000000 --- a/addons/common/functions/fnc_removeCustomEventHandler.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: commy2 - * - * Remove a custom event handler from an object. - * - * Argument: - * 0: Unit the event handler is assigned to or namespace (Object OR Namespace) - * 1: Name of the event (String) - * 2: ID of the event handler (Number) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_object", "_type", "_id", "_name", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_id = _this select 2; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actionsVar = _object getVariable [_name, [-1, [], []]]; - -_currentId = _actionsVar select 0; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_id = _actionIDs find _id; - -if (_id == -1) exitWith {}; - -_actionIDs set [_id, -1]; -_actionIDs = _actionIDs - [-1]; - -_actions set [_id, []];//{} -_actions = _actions - [[]];//[{}] - -_object setVariable [_name, [_currentId, _actionIDs, _actions]]; diff --git a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf index 7d1b374252..1fdd10da4e 100644 --- a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf +++ b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf @@ -25,8 +25,6 @@ _killer = _this select 1; if (_unit != _killer && side group _unit in [side group ACE_player, civilian] && {side group _killer == side group ACE_player}) then { systemChat format ["%1 was killed by %2", [_unit] call EFUNC(common,getName), [_killer] call EFUNC(common,getName)]; - // Raise custom event. @todo: remove - [_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(common,callCustomEventHandlers); // Raise ACE globalEvent ["killedByFriendly", [_unit, _killer]] call EFUNC(common,globalEvent); }; From 1bf13cea3419b56f94d58180eff3d0298a2654fd Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Mar 2015 22:13:36 +0100 Subject: [PATCH 22/22] remove obsolete camera eh from agm --- addons/common/HintConfig.hpp | 11 ------ addons/common/XEH_preInit.sqf | 2 - .../functions/fnc_addCameraEventHandler.sqf | 39 ------------------- .../fnc_removeCameraEventHandler.sqf | 34 ---------------- 4 files changed, 86 deletions(-) delete mode 100644 addons/common/functions/fnc_addCameraEventHandler.sqf delete mode 100644 addons/common/functions/fnc_removeCameraEventHandler.sqf diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 5dc0e6384a..bd74ac510a 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -53,17 +53,6 @@ class RscTitles { }; }; - class ACE_EventHandlerHelper: ACE_Rsc_Display_Base { - idd = -1; - class controls { - class CameraView: RscMapControl { - onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};"; - idc = -1; - w = 0; - h = 0; - }; - }; - }; class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base { class controls { class MapMarkerCreated: RscMapControl { diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 04411ce7e8..39132e0df5 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -6,7 +6,6 @@ ADDON = false; // ACE Common Function PREP(addActionEventHandler); PREP(addActionMenuEventHandler); -PREP(addCameraEventHandler); PREP(addCanInteractWithCondition); PREP(addLineToDebugDraw); PREP(addMapMarkerCreatedEventHandler); @@ -147,7 +146,6 @@ PREP(readSettingFromModule); PREP(receiveRequest); PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); -PREP(removeCameraEventHandler); PREP(removeCanInteractWithCondition); PREP(removeMapMarkerCreatedEventHandler); PREP(removeScrollWheelEventHandler); diff --git a/addons/common/functions/fnc_addCameraEventHandler.sqf b/addons/common/functions/fnc_addCameraEventHandler.sqf deleted file mode 100644 index 45fdb3bdca..0000000000 --- a/addons/common/functions/fnc_addCameraEventHandler.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: commy2 - * - * Add a camera view event handler. The event script is called when the camera view changes. - * The argument of the called function is stored in the _this variable and has as first element the new camera mode. Possible arguments are ["INTERNAL"], ["EXTERNAL"], ["GUNNER"] and ["GROUP"]. - * - * Argument: - * 0: Code to execute (Code or String) - * - * Return value: - * ID of the event script (used to remove it later). - */ -#include "script_component.hpp" - -private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; - -_statement = _this select 0; - -if (typeName _statement == "STRING") then { - _statement = compile _statement; -}; - -_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; - -_id = (_actionsVar select 0) + 1; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -if (_id == 0) then { - uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView]; - (QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"]; -}; - -_actionIDs pushBack _id; -_actions pushBack _statement; - -missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]]; - -_id diff --git a/addons/common/functions/fnc_removeCameraEventHandler.sqf b/addons/common/functions/fnc_removeCameraEventHandler.sqf deleted file mode 100644 index 0fe8953078..0000000000 --- a/addons/common/functions/fnc_removeCameraEventHandler.sqf +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Author: commy2 - * - * Remove a camera view event handler. - * - * Argument: - * 0: ID of the event handler (Number) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; - -_id = _this select 0; - -_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; - -_currentId = _actionsVar select 0; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_id = _actionIDs find _id; - -if (_id == -1) exitWith {}; - -_actionIDs set [_id, -1]; -_actionIDs = _actionIDs - [-1]; - -_actions set [_id, []];//{} -_actions = _actions - [[]];//[{}] - -missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]];