2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-10-14 15:49:10 +00:00
|
|
|
/*
|
2023-08-16 23:18:01 +00:00
|
|
|
* Author: tcvm
|
2021-10-14 15:49:10 +00:00
|
|
|
* Decreases burning intensity on successful medical action.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Medic <OBJECT>
|
|
|
|
* 1: Patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, cursorObject] call ace_fire_fnc_medical_success
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2023-06-24 02:08:23 +00:00
|
|
|
params ["_medic", "_patient", "_bodyPart", "_classname"];
|
2021-10-14 15:49:10 +00:00
|
|
|
|
|
|
|
private _intensity = _patient getVariable [QGVAR(intensity), 0];
|
2022-08-29 00:27:10 +00:00
|
|
|
_intensity = _intensity * INTENSITY_DECREASE_MULT_PAT_DOWN;
|
2021-10-14 15:49:10 +00:00
|
|
|
_patient setVariable [QGVAR(intensity), _intensity, true];
|
2023-06-24 02:08:23 +00:00
|
|
|
|
|
|
|
if (_intensity > BURN_MIN_INTENSITY) then {
|
|
|
|
TRACE_1("patient still burning, looping",_this);
|
|
|
|
|
|
|
|
if (EGVAR(medical_gui,pendingReopen)) then {
|
|
|
|
LOG("temporarily blocking medical menu reopen");
|
|
|
|
|
|
|
|
EGVAR(medical_gui,pendingReopen) = false;
|
|
|
|
[{EGVAR(medical_gui,pendingReopen) = true}] call CBA_fnc_execNextFrame;
|
|
|
|
};
|
|
|
|
|
|
|
|
[_medic, _patient, _bodyPart, _classname] call EFUNC(medical_treatment,treatment);
|
|
|
|
};
|