2015-04-28 18:32:02 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi
|
|
|
|
* Local callback when the morphine treatment is complete
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The medic <OBJECT>
|
|
|
|
* 1: The patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 17:47:23 +00:00
|
|
|
* None
|
2015-04-28 18:32:02 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
#define MORPHINEHEAL 0.4
|
|
|
|
|
2015-08-22 17:47:23 +00:00
|
|
|
params ["_target"];
|
2015-04-28 18:32:02 +00:00
|
|
|
|
|
|
|
// reduce pain, pain sensitivity
|
2016-06-13 00:34:56 +00:00
|
|
|
private _morphine = ((_target getVariable [QGVAR(morphine), 0]) + MORPHINEHEAL) min 1;
|
2015-04-28 18:32:02 +00:00
|
|
|
_target setVariable [QGVAR(morphine), _morphine, true];
|
2016-06-13 00:34:56 +00:00
|
|
|
|
|
|
|
private _pain = ((_target getVariable [QGVAR(pain), 0]) - MORPHINEHEAL) max 0;
|
2015-04-28 18:32:02 +00:00
|
|
|
_target setVariable [QGVAR(pain), _pain, true];
|
|
|
|
|
|
|
|
// @todo overdose
|