diff --git a/README.md b/README.md index 7bfec88dff..83950e8236 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@
- +
- - - - - - - - - - - - + + + + + + + + + + + +
Requires the latest version of CBA A3 | BIF thread
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 de848941fd..39132e0df5 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -6,9 +6,7 @@ ADDON = false; // ACE Common Function PREP(addActionEventHandler); PREP(addActionMenuEventHandler); -PREP(addCameraEventHandler); PREP(addCanInteractWithCondition); -PREP(addCustomEventHandler); PREP(addLineToDebugDraw); PREP(addMapMarkerCreatedEventHandler); PREP(addScrollWheelEventHandler); @@ -21,8 +19,6 @@ PREP(beingCarried); PREP(binarizeNumber); PREP(blurScreen); PREP(cachedCall); -PREP(callCustomEventHandlers); -PREP(callCustomEventHandlersGlobal); PREP(canGetInPosition); PREP(canInteract); PREP(canInteractWith); @@ -150,9 +146,7 @@ PREP(readSettingFromModule); PREP(receiveRequest); PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); -PREP(removeCameraEventHandler); PREP(removeCanInteractWithCondition); -PREP(removeCustomEventHandler); PREP(removeMapMarkerCreatedEventHandler); PREP(removeScrollWheelEventHandler); PREP(removeSpecificMagazine); @@ -258,8 +252,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_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_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_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]]; 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/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; \ 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/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/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index d347e28c66..5b31f86a67 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -349,56 +349,63 @@ 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"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat)); + 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; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment)); }; }; @@ -413,316 +420,343 @@ class CfgVehicles { priority = 2; hotkey = "M"; enableInside = 1; + icon = PATHTOF(UI\icons\medical_cross.paa); 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; enableInside = 1; + 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"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreat)); + 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; 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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 DFUNC(canTreat)); - 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)); - 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)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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"; 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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(canTreat)); + 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)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; 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; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat)); + 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; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; @@ -730,15 +764,18 @@ 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; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreat)); + 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; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; @@ -746,111 +783,119 @@ 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; 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; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreat)); + 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; hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; @@ -858,96 +903,101 @@ 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 DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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(canTreat)); + 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"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + 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 DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -1128,7 +1178,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 +1186,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 +1201,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 +1216,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 +1231,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 +1246,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 +1261,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 +1276,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 +1291,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 +1307,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 +1322,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 +1337,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 +1352,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 +1367,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 +1382,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..d0b1b786ed 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,19 +236,19 @@ 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)); 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; }; }; - 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/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index bddd1893d8..ee73d28318 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; +["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler; // Initialize all effects _fnc_createEffect = { diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 45662898df..bc63a65135 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -19,6 +19,7 @@ PREP(addUnconsciousCondition); PREP(addUnloadPatientActions); PREP(canAccessMedicalEquipment); PREP(canTreat); +PREP(canTreatCached); PREP(determineIfFatal); PREP(getBloodLoss); PREP(getBloodPressure); @@ -47,6 +48,7 @@ PREP(init); PREP(isInMedicalFacility); PREP(isMedic); PREP(isMedicalVehicle); +PREP(itemCheck); PREP(onMedicationUsage); PREP(onWoundUpdateRequest); PREP(onPropagateWound); @@ -80,6 +82,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..ab0f83fa9e 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"}; @@ -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_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_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf new file mode 100644 index 0000000000..cdc4c10385 --- /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