ACE3/addons/medical_treatment/functions/fnc_treatmentBasic_bloodbagLocal.sqf
Glowbal a8831a0d16 Change split medical in two components
- medical component is responsible for the injuries and common functionality
- medical_treatment component is responsible for offering treatment functionality
2016-06-13 17:00:56 +02:00

28 lines
695 B
Plaintext

/*
* 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};
};
private _blood = ((_target getVariable [QEGVAR(medical,bloodVolume), 100]) + _bloodAdded) min 100;
_target setVariable [QEGVAR(medical,bloodVolume), _blood, true];