Basic treatment structure

This commit is contained in:
KoffeinFlummi 2015-02-20 22:04:01 +01:00
parent 7e9a02089f
commit 3482633fb1
5 changed files with 124 additions and 0 deletions

View File

@ -25,6 +25,10 @@ PREP(getUnconsciousCondition);
PREP(addUnconsciousCondition);
PREP(setDead);
PREP(playInjuredSound);
PREP(treatment);
PREP(treatmentCallback);
PREP(treatmentCallback_basic);
PREP(treatmentCallback_advanced);
GVAR(injuredUnitCollection) = [];

View 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);

View 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);
};

View 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;

View 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;