From f1754678139cdafef12518627a5ae5f8454eae31 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 21:08:13 +0100 Subject: [PATCH 1/8] fixed #241 and #228 --- addons/medical/CfgVehicles.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 6f26d1071f..bb22f8aec3 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -967,8 +967,8 @@ class CfgVehicles { }; class PersonalAidKit: fieldDressing { displayName = "Use Personal Aid Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); + condition = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(treatment)); icon = ""; }; class CPR: fieldDressing { @@ -1057,7 +1057,7 @@ class CfgVehicles { icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "#STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; 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)); }; @@ -1187,7 +1187,7 @@ class CfgVehicles { icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "#STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; 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)); }; @@ -1319,7 +1319,7 @@ class CfgVehicles { icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "#STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; 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)); }; @@ -1439,7 +1439,7 @@ class CfgVehicles { icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "#STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; 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)); }; From 53e7fe1ba5a13db9b4bc46a62bbaf5aa189f8557 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 21:08:45 +0100 Subject: [PATCH 2/8] fixed #227 --- .../fnc_actionCheckBloodPressureLocal.sqf | 2 +- .../functions/fnc_actionCheckPulseLocal.sqf | 2 +- .../functions/fnc_treatmentAdvanced_bandage.sqf | 2 +- .../functions/fnc_treatmentAdvanced_medication.sqf | 2 +- addons/medical/functions/fnc_treatmentIV.sqf | 2 +- addons/medical/functions/fnc_treatmentIVLocal.sqf | 2 +- .../medical/functions/fnc_treatmentTourniquet.sqf | 2 +- addons/medical/stringtable.xml | 14 ++++++++++++++ 8 files changed, 21 insertions(+), 7 deletions(-) diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index f2d01573f0..cd66556609 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -56,5 +56,5 @@ if ([_caller] call FUNC(isMedic)) then { ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_target,"examine", format["%1 checked Blood Pressure: %2", [_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); + [_target,"examine", "%1 checked Blood Pressure: %2", [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index df5966849c..d7b46a38fc 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -49,5 +49,5 @@ if (_heartRate > 1.0) then { ["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); + [_unit,"examine","%1 checked Heart Rate: %2",[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 91d7678f93..6707c8d109 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -36,7 +36,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { }foreach _items;*/ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; - [_target, "activity", "STR_ACE_HAS_BANDAGED_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index 38f522bc7d..f9a5b2f9d9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -35,7 +35,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { }foreach _items; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; - [_target, "activity", "STR_ACE_HAS_MEDICATION_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog); }; true; diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index 2581c1f0d2..098e134be7 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -31,5 +31,5 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { [[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; [_target, _removeItem] call FUNC(addToTriageCard); - [_target, "activity", "STR_ACE_HAS_GIVEN_IV_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 52b83e1d0f..6dd8cbf979 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -35,7 +35,7 @@ _target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdde if !(_varName in GVAR(IVBags)) then { GVAR(IVBags) pushback _varName; - publicVariable GVAR(IVBags); + publicVariable QGVAR(IVBags); }; // TODO localization diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index cd1e9f72e7..3094b3a53e 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -44,7 +44,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { [[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; [_target, _removeItem] call FUNC(addToTriageCard); - [_target, "activity", "STR_ACE_HAS_APPLIED_TOURNIQUET_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; true; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 80ac936952..7726dbf8da 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -853,5 +853,19 @@ Unload patient + + + %1 has bandaged patient + + + %1 used %2 + + + %1 has given an IV + + + %1 applied a tourniquet + + \ No newline at end of file From 95489ed627f52147585ddf5f2980fb512f65d268 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 21:25:21 +0100 Subject: [PATCH 3/8] fixed missing handleDamage EH #235 --- addons/medical/XEH_init.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical/XEH_init.sqf b/addons/medical/XEH_init.sqf index 4d92575f9b..0ded7d471f 100644 --- a/addons/medical/XEH_init.sqf +++ b/addons/medical/XEH_init.sqf @@ -3,8 +3,8 @@ private ["_unit"]; _unit = _this select 0; -if !(local _unit) exitWith {}; - _unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; -[_unit] call FUNC(init); +if (local _unit) then { + [_unit] call FUNC(init); +}; From 7420f70020d9b76725a6304e46109da2836af25d Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 21:26:20 +0100 Subject: [PATCH 4/8] Fixed #232 --- addons/medical/XEH_postInit.sqf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index d4ce776361..56b0247733 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -110,10 +110,11 @@ GVAR(effectTimeBlood) = time; }; }; + _bleeding = ACE_player call FUNC(getBloodLoss); // Bleeding Indicator - if (damage ACE_player > 0.1 and GVAR(effectTimeBlood) + 6 < time) then { + if (_bleeding > 0 and GVAR(effectTimeBlood) + 6 < time) then { GVAR(effectTimeBlood) = time; - [500 * damage ACE_player] call BIS_fnc_bloodEffect; + [500 * _bleeding] call BIS_fnc_bloodEffect; }; // Blood Volume Effect From 2f729f67f11112dc4d11ae226562ac3778bf769a Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 21:41:03 +0100 Subject: [PATCH 5/8] Slightly increased the distance of medical actions Removed sub menu medical on torso --- addons/medical/CfgVehicles.hpp | 201 ++++++++++++++++----------------- 1 file changed, 99 insertions(+), 102 deletions(-) diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index bb22f8aec3..ccdb48861e 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -1,4 +1,6 @@ +#define MEDICAL_ACTION_DISTANCE 1.75 + class CfgVehicles { class Logic; @@ -811,7 +813,7 @@ class CfgVehicles { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); - + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitHead"; distance = 2.0; @@ -871,118 +873,110 @@ class CfgVehicles { }; }; class ACE_Torso { - class Medical { - displayName = "Medical"; - distance = 5.0; - condition = "true"; - runOnHover = 1; - statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + runOnHover = 1; + statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitBody"; + distance = 2.0; + 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 = "M"; + hotkey = "B"; enableInside = 1; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class Carry { + displayName = "$STR_ACE_MEDICAL_CARRY"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + //icon = PATHTOF(UI\icons\bandage.paa); + }; + class Drag { + displayName = "$STR_ACE_MEDICAL_DRAG"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + //icon = PATHTOF(UI\icons\bandage.paa); + }; - class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitBody"; - distance = 2.0; - 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 Carry { - displayName = "$STR_ACE_MEDICAL_CARRY"; - distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(treatment)); - showDisabled = 1; - priority = 2; - hotkey = ""; - enableInside = 1; - //icon = PATHTOF(UI\icons\bandage.paa); - }; - class Drag { - displayName = "$STR_ACE_MEDICAL_DRAG"; - distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(treatment)); - showDisabled = 1; - priority = 2; - hotkey = ""; - 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); + }; - 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 = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; - distance = 5.0; - 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 = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; - 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 = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; - 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 = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); - }; - class SurgicalKit: fieldDressing { - displayName = "Use Surgical Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\surgicalKit.paa); - }; - class PersonalAidKit: fieldDressing { - displayName = "Use Personal Aid Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(treatment)); - icon = ""; - }; - class CPR: fieldDressing { - displayName = "CPR"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); - icon = ""; - }; + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + 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 = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + 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 = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + 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 = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class SurgicalKit: fieldDressing { + displayName = "Use Surgical Kit"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\surgicalKit.paa); + }; + class PersonalAidKit: fieldDressing { + displayName = "Use Personal Aid Kit"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(treatment)); + icon = ""; + }; + class CPR: fieldDressing { + displayName = "CPR"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); + icon = ""; }; }; class ACE_ArmLeft { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; @@ -1117,6 +1111,7 @@ class CfgVehicles { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; @@ -1248,6 +1243,7 @@ class CfgVehicles { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; @@ -1368,6 +1364,7 @@ class CfgVehicles { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; From 706e1598159eec198edc587efe2c11c2cf6e80ff Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 22:01:33 +0100 Subject: [PATCH 6/8] Adjusted color of tourniquet message --- addons/medical/functions/fnc_displayPatientInformation.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 39027b90cf..24605a3f97 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -49,7 +49,7 @@ if (_show) then { }; if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then { - _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.5, 0.5, 0, 1]]; + _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.77, 0.51, 0.08, 1]]; }; if (_target getvariable[QGVAR(hasPain), false]) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_PAIN", [1, 1, 1, 1]]; From 3b17cc68e1c6171d3ca0e97e733867fa6987151b Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 22:10:41 +0100 Subject: [PATCH 7/8] medical_onUnconscious is now a globalEvent instead of targetEvent. Feature request by commy. --- addons/medical/functions/fnc_setUnconscious.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index e27d7f21f7..9ea9acd7c3 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -110,7 +110,7 @@ _minWaitingTime = (round(random(10)+5)); if (!_hasMovedOut) then { // Reset the unit back to the previous captive state. [_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus); - + // Swhich the unit back to its original group [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); @@ -118,7 +118,7 @@ _minWaitingTime = (round(random(10)+5)); _unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP) _unit setUnconscious false; - ["medical_onUnconscious", [_unit], [_unit, false]] call EFUNC(common,targetEvent); + ["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent); // ensure this statement runs only once _args set [6, true]; }; @@ -142,4 +142,4 @@ _minWaitingTime = (round(random(10)+5)); }, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler; -["medical_onUnconscious", [_unit], [_unit, true]] call EFUNC(common,targetEvent); +["medical_onUnconscious", [_unit, true]] call EFUNC(common,globalEvent); From b6133eb73e9c0c4229ecdc7d7bca8ddc9573a178 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 24 Mar 2015 23:10:03 +0100 Subject: [PATCH 8/8] removed diag_log calls --- addons/medical/functions/fnc_addToInjuredCollection.sqf | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 8de4e6b94b..82c385f0e1 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -26,13 +26,11 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{}; _unit setvariable [QGVAR(addedToUnitLoop), true, true]; - diag_log format["[MEDICAL] Added a unit to loop: %1", _unit]; [{ private "_unit"; _unit = (_this select 0) select 0; if (!alive _unit || !local _unit) then { [_this select 1] call CBA_fnc_removePerFrameHandler; - diag_log format["[MEDICAL] Removed a unit from loop: %1", _unit]; if (!local _unit) then { if (GVAR(level) >= 2) then { _unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 0], true];