mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
36 lines
990 B
Plaintext
36 lines
990 B
Plaintext
/**
|
|
* fn_treatmentAirwayLocal.sqf
|
|
* @Descr: N/A
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: []
|
|
* @Return:
|
|
* @PublicAPI: false
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon", "_part"];
|
|
_caller = _this select 0;
|
|
_target = _this select 1;
|
|
_selectionName = _this select 2;
|
|
_removeItem = _this select 3;
|
|
|
|
|
|
if (!local _target) exitwith{};
|
|
|
|
[_target,"STR_ACE_AIRWAY","STR_ACE_IS_TREATING_YOUR_AIRWAY",0, [([_caller] call EFUNC(common,getName))]] call EFUNC(gui,sendDisplayMessageTo);
|
|
[_target,_removeItem] call FUNC(addToTriageList);
|
|
|
|
|
|
_airwayStatus = [_target,QGVAR(airway)] call EFUNC(common,getDefinedVariable);
|
|
if (_airwayStatus > 0) then {
|
|
if (!([_treatingPerson] call FUNC(medicClass))) then {
|
|
_target setvariable [QGVAR(airwayTreated), true, true];
|
|
} else {
|
|
if (random (1) >= 0.35) then {
|
|
_target setvariable [QGVAR(airwayTreated), true, true];
|
|
};
|
|
};
|
|
};
|
|
true |