2015-07-03 20:16:18 +00:00
|
|
|
/*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Author: Glowbal
|
|
|
|
* Check if a unit is in a stable condition
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Is in stable condition <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob] call ACE_medical_fnc_isInStableCondition
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-07-03 20:16:18 +00:00
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit"];
|
2015-07-03 20:16:18 +00:00
|
|
|
|
2016-06-13 10:18:56 +00:00
|
|
|
private _totalBloodLoss = 0;
|
2015-07-03 20:16:18 +00:00
|
|
|
{
|
|
|
|
// total bleeding ratio * percentage of injury left
|
|
|
|
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
|
2016-06-13 10:18:56 +00:00
|
|
|
} forEach (_unit getVariable [QGVAR(openWounds), []]);
|
2015-07-03 20:16:18 +00:00
|
|
|
|
|
|
|
(_totalBloodLoss == 0);
|