From c435be3759fc076ab99a9992b54eb789eba22858 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 18 Dec 2024 02:39:01 +0100 Subject: [PATCH] Medical Treatment - Add missing bools for creating litter (#10564) * Add missing bools for creating litter * Update fnc_useItem.sqf --- .../medical_treatment/functions/fnc_treatment.sqf | 2 +- addons/medical_treatment/functions/fnc_useItem.sqf | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/medical_treatment/functions/fnc_treatment.sqf b/addons/medical_treatment/functions/fnc_treatment.sqf index 4a28212966d..8e36448ac6a 100644 --- a/addons/medical_treatment/functions/fnc_treatment.sqf +++ b/addons/medical_treatment/functions/fnc_treatment.sqf @@ -49,7 +49,7 @@ if (_treatmentTime == 0) exitWith {false}; private _userAndItem = if (GET_NUMBER_ENTRY(_config >> "consumeItem") == 1) then { [_medic, _patient, getArray (_config >> "items")] call FUNC(useItem); } else { - [objNull, ""]; // Treatment does not require items to be consumed + [objNull, "", false]; // Treatment does not require items to be consumed }; _userAndItem params ["_itemUser", "_usedItem", "_createLitter"]; diff --git a/addons/medical_treatment/functions/fnc_useItem.sqf b/addons/medical_treatment/functions/fnc_useItem.sqf index 33ac9f98f42..2a8583d1533 100644 --- a/addons/medical_treatment/functions/fnc_useItem.sqf +++ b/addons/medical_treatment/functions/fnc_useItem.sqf @@ -10,7 +10,7 @@ * 2: Items * * Return Value: - * User and Item and Litter Created + * User and Item and Litter Created * * Example: * [player, cursorObject, ["bandage"]] call ace_medical_treatment_fnc_useItem @@ -21,7 +21,7 @@ params ["_medic", "_patient", "_items"]; if (_medic isEqualTo player && {!isNull findDisplay 312}) exitWith { - [_medic, _items select 0] + [_medic, _items select 0, false] // return }; scopeName "Main"; @@ -40,24 +40,24 @@ private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GV switch (true) do { case (_x in _vehicleItems): { _unitVehicle addItemCargoGlobal [_x, -1]; - [_unit, _x, false] breakOut "Main"; + [_unit, _x, false] breakOut "Main"; // return }; case (_x in _vehicleMagazines): { [_unitVehicle, _x] call EFUNC(common,adjustMagazineAmmo); - [_unit, _x, false] breakOut "Main"; + [_unit, _x, false] breakOut "Main"; // return }; case (_x in _unitItems): { _unit removeItem _x; - [_unit, _x, true] breakOut "Main"; + [_unit, _x, true] breakOut "Main"; // return }; case (_x in _unitMagazines): { private _magsStart = count magazines _unit; [_unit, _x] call EFUNC(common,adjustMagazineAmmo); private _magsEnd = count magazines _unit; - [_unit, _x, (_magsEnd < _magsStart)] breakOut "Main"; + [_unit, _x, (_magsEnd < _magsStart)] breakOut "Main"; // return }; }; } forEach _items; } forEach _useOrder; -[objNull, "", false] +[objNull, "", false] // return