2015-04-28 18:32:02 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi
|
|
|
|
* Local callback when the bloodbag treatment is complete
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The patient <OBJECT>
|
2015-05-23 06:16:18 +00:00
|
|
|
* 1: Treatment Classname <STRING>
|
2015-04-28 18:32:02 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob, "classname"] call ACE_medical_fnc_treatmentBasic_bloodbagLocal
|
2015-04-28 18:32:02 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
#define BLOODBAGHEAL 70
|
|
|
|
|
2015-08-22 17:47:23 +00:00
|
|
|
params ["_target", "_treatmentClassname"];
|
2015-04-28 18:32:02 +00:00
|
|
|
|
2016-06-13 00:34:56 +00:00
|
|
|
private _bloodAdded = switch (true) do {
|
2015-05-23 06:16:18 +00:00
|
|
|
case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
|
|
|
|
case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
|
|
|
|
default {BLOODBAGHEAL};
|
|
|
|
};
|
|
|
|
|
2016-06-13 00:34:56 +00:00
|
|
|
private _blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + _bloodAdded) min 100;
|
2015-04-28 18:32:02 +00:00
|
|
|
_target setVariable [QGVAR(bloodVolume), _blood, true];
|