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

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 + * 1: The target + * 2: Selection name + * 3: ACE_Medical_Treatments Classname + * + * ReturnValue: + * Can Treat + * + * Public: No + */ + +#include "script_component.hpp" + +#define MAX_DURATION_CACHE 2 + +// parameters, function, namespace, uid +[_this, DFUNC(canTreat), _this select 0, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,cachedCall); 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..5e763822db --- /dev/null +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -0,0 +1,32 @@ +/* + * 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/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_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]; +}; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index fc8522b93c..68bd98a153 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -111,8 +111,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 { @@ -131,11 +132,10 @@ 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; _bloodPressureH = _bloodPressure select 1; 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 { 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); diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf new file mode 100644 index 0000000000..c903417dfc --- /dev/null +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -0,0 +1,51 @@ +/* + * 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 { + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_packingBandage"; + _unit addItem "ACE_morphine"; + _unit addItem "ACE_tourniquet"; + } else { + _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 "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 "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_bloodIV"; + _unit addItemToBackpack "ACE_bloodIV"; + }; +}; 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]; }; diff --git a/addons/medical/ui/icons/autoInjector.paa b/addons/medical/ui/icons/autoInjector.paa new file mode 100644 index 0000000000..f1707d2b82 Binary files /dev/null and b/addons/medical/ui/icons/autoInjector.paa differ diff --git a/addons/medical/ui/icons/bandage.paa b/addons/medical/ui/icons/bandage.paa new file mode 100644 index 0000000000..e8de331ae3 Binary files /dev/null and b/addons/medical/ui/icons/bandage.paa differ diff --git a/addons/medical/ui/icons/bodybag.paa b/addons/medical/ui/icons/bodybag.paa new file mode 100644 index 0000000000..ec35ad0796 Binary files /dev/null and b/addons/medical/ui/icons/bodybag.paa differ diff --git a/addons/medical/ui/icons/iv.paa b/addons/medical/ui/icons/iv.paa new file mode 100644 index 0000000000..ef7048dfd1 Binary files /dev/null and b/addons/medical/ui/icons/iv.paa differ diff --git a/addons/medical/ui/icons/medical_cross.paa b/addons/medical/ui/icons/medical_cross.paa new file mode 100644 index 0000000000..656ebc000b Binary files /dev/null and b/addons/medical/ui/icons/medical_cross.paa differ diff --git a/addons/medical/ui/icons/packingBandage.paa b/addons/medical/ui/icons/packingBandage.paa new file mode 100644 index 0000000000..0fb1a3650c Binary files /dev/null and b/addons/medical/ui/icons/packingBandage.paa differ diff --git a/addons/medical/ui/icons/surgicalKit.paa b/addons/medical/ui/icons/surgicalKit.paa new file mode 100644 index 0000000000..212c56c78c Binary files /dev/null and b/addons/medical/ui/icons/surgicalKit.paa differ diff --git a/addons/medical/ui/icons/tourniquet.paa b/addons/medical/ui/icons/tourniquet.paa new file mode 100644 index 0000000000..6497420e54 Binary files /dev/null and b/addons/medical/ui/icons/tourniquet.paa differ diff --git a/addons/medical/ui/icons/triageCard.paa b/addons/medical/ui/icons/triageCard.paa new file mode 100644 index 0000000000..0a1865fc9f Binary files /dev/null and b/addons/medical/ui/icons/triageCard.paa differ 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 0000000000..a713f43e2d Binary files /dev/null and b/addons/medical/ui/triage_card_corner_l.paa differ 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 0000000000..5d095321b9 Binary files /dev/null and b/addons/medical/ui/triage_card_corner_r.paa differ diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp new file mode 100644 index 0000000000..f1b98f1e2d --- /dev/null +++ b/addons/medical/ui/triagecard.hpp @@ -0,0 +1,191 @@ +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 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; + 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 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); };