Skip to content

Commit

Permalink
Allow NPWT on bandaged wounds
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueTheKing committed Nov 1, 2023
1 parent 4bdaa2d commit 92f2cc0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions addons/surgery/functions/fnc_canNPWT.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
} forEach _openWounds;
};

(_isBleeding || (GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []] isNotEqualTo []));

0 comments on commit 92f2cc0

Please sign in to comment.