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 89daf840f6a9e0226cf673ea3f022b0f367a05c9 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 20:08:52 +0100 Subject: [PATCH 13/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 1d4249a82587c355aeba805bcb533155f306fe6a Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Mar 2015 21:51:27 +0100 Subject: [PATCH 14/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 15/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 f6f910fb8a3e9739d4255f3aca01effb804fd432 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Sat, 21 Mar 2015 21:59:08 +0100 Subject: [PATCH 16/22] Replace vanilla items with ours. --- addons/medical/CfgEventHandlers.hpp | 8 ++++++++ addons/medical/XEH_preInit.sqf | 1 + addons/medical/functions/fnc_init.sqf | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp index 9600675e46..6330819daa 100644 --- a/addons/medical/CfgEventHandlers.hpp +++ b/addons/medical/CfgEventHandlers.hpp @@ -42,3 +42,11 @@ class Extended_Local_EventHandlers { }; }; }; + +class Extended_Take_EventHandlers { + class CAManBase { + class ADDON { + take = QUOTE(call FUNC(itemCheck)); + }; + }; +}; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c6ddbf0783..bb78c26cef 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -46,6 +46,7 @@ PREP(init); PREP(isInMedicalFacility); PREP(isMedic); PREP(isMedicalVehicle); +PREP(itemCheck); PREP(onMedicationUsage); PREP(onWoundUpdateRequest); PREP(onPropagateWound); diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index c58cccedb4..dfd27cdd6f 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -74,3 +74,8 @@ _logs = _unit getvariable [QGVAR(allLogs), []]; _unit setvariable [_x, nil, true]; } foreach _logs; _unit setvariable [QGVAR(allLogs), [], true]; + +// items +[{ + _this call FUNC(itemCheck); +}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute); From 58237751b09f74be108019e96639799325ad718c Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Sat, 21 Mar 2015 22:01:20 +0100 Subject: [PATCH 17/22] Woopsie --- addons/medical/functions/fnc_itemCheck.sqf | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 addons/medical/functions/fnc_itemCheck.sqf diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf new file mode 100644 index 0000000000..b66c3bc52a --- /dev/null +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -0,0 +1,42 @@ +/* + * Author: KoffeinFlummi + * Replaces vanilla items with ACE ones. + * + * Arguments: + * 0: The unit + * + * ReturnValue: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_unit"]; +_unit = _this select 0; + +while {({_x == "FirstAidKit"} count items _unit) > 0} do { + _unit removeItem "FirstAidKit"; + if (GVAR(level) >= 2) then { + // TODO + } else { + _unit addItem QGVAR(fieldDressing); + _unit addItem QGVAR(fieldDressing); + _unit addItem QGVAR(morphine); + }; +}; + +while {({_x == "Medikit"} count items _unit) > 0} do { + _unit removeItem "Medikit"; + if (GVAR(level) >= 2) then { + // TODO + } else { + _unit addItemToBackpack QGVAR(epinephrine); + _unit addItemToBackpack QGVAR(epinephrine); + _unit addItemToBackpack QGVAR(epinephrine); + _unit addItemToBackpack QGVAR(epinephrine); + _unit addItemToBackpack QGVAR(bloodIV); + _unit addItemToBackpack QGVAR(bloodIV); + }; +}; From b74eb550b0b02cb762248bd11a31829e330455eb Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 22:08:42 +0100 Subject: [PATCH 18/22] Added advanced items --- addons/medical/functions/fnc_itemCheck.sqf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf index b66c3bc52a..ca91fac77e 100644 --- a/addons/medical/functions/fnc_itemCheck.sqf +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -19,7 +19,10 @@ _unit = _this select 0; while {({_x == "FirstAidKit"} count items _unit) > 0} do { _unit removeItem "FirstAidKit"; if (GVAR(level) >= 2) then { - // TODO + _unit addItem QGVAR(fieldDressing); + _unit addItem QGVAR(packingBandage); + _unit addItem QGVAR(morphine); + _unit addItem QGVAR(tourniquet); } else { _unit addItem QGVAR(fieldDressing); _unit addItem QGVAR(fieldDressing); @@ -30,7 +33,13 @@ while {({_x == "FirstAidKit"} count items _unit) > 0} do { while {({_x == "Medikit"} count items _unit) > 0} do { _unit removeItem "Medikit"; if (GVAR(level) >= 2) then { - // TODO + _unit addItemToBackpack QGVAR(fieldDressing); + _unit addItemToBackpack QGVAR(packingBandage); + _unit addItemToBackpack QGVAR(packingBandage); + _unit addItemToBackpack QGVAR(epinephrine); + _unit addItemToBackpack QGVAR(morphine); + _unit addItemToBackpack QGVAR(salineIV_250); + _unit addItemToBackpack QGVAR(tourniquet); } else { _unit addItemToBackpack QGVAR(epinephrine); _unit addItemToBackpack QGVAR(epinephrine); From 1bf13cea3419b56f94d58180eff3d0298a2654fd Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Mar 2015 22:13:36 +0100 Subject: [PATCH 19/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]]; From 174378c585918c2046ec02a91c45ee528b2e7648 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Sat, 21 Mar 2015 22:15:19 +0100 Subject: [PATCH 20/22] Fix indentation in README --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7bfec88dff..83950e8236 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@

