Added interaction menu actions for advanced medical

This commit is contained in:
Glowbal 2015-03-09 21:05:01 +01:00
parent f6fbef980a
commit aeb4c91792
4 changed files with 560 additions and 9 deletions

View File

@ -11,7 +11,7 @@ class ACE_Medical_Actions {
treatmentTime = 5;
treatmentTimeSelfCoef = 1;
items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}};
condition = "";
itemConsumed = 1;
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bandage));
@ -62,6 +62,7 @@ class ACE_Medical_Actions {
treatmentTime = 5;
// Item required for the action. Leave empty for no item required.
items[] = {QGVAR(fieldDressing)};
condition = "";
// Callbacks
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage));
callbackFailure = "";
@ -86,6 +87,7 @@ class ACE_Medical_Actions {
items[] = {QGVAR(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)};
@ -171,12 +173,14 @@ class ACE_Medical_Actions {
class RemoveTourniquet: CheckPulse {
treatmentTime = 2.5;
callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet));
condition = QUOTE(ARR_2([_this select 1, _this select 2] call FUNC(hasTourniquetAppliedTo)));
};
class CPR: fieldDressing {
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 25;
items[] = {};
condition = ""; // unconscious?
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
callbackFailure = "";
callbackProgress = "";

View File

@ -351,12 +351,55 @@ class CfgVehicles {
displayName = "Bandage Head";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage Head')] call DFUNC(treatment));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing (Head)";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage (Head)";
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage (Head)";
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage (Head)";
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
};
class CheckPulse: fieldDressing {
displayName = "Check Pulse";
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreat));
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment));
};
};
class ACE_MainActions {
class Bandage_Torso {
@ -369,18 +412,182 @@ class CfgVehicles {
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "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 = "Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(treatment));
};
class SurgicalKit: fieldDressing {
displayName = "Use Surgical Kit";
condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment));
};
class PersonalAidKit: fieldDressing {
displayName = "Use Personal Aid Kit";
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
};
class CPR: fieldDressing {
displayName = "CPR";
condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment));
};
};
class ACE_ArmLeft {
class Bandage_LeftArm {
displayName = "Bandage Right Arm";
displayName = "Bandage Left Arm";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
};
class BloodIV: fieldDressing {
displayName = "Give Blood IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment));
};
class BloodIV_500: BloodIV {
displayName = "Give Blood IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreat));
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));
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));
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));
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));
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));
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));
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));
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: CheckPulse {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_ArmRight {
class Bandage_RightArm {
@ -393,6 +600,114 @@ class CfgVehicles {
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreat));
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
};
class BloodIV_500: BloodIV {
displayName = "Give Blood IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreat));
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));
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));
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));
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));
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));
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));
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));
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: CheckPulse {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegLeft {
class Bandage_LeftLeg {
@ -405,6 +720,104 @@ class CfgVehicles {
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreat));
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreat));
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
};
class BloodIV_500: BloodIV {
displayName = "Give Blood IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreat));
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));
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));
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));
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));
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));
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));
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment));
};
class RemoveTourniquet: CheckPulse {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegRight {
class Bandage_RightLeg {
@ -417,6 +830,104 @@ class CfgVehicles {
hotkey = "B";
enableInside = 1;
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
};
class ElasticBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreat));
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
};
class BloodIV_500: BloodIV {
displayName = "Give Blood IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreat));
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));
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));
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));
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));
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));
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));
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment));
};
class RemoveTourniquet: CheckPulse {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
};
};

View File

@ -16,12 +16,14 @@
#include "script_component.hpp"
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return"];
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_condition"];
_caller = _this select 0;
_target = _this select 1;
_selectionName = _this select 2;
_className = _this select 3;
if !(_target isKindOf "CAManBase") exitWith {false};
_config = (ConfigFile >> "ACE_Medical_Treatments" >> "Basic" >> _className);
if (GVAR(level)>=2) then {
_config = (ConfigFile >> "ACE_Medical_Treatments" >> "Advanced" >> _className);
@ -29,7 +31,7 @@ if (GVAR(level)>=2) then {
if !(isClass _config) exitwith {false};
_medicRequired = getNumber (_config >> "requiredMedic");
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
_items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
@ -45,4 +47,20 @@ _return = false;
if (_x == "MedicalVehicle" && {[_caller, _target] call FUNC(inMedicalVehicle)}) exitwith {_return = true;};
}foreach _locations;
if (_return) then {
_condition = getText (_config >> "condition");
if (_condition != "") then {
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getvariable _condition;
};
if (typeName _condition == "BOOL") then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
};
};
_return;

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed"];
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return"];
_caller = _this select 0;
_target = _this select 1;
_selectionName = _this select 2;
@ -32,7 +32,7 @@ if !(isClass _config) exitwith {false};
// Check for required class
_medicRequired = getNumber (_config >> "requiredMedic");
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
// Check item
_items = getArray (_config >> "items");
@ -50,8 +50,26 @@ if ("All" in _locations) then {
if (_x == "MedicalVehicle" && {([vehicle _caller] call FUNC(isMedicalVehicle)) || ([vehicle _target] call FUNC(isMedicalVehicle))}) exitwith {_return = true;};
}foreach _locations;
};
if (_return) then {
_condition = getText (_config >> "condition");
if (_condition != "") then {
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getvariable _condition;
};
if (typeName _condition == "BOOL") then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
};
};
if !(_return) exitwith {false};
// Parse the config for the progress callback
_callbackProgress = getText (_config >> "callbackProgress");
if (_callbackProgress == "") then {