mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Basic treatment structure
This commit is contained in:
parent
7e9a02089f
commit
3482633fb1
@ -25,6 +25,10 @@ PREP(getUnconsciousCondition);
|
||||
PREP(addUnconsciousCondition);
|
||||
PREP(setDead);
|
||||
PREP(playInjuredSound);
|
||||
PREP(treatment);
|
||||
PREP(treatmentCallback);
|
||||
PREP(treatmentCallback_basic);
|
||||
PREP(treatmentCallback_advanced);
|
||||
|
||||
GVAR(injuredUnitCollection) = [];
|
||||
|
||||
|
34
addons/medical/functions/fnc_treatment.sqf
Normal file
34
addons/medical/functions/fnc_treatment.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Starts the treatment process
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: The treatment type/item <STRING>
|
||||
* 3+: Additional paramters <ANY>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_medic = _this select 0;
|
||||
_patient = _this select 1;
|
||||
_type = _this select 2;
|
||||
|
||||
_params = + _this;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
|
||||
// @todo: animation
|
||||
|
||||
// @todo: remove item
|
||||
|
||||
// @todo: progress bar
|
||||
|
||||
_this call FUNC(treatmentCallback);
|
32
addons/medical/functions/fnc_treatmentCallback.sqf
Normal file
32
addons/medical/functions/fnc_treatmentCallback.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Callback for a successfull treatment.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Treatment type/item <STRING>
|
||||
* 3+: Additional parameters <ANY>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_medic = _this select 0;
|
||||
_patient = _this select 1;
|
||||
_type = _this select 2;
|
||||
|
||||
_params = + _this;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
|
||||
if (GVAR(level) == 0) then {
|
||||
_this call FUNC(treatmentCallback_basic);
|
||||
} else {
|
||||
_this call FUNC(treatmentCallback_advanced);
|
||||
};
|
27
addons/medical/functions/fnc_treatmentCallback_advanced.sqf
Normal file
27
addons/medical/functions/fnc_treatmentCallback_advanced.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Callback for an advanced successfull treatment.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Treatment type/item <STRING>
|
||||
* 3+: Additional parameters <ANY>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_medic = _this select 0;
|
||||
_patient = _this select 1;
|
||||
_type = _this select 2;
|
||||
|
||||
_params = + _this;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
|
27
addons/medical/functions/fnc_treatmentCallback_basic.sqf
Normal file
27
addons/medical/functions/fnc_treatmentCallback_basic.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Callback for a basic successfull treatment.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Treatment type/item <STRING>
|
||||
* 3+: Additional parameters <ANY>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_medic = _this select 0;
|
||||
_patient = _this select 1;
|
||||
_type = _this select 2;
|
||||
|
||||
_params = + _this;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
_params deleteAt 0;
|
||||
|
Loading…
Reference in New Issue
Block a user