mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed occluded medication (tourniquet removal logic)
This commit is contained in:
parent
78bfc0c26d
commit
280943cb4d
@ -58,6 +58,7 @@ if (_partialHeal) then {
|
||||
|
||||
// tourniquets
|
||||
_target setVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0], true];
|
||||
_target setVariable [QGVAR(occludedMedications), nil, true];
|
||||
|
||||
// wounds and injuries
|
||||
_target setVariable [QEGVAR(medical,openWounds), [], true];
|
||||
|
@ -33,10 +33,10 @@ private _tourniquets = _target getVariable [QEGVAR(medical,tourniquets), [0,0,0,
|
||||
|
||||
if (_tourniquets select _partIndex > 0) exitWith {
|
||||
TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets);
|
||||
private _delayedMedications = _target getVariable [QGVAR(occludedMedications), []];
|
||||
private _delayedMedications = _target getVariable [QEGVAR(medical,occludedMedications), []];
|
||||
|
||||
_delayedMedications pushBack _this;
|
||||
_target setVariable [QGVAR(occludedMedications), _delayedMedications, true];
|
||||
_target setVariable [QEGVAR(medical,occludedMedications), _delayedMedications, true];
|
||||
|
||||
true
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ _target setVariable [QEGVAR(medical,tourniquets), _tourniquets, true];
|
||||
[_caller, "ACE_tourniquet", true] call CBA_fnc_addItem;
|
||||
|
||||
//Handle all injected medications now that blood is flowing: @todo
|
||||
private _delayedMedications = _target getVariable [QGVAR(occludedMedications), []];
|
||||
private _delayedMedications = _target getVariable [QEGVAR(medical,occludedMedications), []];
|
||||
private _updatedArray = false;
|
||||
TRACE_2("meds",_partIndex,_delayedMedications);
|
||||
|
||||
@ -42,7 +42,7 @@ TRACE_2("meds",_partIndex,_delayedMedications);
|
||||
_x params ["", "", "_medPartNum"];
|
||||
if (_partIndex == _medPartNum) then {
|
||||
TRACE_1("delayed medication call after tourniquet removeal",_x);
|
||||
[QGVAR(treatmentAdvanced_medicationLocal), _x, [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(treatmentMedicationLocal), _x, _target] call CBA_fnc_targetEvent;
|
||||
_delayedMedications set [_forEachIndex, -1];
|
||||
_updatedArray = true;
|
||||
};
|
||||
@ -50,5 +50,5 @@ TRACE_2("meds",_partIndex,_delayedMedications);
|
||||
|
||||
if (_updatedArray) then {
|
||||
_delayedMedications = _delayedMedications - [-1];
|
||||
_target setVariable [QGVAR(occludedMedications), _delayedMedications, true];
|
||||
_target setVariable [QEGVAR(medical,occludedMedications), _delayedMedications, true];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user