Skip to content

Commit

Permalink
Update fnc_handleLimbIVComplications.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
mazinskihenry authored Nov 27, 2024
1 parent c6fb7e5 commit 74a46a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addons/pharma/functions/fnc_handleLimbIVComplications.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
*/

params ["_unit", "_bodypart", "_incomingFlowDifference"];

private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]];
private _IVactual = _IVarray select _partIndex;

if (_bodypart == "Chest") then {
[_unit, 0.7] call ACEFUNC(medical_status,adjustPainLevel);
} else {
Expand All @@ -37,6 +39,7 @@
[_unit, 0.3] call ACEFUNC(medical_status,adjustPainLevel);
[objNull, _unit, _bodypart] call EFUNC(pharma,removeIV);
};

if (random(100) < 4) then {
_IVarray set [_partIndex, 9];
_unit setVariable [QGVAR(IV), _IVarray, true];
Expand All @@ -49,6 +52,7 @@
[_unit, 0.3] call ACEFUNC(medical_status,adjustPainLevel);
[objNull, _unit, _bodypart] call EFUNC(pharma,removeIV);
};

if (random(100) < 30) then {
_IVarray set [_partIndex, 9];
_unit setVariable [QGVAR(IV), _IVarray, true];
Expand All @@ -60,11 +64,13 @@
case (_incomingFlowDifference >= 7): {
[_unit, 0.3] call ACEFUNC(medical_status,adjustPainLevel);
[objNull, _unit, _bodypart] call EFUNC(pharma,removeIV);

_IVarray set [_partIndex, 9];
_unit setVariable [QGVAR(IV), _IVarray, true];

[objNull, _unit, _bodypart] call EFUNC(pharma,removeIV);
[{_IVarray set [_partIndex, 0]; _unit setVariable [QGVAR(IV), _IVarray, true];}, [_unit], 180]call CBA_fnc_waitAndExecute;
};
};
};


0 comments on commit 74a46a8

Please sign in to comment.