ACE3/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf
Dedmen Miller e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05:00

76 lines
2.3 KiB
Plaintext

#include "script_component.hpp"
/*
* Author: Glowbal
*
*
* Arguments:
* 0: Caller <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* Boolean <BOOL>
*
* Example:
* [bob, kevin] call ACE_medical_fnc_treatmentAdvanced_fullHealLocal
*
* Public: No
*/
params ["_caller", "_target"];
if (alive _target) exitWith {
_target setVariable [QGVAR(pain), 0, true];
_target setVariable [QGVAR(morphine), 0, true];
_target setVariable [QGVAR(bloodVolume), 100, true];
// tourniquets
_target setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
// wounds and injuries
_target setVariable [QGVAR(openWounds), [], true];
_target setVariable [QGVAR(bandagedWounds), [], true];
_target setVariable [QGVAR(internalWounds), [], true];
// vitals
_target setVariable [QGVAR(heartRate), 80];
_target setVariable [QGVAR(heartRateAdjustments), []];
_target setVariable [QGVAR(bloodPressure), [80, 120]];
_target setVariable [QGVAR(peripheralResistance), 100];
// fractures
_target setVariable [QGVAR(fractures), []];
// IVs
_target setVariable [QGVAR(ivBags), nil, true];
// damage storage
_target setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
// airway
_target setVariable [QGVAR(airwayStatus), 100, true];
_target setVariable [QGVAR(airwayOccluded), false, true];
_target setVariable [QGVAR(airwayCollapsed), false, true];
// generic medical admin
_target setVariable [QGVAR(inCardiacArrest), false, true];
_target setVariable [QGVAR(inReviveState), false, true];
_target setVariable ["ACE_isUnconscious", false, true];
_target setVariable [QGVAR(hasLostBlood), 0, true];
_target setVariable [QGVAR(isBleeding), false, true];
_target setVariable [QGVAR(hasPain), false, true];
_target setVariable [QGVAR(painSuppress), 0, true];
// medication
private _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{
_target setVariable [_x select 0, nil];
} forEach _allUsedMedication;
// Resetting damage
_target setDamage 0;
[_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
};