mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into Medical_Dragging
Conflicts: addons/medical/XEH_postInit.sqf addons/medical/XEH_preInit.sqf
This commit is contained in:
commit
d7de92c60d
@ -6,8 +6,9 @@ class CfgVehicles {
|
||||
class ArgumentsBaseUnits {
|
||||
};
|
||||
};
|
||||
class ACE_Module;
|
||||
// TODO localization for all the modules
|
||||
class ACE_moduleMedicalSettings: Module_F {
|
||||
class ACE_moduleMedicalSettings: ACE_Module {
|
||||
scope = 2;
|
||||
displayName = "Medical Settings [ACE]";
|
||||
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
|
||||
@ -129,7 +130,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_moduleTreatmentConfiguration: Module_F {
|
||||
class ACE_moduleTreatmentConfiguration: ACE_Module {
|
||||
scope = 2;
|
||||
displayName = "Treatment Configuration [ACE]";
|
||||
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
|
||||
@ -344,6 +345,466 @@ class CfgVehicles {
|
||||
name = "leg_r";
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {
|
||||
class Medical {
|
||||
displayName = "Medical";
|
||||
runOnHover = 1;
|
||||
hotkey = "M";
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class ACE_Head {
|
||||
displayName = "$STR_ACE_Interaction_Head";
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitHead";
|
||||
distance = 2.0;
|
||||
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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "Elastic Bandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "Check Pulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "Check Blood Pressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_Torso {
|
||||
displayName = "$STR_ACE_Interaction_Torso";
|
||||
distance = 5.0;
|
||||
condition = "true";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
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(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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "Elastic Bandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
};
|
||||
class ACE_ArmLeft {
|
||||
displayName = "$STR_ACE_Interaction_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(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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "Elastic Bandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "Check Pulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "Check Blood Pressure";
|
||||
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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_ArmRight {
|
||||
displayName = "$STR_ACE_Interaction_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(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(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(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(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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "Atropine";
|
||||
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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "Check Pulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "Check Blood Pressure";
|
||||
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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_LegLeft {
|
||||
displayName = "$STR_ACE_Interaction_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(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);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "Field Dressing";
|
||||
distance = 5.0;
|
||||
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(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(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(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(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(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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "Remove Tourniquet";
|
||||
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 {
|
||||
displayName = "$STR_ACE_Interaction_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(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);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "Field Dressing";
|
||||
distance = 5.0;
|
||||
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(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(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(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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "Atropine";
|
||||
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(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "Remove Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_Head {
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitwith{};
|
||||
GVAR(enabledFor) = 1; // TODO remove this once we implement settings. Just here to get the vitals working.
|
||||
|
||||
GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
|
||||
@ -12,12 +11,8 @@ 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;
|
||||
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
|
||||
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
|
||||
|
||||
|
||||
[QGVAR(disableInteraction), {!((_this select 1) getVariable [QGVAR(disableInteraction), false])}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
||||
// Initialize all effects
|
||||
_fnc_createEffect = {
|
||||
private ["_type", "_layer", "_default"];
|
||||
@ -222,23 +217,15 @@ if (isNil QGVAR(level)) then {
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// broadcast injuries to JIP clients in a MP session
|
||||
if (isMultiplayer && GVAR(level) >= 2) then {
|
||||
[QGVAR(onPlayerConnected), "onPlayerConnected", {
|
||||
if (isNil QGVAR(InjuredCollection)) then {
|
||||
GVAR(InjuredCollection) = [];
|
||||
};
|
||||
|
||||
if (isMultiplayer) then {
|
||||
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
||||
if (hasInterface) then {
|
||||
{
|
||||
_unit = _x;
|
||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||
{
|
||||
["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent);
|
||||
}foreach _openWounds;
|
||||
}foreach GVAR(InjuredCollection);
|
||||
}, []] call BIS_fnc_addStackedEventHandler;
|
||||
[_x, player] call FUNC(requestWoundSync);
|
||||
}foreach units group player;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 0]) < 65)},
|
||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) > 0.9)},
|
||||
|
@ -94,6 +94,7 @@ PREP(moduleAssignMedicalVehicle);
|
||||
PREP(moduleAssignMedicalFacility);
|
||||
PREP(moduleTreatmentConfiguration);
|
||||
PREP(copyDeadBody);
|
||||
PREP(requestWoundSync);
|
||||
|
||||
GVAR(injuredUnitCollection) = [];
|
||||
call FUNC(parseConfigForInjuries);
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
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};
|
||||
requiredAddons[] = {ace_common, ace_interaction, ace_modules};
|
||||
author[] = {"Glowbal", "KoffienFlummi"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
|
@ -18,22 +18,21 @@ _unit = _this select 0;
|
||||
_force = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{};
|
||||
|
||||
if !(local _unit) exitwith {
|
||||
[[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{};
|
||||
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
|
||||
|
||||
if (isNil QGVAR(InjuredCollection)) then {
|
||||
GVAR(InjuredCollection) = [];
|
||||
};
|
||||
GVAR(InjuredCollection) pushback _unit;
|
||||
|
||||
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];
|
||||
@ -41,7 +40,6 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||
};
|
||||
_unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 0], true];
|
||||
};
|
||||
GVAR(InjuredCollection) = GVAR(InjuredCollection) - [_unit];
|
||||
} else {
|
||||
[_unit] call FUNC(handleUnitVitals);
|
||||
|
||||
|
@ -21,6 +21,8 @@ GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} els
|
||||
|
||||
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
|
||||
|
||||
[_target, ACE_player] call FUNC(requestWoundSync);
|
||||
|
||||
if (_show) then {
|
||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
|
||||
|
||||
|
@ -22,4 +22,9 @@ if (GVAR(level) >= 2) then {
|
||||
_unit setvariable [QGVAR(heartRate), 0];
|
||||
_unit setvariable [QGVAR(bloodPressure), [0, 0]];
|
||||
_unit setvariable [QGVAR(airwayStatus), 0];
|
||||
|
||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||
{
|
||||
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
||||
}foreach _openWounds;
|
||||
};
|
||||
|
@ -19,9 +19,9 @@ _unit = _this select 0;
|
||||
_lastId = _this select 1;
|
||||
_originOfrequest = _this select 2;
|
||||
|
||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||
if (count _openWounds > _lastId) then {
|
||||
{
|
||||
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
|
||||
}foreach _openWounds;
|
||||
if (local _unit) then {
|
||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||
{
|
||||
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
|
||||
}foreach _openWounds;
|
||||
};
|
||||
|
24
addons/medical/functions/fnc_requestWoundSync.sqf
Normal file
24
addons/medical/functions/fnc_requestWoundSync.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Ask for the latest wound information.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The target <OBJECT>
|
||||
* 1: object belonging to the caller <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
* <NIL>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private [ "_target", "_caller", "_openWounds","_lastId"];
|
||||
_target = _this select 0;
|
||||
_caller = _this select 1;
|
||||
|
||||
if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information
|
||||
if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {};
|
||||
_target setvariable [QGVAR(isWoundSynced), true];
|
||||
["medical_woundUpdateRequest", [_target], [_target, _lastId, _caller]] call EFUNC(common,targetEvent);
|
1
addons/modules/$PBOPREFIX$
Normal file
1
addons/modules/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\modules
|
13
addons/modules/CfgEventHandlers.hpp
Normal file
13
addons/modules/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class _ACE_modules { // using a _ so it is the first postInit to be executed
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
44
addons/modules/XEH_postInit.sqf
Normal file
44
addons/modules/XEH_postInit.sqf
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it.
|
||||
// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution.
|
||||
{
|
||||
[_x] call {
|
||||
private ["_logic", "_logicType", "_config", "_isGlobal", "_isDisposable", "_isPersistent","_function"];
|
||||
_logic = _this select 0;
|
||||
_logicType = typeof _logic;
|
||||
_logic hideobject true;
|
||||
|
||||
if (_logic getvariable [QGVAR(initalized), false]) exitwith {};
|
||||
_config = (configFile >> "CfgVehicles" >> _logicType);
|
||||
if !(isClass _config) exitwith {};
|
||||
|
||||
// isGlobal = 1;
|
||||
_isGlobal = getNumber (_config >> "isGlobal") > 0;
|
||||
_isDisposable = getNumber (_config >> "isDisposable") > 0;
|
||||
_isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1;
|
||||
_function = getText (_config >> "function");
|
||||
if (isnil _function) then {
|
||||
_function = compile _function;
|
||||
} else {
|
||||
_function = missionNamespace getvariable _function;
|
||||
};
|
||||
|
||||
if (_isGlobal) then {
|
||||
[_logic, [], true] call _function;
|
||||
} else {
|
||||
if (isServer) then {
|
||||
[_logic, [], true] call _function;
|
||||
};
|
||||
};
|
||||
|
||||
if !(_isPersistent) then {
|
||||
_logic setvariable [QGVAR(initalized), true];
|
||||
};
|
||||
|
||||
if (_isDisposable) then {
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
};
|
||||
}foreach GVAR(moduleInitCollection);
|
8
addons/modules/XEH_preInit.sqf
Normal file
8
addons/modules/XEH_preInit.sqf
Normal file
@ -0,0 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(moduleInit);
|
||||
GVAR(moduleInitCollection) = [];
|
||||
|
||||
ADDON = true;
|
28
addons/modules/config.cpp
Normal file
28
addons/modules/config.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Glowbal"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Logic;
|
||||
class Module_F: Logic {
|
||||
class ArgumentsBaseUnits {
|
||||
};
|
||||
};
|
||||
class ACE_Module: Module_F {
|
||||
class EventHandlers {
|
||||
init = QUOTE(_this call DFUNC(moduleInit));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
19
addons/modules/functions/fnc_moduleInit.sqf
Normal file
19
addons/modules/functions/fnc_moduleInit.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* IV Treatment local callback
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The logic object <OBJECT>
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if ((_this select 0) isKindOf "Module_F") then {
|
||||
GVAR(moduleInitCollection) pushback (_this select 0);
|
||||
};
|
1
addons/modules/functions/script_component.hpp
Normal file
1
addons/modules/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\modules\script_component.hpp"
|
12
addons/modules/script_component.hpp
Normal file
12
addons/modules/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT modules
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_MODULES
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_MODULES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_MODULES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
Loading…
Reference in New Issue
Block a user