From 41892fd6df8c4a235981e65d8692786b2373c589 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Tue, 26 May 2015 00:33:20 +0200 Subject: [PATCH] Added surgicalKit treatment --- addons/medical/XEH_preInit.sqf | 2 ++ .../fnc_treatmentAdvanced_surgicalKit.sqf | 20 +++++++++++++++++++ ...fnc_treatmentAdvanced_surgicalKitLocal.sqf | 18 +++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 addons/medical/functions/fnc_treatmentAdvanced_surgicalKit.sqf create mode 100644 addons/medical/functions/fnc_treatmentAdvanced_surgicalKitLocal.sqf diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 4f4ff5bc30..33ef6fbcde 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -78,6 +78,8 @@ PREP(treatmentAdvanced_fullHeal); PREP(treatmentAdvanced_fullHealLocal); PREP(treatmentAdvanced_medication); PREP(treatmentAdvanced_medicationLocal); +PREP(treatmentAdvanced_surgicalKit); +PREP(treatmentAdvanced_surgicalKitLocal); PREP(treatmentBasic_bandage); PREP(treatmentBasic_bloodbag); PREP(treatmentBasic_bloodbagLocal); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit.sqf b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit.sqf new file mode 100644 index 0000000000..da967b7f1b --- /dev/null +++ b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit.sqf @@ -0,0 +1,20 @@ +/* + * Author: BaerMitUmlaut + * Handles treatment via surgical kit. + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_target", "_caller", "_selectionName", "_className", "_items"]; +_caller = _this select 0; +_target = _this select 1; +_selectionName = _this select 2; +_className = _this select 3; +_items = _this select 4; + +// TODO replace by event system +[[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_surgicalKitLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ + +true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKitLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKitLocal.sqf new file mode 100644 index 0000000000..c5596c0bcb --- /dev/null +++ b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKitLocal.sqf @@ -0,0 +1,18 @@ +/* + * Author: BaerMitUmlaut + * Handles treatment via surgical kit (locally). + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_target", "_caller"]; +_caller = _this select 0; +_target = _this select 1; + +if (alive _target) exitwith { + + _target setvariable [QGVAR(bandagedWounds), [], true]; + +};