From 92f2cc0d1235a7aec8a99b361f11e458e3bb6426 Mon Sep 17 00:00:00 2001 From: Blue Date: Wed, 1 Nov 2023 20:09:59 +0100 Subject: [PATCH] Allow NPWT on bandaged wounds --- addons/surgery/functions/fnc_canNPWT.sqf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/surgery/functions/fnc_canNPWT.sqf b/addons/surgery/functions/fnc_canNPWT.sqf index 849aab628..f0fe83f85 100644 --- a/addons/surgery/functions/fnc_canNPWT.sqf +++ b/addons/surgery/functions/fnc_canNPWT.sqf @@ -19,18 +19,18 @@ params ["_medic", "_patient", "_bodyPart"]; -private _condition = ((GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]) isNotEqualTo []) || ((GET_OPEN_WOUNDS(_patient) getOrDefault [_bodyPart, []]) isNotEqualTo []); +private _openWounds = GET_OPEN_WOUNDS(_patient) getOrDefault [_bodyPart, []]; -if (_condition) then { - private _isBleeding = false; +private _isBleeding = false; + +if (_openWounds isNotEqualTo []) then { { // ace_medical_treatment_fnc_canBandage _x params ["", "_amountOf", "_bleeding"]; if (_amountOf * _bleeding > 0) exitWith { _isBleeding = true; }; - } forEach ((GET_OPEN_WOUNDS(_patient)) getOrDefault [_bodyPart, []]); - _isBleeding -} else { - _condition -}; \ No newline at end of file + } forEach _openWounds; +}; + +(_isBleeding || (GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []] isNotEqualTo [])); \ No newline at end of file