diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index f77fffd013..d8a658b20a 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -1,44 +1,47 @@ class ACE_Medical_Actions { class Basic { + // @todo: localization class Bandage { - treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"}; + displayName = "Bandage"; + displayNameProgress = "Bandaging ..."; + treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"}; requiredMedic = 0; treatmentTime = 5; treatmentTimeSelfCoef = 1; items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}}; + itemConsumed = 1; - callbackSuccess = QUOTE(_this call FUNC(treatmentBasic_bandage)); - callbackFailure = QUOTE(_this call FUNC(treatmentBasic_abort)); + callbackSuccess = QUOTE(DFUNC(treatmentBasic_bandage)); + callbackFailure = QUOTE(DFUNC(treatmentBasic_abort)); callbackProgress = ""; animationPatient = ""; animationCaller = ""; }; class Morphine: Bandage { + displayName = "Morphine"; + displayNameProgress = "Injecting Morphine ..."; treatmentTime = 2; items[] = {QGVAR(morphine)}; - callbackSuccess = QUOTE(_this call FUNC(treatmentBasic_morphine)); + callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); animationCaller = ""; // @todo }; class Epipen: Bandage { + displayName = "Epinephrine"; + displayNameProgress = "Injecting Epinephrine ..."; treatmentTime = 3; items[] = {QGVAR(epinephrine)}; - callbackSuccess = QUOTE(_this call FUNC(treatmentBasic_epipen)); + callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); animationCaller = ""; // @todo }; class Bloodbag: Bandage { + displayName = "Blood Bag"; + displayNameProgress = "Transfusing Blood ..."; treatmentTime = 20; items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}}; - callbackSuccess = QUOTE(_this call FUNC(treatmentBasic_bloodbag)); - animationCaller = ""; // @todo - }; - class Diagnose: Bandage { - treatmentTime = 10; - treatmentTimeSelfCoef = 0; - items[] = {}; - callbackSuccess = QUOTE(_this call FUNC(treatmentBasic_diagnose)); + callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag)); animationCaller = ""; // @todo }; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 52eb9e78d3..2c70c97885 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -33,6 +33,10 @@ PREP(treatmentAdvanced_bandage); PREP(treatmentAdvanced_bandageLocal); PREP(treatmentAdvanced_medication); PREP(treatmentAdvanced_medicationLocal); +PREP(treatmentBasic_bandage); +PREP(treatmentBasic_morphine); +PREP(treatmentBasic_epipen); +PREP(treatmentBasic_bloodbag); PREP(teatmentIV); PREP(treatmentIVLocal); PREP(treatmentTourniquet); diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 4e2675dddc..7363c63b66 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -6,7 +6,7 @@ * 0: The unit that will be put in an unconscious state * * ReturnValue: - * + * nil * * Public: yes */ diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index caebfe58a7..aeb5c8d3bf 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -65,7 +65,7 @@ if (isNil _callbackFailure) then { _callbackFailure = missionNamespace getvariable _callbackFailure; }; -// Parse the config for the callbackProgress callback +// Parse the config for the progress callback _callbackProgress = getText (_config >> "callbackProgress"); if (isNil _callbackProgress) then { _callbackProgress = compile _callbackProgress; diff --git a/addons/medical/functions/fnc_treatmentBasic_bandage.sqf b/addons/medical/functions/fnc_treatmentBasic_bandage.sqf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf new file mode 100644 index 0000000000..ceb23bc201 --- /dev/null +++ b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf @@ -0,0 +1,24 @@ +/* + * Author: KoffeinFlummi + * Epipen treatment. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Selection Name + * 3: Treatment Classname + * 4: Items required > + * + * Return Value: + * nil + * + * Public: No + */ + +#include "script_component.hpp" + +_medic = _this select 0; +_patient = _this select 1: +_items = _this select 4; + +[_patient, false] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf new file mode 100644 index 0000000000..ceb23bc201 --- /dev/null +++ b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf @@ -0,0 +1,24 @@ +/* + * Author: KoffeinFlummi + * Epipen treatment. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Selection Name + * 3: Treatment Classname + * 4: Items required > + * + * Return Value: + * nil + * + * Public: No + */ + +#include "script_component.hpp" + +_medic = _this select 0; +_patient = _this select 1: +_items = _this select 4; + +[_patient, false] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf new file mode 100644 index 0000000000..e69de29bb2