Skip to content

Commit

Permalink
array
Browse files Browse the repository at this point in the history
  • Loading branch information
Apricot-ale committed Dec 25, 2024
1 parent 4e1a7fe commit b2ba5df
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions addons/medical_treatment/functions/fnc_onMedicationUsage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ if (_maxDose > 0) then {
};

// Check incompatible medication (format [med,limit])
if (_incompatibleMedication isNotEqualTo []) then {
{
_x params ["_xMed", "_xLimit"];
private _inSystem = ([_target, _xMed] call EFUNC(medical_status,getMedicationCount)) select 0;
if (_inSystem > _xLimit) then {
[_target, _classname, _inSystem, _xLimit, _xMed] call FUNC(overDose);
};
} forEach _incompatibleMedication;
};
if (typeName _array != "ARRAY" || _incompatibleMedication isEqualTo []) exitWith {};
{
_x params ["_xMed", "_xLimit"];
private _inSystem = ([_target, _xMed] call EFUNC(medical_status,getMedicationCount)) select 0;
if (_inSystem > _xLimit) then {
[_target, _classname, _inSystem, _xLimit, _xMed] call FUNC(overDose);
};
} forEach _incompatibleMedication;

0 comments on commit b2ba5df

Please sign in to comment.