- +

- - ACE version - - - ACE download - - - ACE issues - - - ACE license - + + ACE version + + + ACE download + + + ACE issues + + + ACE license +

Requires the latest version of CBA A3 | BIF thread

From a7d8914884699b608533841214b5abe889860fd0 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 21 Mar 2015 22:22:28 +0100 Subject: [PATCH 21/22] Removed GVAR/QGVAR from items --- addons/medical/ACE_Medical_Treatments.hpp | 48 ++--- addons/medical/CfgVehicles.hpp | 168 +++++++++--------- addons/medical/CfgWeapons.hpp | 42 ++--- addons/medical/config.cpp | 4 +- .../functions/fnc_actionRemoveTourniquet.sqf | 2 +- addons/medical/functions/fnc_itemCheck.sqf | 40 ++--- 6 files changed, 152 insertions(+), 152 deletions(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 24a638ac5f..28a9b82d8c 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -9,7 +9,7 @@ class ACE_Medical_Actions { requiredMedic = 0; treatmentTime = 5; treatmentTimeSelfCoef = 1; - items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}}; + items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}}; condition = ""; itemConsumed = 1; @@ -27,7 +27,7 @@ class ACE_Medical_Actions { displayName = "$STR_ACE_Medical_Inject_Morphine"; displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine"; treatmentTime = 2; - items[] = {QGVAR(morphine)}; + items[] = {"ACE_morphine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; @@ -36,7 +36,7 @@ class ACE_Medical_Actions { displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine"; requiredMedic = 1; treatmentTime = 3; - items[] = {QGVAR(epinephrine)}; + items[] = {"ACE_epinephrine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; @@ -45,7 +45,7 @@ class ACE_Medical_Actions { displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood"; requiredMedic = 1; treatmentTime = 20; - items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}}; + items[] = {{"ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"}}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; @@ -60,7 +60,7 @@ class ACE_Medical_Actions { // The time it takes for a treatment action to complete. Time is in seconds. treatmentTime = 5; // Item required for the action. Leave empty for no item required. - items[] = {QGVAR(fieldDressing)}; + items[] = {"ACE_fieldDressing"}; condition = ""; // Callbacks callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage)); @@ -74,67 +74,67 @@ class ACE_Medical_Actions { animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; }; class PackingBandage: fieldDressing { - items[] = {QGVAR(packingBandage)}; + items[] = {"ACE_packingBandage"}; }; class ElasticBandage: fieldDressing { - items[] = {QGVAR(elasticBandage)}; + items[] = {"ACE_elasticBandage"}; }; class QuikClot: fieldDressing { - items[] = {QGVAR(quikClot)}; + items[] = {"ACE_quikclot"}; }; class Tourniquet: fieldDressing { - items[] = {QGVAR(tourniquet)}; + items[] = {"ACE_tourniquet"}; treatmentTime = 6; callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo))); }; class Morphine: fieldDressing { - items[] = {QGVAR(morphine)}; + items[] = {"ACE_morphine"}; treatmentTime = 3; callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class Atropine: Morphine { - items[] = {QGVAR(atropine)}; + items[] = {"ACE_atropine"}; }; class Epinephrine: Morphine { - items[] = {QGVAR(epinephrine)}; + items[] = {"ACE_epinephrine"}; }; class BloodIV: fieldDressing { - items[] = {QGVAR(bloodIV)}; + items[] = {"ACE_bloodIV"}; requiredMedic = 1; treatmentTime = 7; callbackSuccess = QUOTE(DFUNC(treatmentIV)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class BloodIV_500: BloodIV { - items[] = {QGVAR(bloodIV_500)}; + items[] = {"ACE_bloodIV_500"}; }; class BloodIV_250: BloodIV { - items[] = {QGVAR(bloodIV_250)}; + items[] = {"ACE_bloodIV_250"}; }; class PlasmaIV: BloodIV { - items[] = {QGVAR(plasmaIV)}; + items[] = {"ACE_plasmaIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class PlasmaIV_500: PlasmaIV { - items[] = {QGVAR(plasmaIV_500)}; + items[] = {"ACE_plasmaIV_500"}; }; class PlasmaIV_250: PlasmaIV { - items[] = {QGVAR(plasmaIV_250)}; + items[] = {"ACE_plasmaIV_250"}; }; class SalineIV: BloodIV { - items[] = {QGVAR(salineIV)}; + items[] = {"ACE_salineIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class SalineIV_500: SalineIV { - items[] = {QGVAR(salineIV_500)}; + items[] = {"ACE_salineIV_500"}; }; class SalineIV_250: SalineIV { - items[] = {QGVAR(salineIV_250)}; + items[] = {"ACE_salineIV_250"}; }; class SurgicalKit: fieldDressing { - items[] = {QGVAR(surgicalKit)}; + items[] = {"ACE_surgicalKit"}; treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"}; requiredMedic = 2; treatmentTime = 15; @@ -143,7 +143,7 @@ class ACE_Medical_Actions { animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class PersonalAidKit: fieldDressing { - items[] = {QGVAR(personalAidKit)}; + items[] = {"ACE_personalAidKit"}; treatmentLocations[] = {"All"}; requiredMedic = 1; treatmentTime = 15; @@ -191,7 +191,7 @@ class ACE_Medical_Actions { treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 7.5; - items[] = {QGVAR(bodyBag)}; + items[] = {"ACE_bodyBag"}; condition = "!alive (_this select 1);"; callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag)); callbackFailure = ""; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index ad9302a2e8..e8ec12a125 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -1128,7 +1128,7 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BODYBAG_DISPLAY; }; class Item_Base_F; - class GVAR(fieldDressingItem): Item_Base_F { + class ACE_fieldDressingItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY; @@ -1136,14 +1136,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(fieldDressing) + class ACE_fieldDressing { - name = QGVAR(fieldDressing); + name = "ACE_fieldDressing"; count = 1; }; }; }; - class GVAR(packingBandageItem): Item_Base_F { + class ACE_packingBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY; @@ -1151,14 +1151,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(packingBandage) + class ACE_packingBandage { - name = QGVAR(packingBandage); + name = "ACE_packingBandage"; count = 1; }; }; }; - class GVAR(elasticBandageItem): Item_Base_F { + class ACE_elasticBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY; @@ -1166,14 +1166,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(elasticBandage) + class ACE_elasticBandage { - name = QGVAR(elasticBandage); + name = "ACE_elasticBandage"; count = 1; }; }; }; - class GVAR(tourniquetItem): Item_Base_F { + class ACE_tourniquetItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY; @@ -1181,14 +1181,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(tourniquet) + class ACE_tourniquet { - name = QGVAR(tourniquet); + name = "ACE_tourniquet"; count = 1; }; }; }; - class GVAR(morphineItem): Item_Base_F { + class ACE_morphineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY; @@ -1196,14 +1196,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(morphine) + class ACE_morphine { - name = QGVAR(morphine); + name = "ACE_morphine"; count = 1; }; }; }; - class GVAR(atropineItem): Item_Base_F { + class ACE_atropineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY; @@ -1211,14 +1211,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(atropine) + class ACE_atropine { - name = QGVAR(atropine); + name = "ACE_atropine"; count = 1; }; }; }; - class GVAR(epinephrineItem): Item_Base_F { + class ACE_epinephrineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY; @@ -1226,14 +1226,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(epinephrine) + class ACE_epinephrine { - name = QGVAR(epinephrine); + name = "ACE_epinephrine"; count = 1; }; }; }; - class GVAR(plasmaIVItem): Item_Base_F { + class ACE_plasmaIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_PLASMA_IV; @@ -1241,15 +1241,15 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(plasmaIV) + class ACE_plasmaIV { - name = QGVAR(plasmaIV); + name = "ACE_plasmaIV"; count = 1; }; }; }; - class GVAR(bloodIVItem): Item_Base_F { + class ACE_bloodIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BLOOD_IV; @@ -1257,14 +1257,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(bloodIV) + class ACE_bloodIV { - name = QGVAR(bloodIV); + name = "ACE_bloodIV"; count = 1; }; }; }; - class GVAR(salineIVItem): Item_Base_F { + class ACE_salineIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_SALINE_IV; @@ -1272,14 +1272,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(salineIV) + class ACE_salineIV { - name = QGVAR(salineIV); + name = "ACE_salineIV"; count = 1; }; }; }; - class GVAR(quikClotItem): Item_Base_F { + class ACE_quikClotItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY; @@ -1287,14 +1287,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(quikClot) + class ACE_quikClot { - name = QGVAR(quikClot); + name = "ACE_quikclot"; count = 1; }; }; }; - class GVAR(personalAidKitItem): Item_Base_F { + class ACE_personalAidKitItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY; @@ -1302,14 +1302,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(personalAidKit) + class ACE_personalAidKit { - name = QGVAR(personalAidKit); + name = "ACE_personalAidKit"; count = 1; }; }; }; - class GVAR(surgicalKitItem): Item_Base_F { + class ACE_surgicalKitItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; @@ -1317,14 +1317,14 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(surgicalKit) + class ACE_surgicalKit { - name = QGVAR(surgicalKit); + name = "ACE_surgicalKit"; count = 1; }; }; }; - class GVAR(bodyBagItem): Item_Base_F { + class ACE_bodyBagItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BODYBAG_DISPLAY; @@ -1332,100 +1332,100 @@ class CfgVehicles { vehicleClass = "Items"; class TransportItems { - class GVAR(bodyBag) + class ACE_bodyBag { - name = QGVAR(bodyBag); + name = "ACE_bodyBag"; count = 1; }; }; }; class NATO_Box_Base; - class GVAR(supplyCrate): NATO_Box_Base { + class ACE_medicalSupplyCrate: NATO_Box_Base { scope = 2; accuracy = 1000; - displayName = "Medical Supply Crate [ACE]"; + displayName = "[ACE] Medical Supply Crate"; model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F"; author = "Glowbal"; class TransportItems { - class GVAR(fieldDressing) { - name = QGVAR(fieldDressing); + class ACE_fieldDressing { + name = "ACE_fieldDressing"; count = 25; }; - class GVAR(packingBandage) { - name = QGVAR(packingBandage); + class ACE_packingBandage { + name = "ACE_packingBandage"; count = 25; }; - class GVAR(elasticBandage) { - name = QGVAR(elasticBandage); + class ACE_elasticBandage { + name = "ACE_elasticBandage"; count = 25; }; - class GVAR(tourniquet) { - name = QGVAR(tourniquet); + class ACE_tourniquet { + name = "ACE_tourniquet"; count = 15; }; - class GVAR(morphine) { - name = QGVAR(morphine); + class ACE_morphine { + name = "ACE_morphine"; count = 15; }; - class GVAR(atropine) { - name = QGVAR(atropine); + class ACE_atropine { + name = "ACE_atropine"; count = 15; }; - class GVAR(epinephrine) { - name = QGVAR(epinephrine); + class ACE_epinephrine { + name = "ACE_epinephrine"; count = 15; }; - class GVAR(plasmaIV) { - name = QGVAR(plasmaIV); + class ACE_plasmaIV { + name = "ACE_plasmaIV"; count = 7; }; - class GVAR(plasmaIV_500) { - name = QGVAR(plasmaIV_500); + class ACE_plasmaIV_500 { + name = "ACE_plasmaIV_500"; count = 7; }; - class GVAR(plasmaIV_250) { - name = QGVAR(plasmaIV_250); + class ACE_plasmaIV_250 { + name = "ACE_plasmaIV_250"; count = 7; }; - class GVAR(salineIV) { - name = QGVAR(salineIV); + class ACE_salineIV { + name = "ACE_salineIV"; count = 7; }; - class GVAR(salineIV_500) { - name = QGVAR(salineIV_500); + class ACE_salineIV_500 { + name = "ACE_salineIV_500"; count = 7; }; - class GVAR(salineIV_250) { - name = QGVAR(salineIV_250); + class ACE_salineIV_250 { + name = "ACE_salineIV_250"; count = 7; }; - class GVAR(bloodIV) { - name = QGVAR(bloodIV); + class ACE_bloodIV { + name = "ACE_bloodIV"; count = 7; }; - class GVAR(bloodIV_500) { - name = QGVAR(bloodIV_500); + class ACE_bloodIV_500 { + name = "ACE_bloodIV_500"; count = 7; }; - class GVAR(bloodIV_250) { - name = QGVAR(bloodIV_250); + class ACE_bloodIV_250 { + name = "ACE_bloodIV_250"; count = 7; }; - class GVAR(quikClot) { - name = QGVAR(quikClot); + class ACE_quikClot { + name = "ACE_quikclot"; count = 20; }; - class GVAR(personalAidKit) { - name = QGVAR(personalAidKit); + class ACE_personalAidKit { + name = "ACE_personalAidKit"; count = 3; }; - class GVAR(surgicalKit) { - name = QGVAR(surgicalKit); + class ACE_surgicalKit { + name = "ACE_surgicalKit"; count = 2; }; - class GVAR(bodyBag) { - name = QGVAR(bodyBag); + class ACE_bodyBag { + name = "ACE_bodyBag"; count = 5; }; }; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 81d9491d78..3968e07a60 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class InventoryItem_Base_F; class InventoryFirstAidKitItem_Base_F; class MedikitItem; - + // ITEMS class FirstAidKit: ItemCore { type = 0; @@ -23,7 +23,7 @@ class CfgWeapons { // @todo localize class ACE_ItemCore; - class GVAR(fieldDressing): ACE_ItemCore { + class ACE_fieldDressing: ACE_ItemCore { scope = 2; model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa)); @@ -35,7 +35,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(packingBandage): ItemCore { + class ACE_packingBandage: ItemCore { scope = 2; value = 1; count = 1; @@ -50,7 +50,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(elasticBandage): ItemCore { + class ACE_elasticBandage: ItemCore { scope = 2; value = 1; count = 1; @@ -65,7 +65,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(tourniquet): ItemCore { + class ACE_tourniquet: ItemCore { scope = 2; value = 1; count = 1; @@ -80,7 +80,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(morphine): ItemCore { + class ACE_morphine: ItemCore { scope = 2; value = 1; count = 1; @@ -95,7 +95,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(atropine): ItemCore { + class ACE_atropine: ItemCore { scope = 2; value = 1; count = 1; @@ -110,7 +110,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(epinephrine): ItemCore { + class ACE_epinephrine: ItemCore { scope = 2; value = 1; count = 1; @@ -125,7 +125,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(plasmaIV): ItemCore { + class ACE_plasmaIV: ItemCore { scope = 2; value = 1; count = 1; @@ -138,21 +138,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(plasmaIV_500): GVAR(plasmaIV) { + class ACE_plasmaIV_500: ACE_plasmaIV) { displayName = $STR_ACE_MEDICAL_PLASMA_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class GVAR(plasmaIV_250): GVAR(plasmaIV) { + class ACE_plasmaIV_250: ACE_plasmaIV) { displayName = $STR_ACE_MEDICAL_PLASMA_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(bloodIV): ItemCore { + class ACE_bloodIV: ItemCore { scope = 2; value = 1; count = 1; @@ -166,21 +166,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(bloodIV_500): GVAR(bloodIV) { + class ACE_bloodIV_500: ACE_bloodIV) { displayName = $STR_ACE_MEDICAL_BLOOD_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class GVAR(bloodIV_250): GVAR(bloodIV) { + class ACE_bloodIV_250: ACE_bloodIV) { displayName = $STR_ACE_MEDICAL_BLOOD_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(salineIV): ItemCore { + class ACE_salineIV: ItemCore { scope = 2; value = 1; count = 1; @@ -193,21 +193,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(salineIV_500): GVAR(salineIV) { + class ACE_salineIV_500: ACE_salineIV) { displayName = $STR_ACE_MEDICAL_SALINE_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(salineIV_250): GVAR(salineIV) { + class ACE_salineIV_250: ACE_salineIV) { displayName = $STR_ACE_MEDICAL_SALINE_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(quikclot): ItemCore { + class ACE_quikclot: ItemCore { scope = 2; value = 1; count = 1; @@ -221,7 +221,7 @@ class CfgWeapons { type = 201; }; }; - class GVAR(personalAidKit): ItemCore { + class ACE_personalAidKit: ItemCore { scope = 2; value = 1; count = 1; @@ -236,7 +236,7 @@ class CfgWeapons { type = 201; }; }; - class GVAR(surgicalKit): ItemCore { + class ACE_surgicalKit: ItemCore { scope=2; displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; model = QUOTE(PATHTOF(data\surgical_kit.p3d)); @@ -248,7 +248,7 @@ class CfgWeapons { type = 201; }; }; - class GVAR(bodyBag): ItemCore { + class ACE_bodyBag: ItemCore { scope=2; displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY; model = QUOTE(PATHTOF(data\bodybagItem.p3d)); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 3e8aaa8d55..42fcffd012 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -2,8 +2,8 @@ class CfgPatches { class ADDON { - units[] = {QGVAR(fieldDressingItem), QGVAR(packingBandageItem), QGVAR(elasticBandageItem), QGVAR(tourniquetItem), QGVAR(morphineItem), QGVAR(atropineItem), QGVAR(epinephrineItem), QGVAR(plasmaIVItem), QGVAR(bloodIVItem), QGVAR(salineIVItem), QGVAR(quikclotItem), QGVAR(personalAidKitItem), QGVAR(surgicalKitItem), QGVAR(bodyBagItem)}; - weapons[] = {QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(tourniquet), QGVAR(morphine), QGVAR(atropine), QGVAR(epinephrine), QGVAR(plasmaIV), QGVAR(plasmaIV_500), QGVAR(plasmaIV_250), QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250), QGVAR(salineIV), QGVAR(salineIV_500), QGVAR(salineIV_250), QGVAR(quikclot), QGVAR(personalAidKit), QGVAR(surgicalKit), QGVAR(bodyBag)}; + units[] = {"ACE_medicalSupplyCrate", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem"}; + weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {ace_common, ace_interaction}; author[] = {"Glowbal", "KoffienFlummi"}; diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index 2944c2f6e2..75d7b67daa 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -36,6 +36,6 @@ _tourniquets set[_part, 0]; _target setvariable [QGVAR(tourniquets), _tourniquets, true]; // Adding the tourniquet item to the caller -_caller addItem QGVAR(tourniquet); +_caller addItem "ACE_tourniquet"; // "AinvPknlMstpSlayWrflDnon_medic diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf index ca91fac77e..c903417dfc 100644 --- a/addons/medical/functions/fnc_itemCheck.sqf +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -19,33 +19,33 @@ _unit = _this select 0; while {({_x == "FirstAidKit"} count items _unit) > 0} do { _unit removeItem "FirstAidKit"; if (GVAR(level) >= 2) then { - _unit addItem QGVAR(fieldDressing); - _unit addItem QGVAR(packingBandage); - _unit addItem QGVAR(morphine); - _unit addItem QGVAR(tourniquet); + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_packingBandage"; + _unit addItem "ACE_morphine"; + _unit addItem "ACE_tourniquet"; } else { - _unit addItem QGVAR(fieldDressing); - _unit addItem QGVAR(fieldDressing); - _unit addItem QGVAR(morphine); + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_morphine"; }; }; while {({_x == "Medikit"} count items _unit) > 0} do { _unit removeItem "Medikit"; if (GVAR(level) >= 2) then { - _unit addItemToBackpack QGVAR(fieldDressing); - _unit addItemToBackpack QGVAR(packingBandage); - _unit addItemToBackpack QGVAR(packingBandage); - _unit addItemToBackpack QGVAR(epinephrine); - _unit addItemToBackpack QGVAR(morphine); - _unit addItemToBackpack QGVAR(salineIV_250); - _unit addItemToBackpack QGVAR(tourniquet); + _unit addItemToBackpack "ACE_fieldDressing"; + _unit addItemToBackpack "ACE_packingBandage"; + _unit addItemToBackpack "ACE_packingBandage"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_morphine"; + _unit addItemToBackpack "ACE_salineIV_250"; + _unit addItemToBackpack "ACE_tourniquet"; } else { - _unit addItemToBackpack QGVAR(epinephrine); - _unit addItemToBackpack QGVAR(epinephrine); - _unit addItemToBackpack QGVAR(epinephrine); - _unit addItemToBackpack QGVAR(epinephrine); - _unit addItemToBackpack QGVAR(bloodIV); - _unit addItemToBackpack QGVAR(bloodIV); + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_bloodIV"; + _unit addItemToBackpack "ACE_bloodIV"; }; }; From 3a6995fbec5416430aa6c67685e36316663896f5 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 21 Mar 2015 18:07:50 -0500 Subject: [PATCH 22/22] Cleanup medical Item classnames --- addons/medical/CfgWeapons.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 3968e07a60..d0b1b786ed 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -138,14 +138,14 @@ class CfgWeapons { type = 201; }; }; - class ACE_plasmaIV_500: ACE_plasmaIV) { + class ACE_plasmaIV_500: ACE_plasmaIV { displayName = $STR_ACE_MEDICAL_PLASMA_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class ACE_plasmaIV_250: ACE_plasmaIV) { + class ACE_plasmaIV_250: ACE_plasmaIV { displayName = $STR_ACE_MEDICAL_PLASMA_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; @@ -166,14 +166,14 @@ class CfgWeapons { type = 201; }; }; - class ACE_bloodIV_500: ACE_bloodIV) { + class ACE_bloodIV_500: ACE_bloodIV { displayName = $STR_ACE_MEDICAL_BLOOD_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class ACE_bloodIV_250: ACE_bloodIV) { + class ACE_bloodIV_250: ACE_bloodIV { displayName = $STR_ACE_MEDICAL_BLOOD_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; @@ -193,14 +193,14 @@ class CfgWeapons { type = 201; }; }; - class ACE_salineIV_500: ACE_salineIV) { + class ACE_salineIV_500: ACE_salineIV { displayName = $STR_ACE_MEDICAL_SALINE_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class ACE_salineIV_250: ACE_salineIV) { + class ACE_salineIV_250: ACE_salineIV { displayName = $STR_ACE_MEDICAL_SALINE_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; @@ -243,7 +243,7 @@ class CfgWeapons { picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa)); descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT; descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE; - class ItemInfo: InventoryItem_Base_F { + class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; };