2015-02-28 10:41:27 +00:00
|
|
|
/**
|
|
|
|
* fn_healLocal.sqf
|
|
|
|
* @Descr: N/A
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 17:47:23 +00:00
|
|
|
params ["_caller", "_target"];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
2015-11-30 16:14:05 +00:00
|
|
|
if (alive _target) exitWith {
|
2015-02-28 10:41:27 +00:00
|
|
|
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(pain), 0, true];
|
|
|
|
_target setVariable [QGVAR(morphine), 0, true];
|
|
|
|
_target setVariable [QGVAR(bloodVolume), 100, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// tourniquets
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// wounds and injuries
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(openWounds), [], true];
|
|
|
|
_target setVariable [QGVAR(bandagedWounds), [], true];
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(internalWounds), [], true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// vitals
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(heartRate), 80];
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(heartRateAdjustments), []];
|
|
|
|
_target setVariable [QGVAR(bloodPressure), [80, 120]];
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(peripheralResistance), 100];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// fractures
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(fractures), []];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// IVs
|
2016-09-01 10:46:08 +00:00
|
|
|
_target setVariable [QGVAR(ivBags), nil, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// damage storage
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// airway
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(airwayStatus), 100, true];
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable [QGVAR(airwayOccluded), false, true];
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(airwayCollapsed), false, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// generic medical admin
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(addedToUnitLoop), false, true];
|
|
|
|
_target setVariable [QGVAR(inCardiacArrest), false, true];
|
|
|
|
_target setVariable [QGVAR(inReviveState), false, true];
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setVariable ["ACE_isUnconscious", false, true];
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [QGVAR(hasLostBlood), 0, true];
|
|
|
|
_target setVariable [QGVAR(isBleeding), false, true];
|
|
|
|
_target setVariable [QGVAR(hasPain), false, true];
|
|
|
|
_target setVariable [QGVAR(painSuppress), 0, true];
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// medication
|
2016-06-13 00:34:56 +00:00
|
|
|
private _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
|
2015-02-28 10:41:27 +00:00
|
|
|
{
|
2015-11-30 16:27:09 +00:00
|
|
|
_target setVariable [_x select 0, nil];
|
2015-11-30 16:23:48 +00:00
|
|
|
} forEach _allUsedMedication;
|
2015-02-28 10:41:27 +00:00
|
|
|
|
|
|
|
// Resetting damage
|
2015-04-04 14:26:49 +00:00
|
|
|
_target setDamage 0;
|
2015-08-07 17:11:57 +00:00
|
|
|
|
2015-12-11 18:01:50 +00:00
|
|
|
[_target, "activity", LSTRING(Activity_fullHeal), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
|
|
|
|
[_target, "activity_view", LSTRING(Activity_fullHeal), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
|
2015-02-28 10:41:27 +00:00
|
|
|
};
|