2016-10-05 22:54:57 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Handles full heal of a patient.
|
2016-07-15 10:23:47 +00:00
|
|
|
*
|
2016-10-05 22:54:57 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: The medic <OBJECT>
|
|
|
|
* 1: The patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Succesful treatment started <BOOL>
|
|
|
|
*
|
|
|
|
* Public: No
|
2016-07-15 10:23:47 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_caller", "_target"];
|
|
|
|
|
|
|
|
if (alive _target) exitWith {
|
|
|
|
_target setVariable [QEGVAR(medical,pain), 0, true];
|
|
|
|
_target setVariable [QEGVAR(medical,morphine), 0, true];
|
2016-10-10 15:30:42 +00:00
|
|
|
_target setVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME, true];
|
2016-07-15 10:23:47 +00:00
|
|
|
|
|
|
|
// tourniquets
|
|
|
|
_target setVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0], true];
|
|
|
|
|
|
|
|
// wounds and injuries
|
|
|
|
_target setVariable [QEGVAR(medical,openWounds), [], true];
|
|
|
|
_target setVariable [QEGVAR(medical,bandagedWounds), [], true];
|
|
|
|
_target setVariable [QEGVAR(medical,internalWounds), [], true];
|
|
|
|
|
|
|
|
// vitals
|
|
|
|
_target setVariable [QEGVAR(medical,heartRate), 80];
|
|
|
|
_target setVariable [QEGVAR(medical,heartRateAdjustments), []];
|
|
|
|
_target setVariable [QEGVAR(medical,bloodPressure), [80, 120]];
|
|
|
|
_target setVariable [QEGVAR(medical,peripheralResistance), 100];
|
|
|
|
|
|
|
|
// fractures
|
|
|
|
_target setVariable [QEGVAR(medical,fractures), []];
|
|
|
|
|
|
|
|
// IVs
|
2016-09-18 10:05:36 +00:00
|
|
|
_target setVariable [QEGVAR(medical,ivBags), nil, true];
|
2016-07-15 10:23:47 +00:00
|
|
|
|
|
|
|
// damage storage
|
|
|
|
_target setVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0], true];
|
|
|
|
|
|
|
|
// airway
|
|
|
|
_target setVariable [QEGVAR(medical,airwayStatus), 100, true];
|
|
|
|
_target setVariable [QEGVAR(medical,airwayOccluded), false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,airwayCollapsed), false, true];
|
|
|
|
|
|
|
|
// generic medical admin
|
|
|
|
_target setVariable [QEGVAR(medical,addedToUnitLoop), false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,inCardiacArrest), false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,inReviveState), false, true];
|
|
|
|
_target setVariable ["ACE_isUnconscious", false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,hasLostBlood), 0, true];
|
|
|
|
_target setVariable [QEGVAR(medical,isBleeding), false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,hasPain), false, true];
|
|
|
|
_target setVariable [QEGVAR(medical,painSuppress), 0, true];
|
|
|
|
|
|
|
|
// medication
|
|
|
|
private _allUsedMedication = _target getVariable [QEGVAR(medical,allUsedMedication), []];
|
2016-10-05 22:54:57 +00:00
|
|
|
|
2016-07-15 10:23:47 +00:00
|
|
|
{
|
|
|
|
_target setVariable [_x select 0, nil];
|
|
|
|
} forEach _allUsedMedication;
|
|
|
|
|
|
|
|
// Resetting damage
|
|
|
|
_target setDamage 0;
|
|
|
|
|
2016-09-29 20:08:36 +00:00
|
|
|
[_target, "activity", ELSTRING(medical,Activity_fullHeal), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
|
|
|
|
[_target, "activity_view", ELSTRING(medical,Activity_fullHeal), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
|
2016-07-15 10:23:47 +00:00
|
|
|
};
|