2016-07-15 10:23:47 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi
|
|
|
|
* Local callback when the bloodbag treatment is complete
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The patient <OBJECT>
|
|
|
|
* 1: Treatment Classname <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* nil
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
#define BLOODBAGHEAL 70
|
|
|
|
|
|
|
|
params ["_target", "_treatmentClassname"];
|
|
|
|
|
|
|
|
private _bloodAdded = switch (true) do {
|
|
|
|
case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
|
|
|
|
case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
|
|
|
|
default {BLOODBAGHEAL};
|
|
|
|
};
|
|
|
|
|
2016-10-10 15:30:42 +00:00
|
|
|
private _blood = ((_target getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME]) + _bloodAdded) min DEFAULT_BLOOD_VOLUME;
|
2016-07-15 10:23:47 +00:00
|
|
|
_target setVariable [QEGVAR(medical,bloodVolume), _blood, true];
|