2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2019-04-03 11:36:37 +00:00
|
|
|
/*
|
2023-03-06 20:17:01 +00:00
|
|
|
* Author: Katalam, mharis001, Brett Mayson
|
2023-06-27 22:43:45 +00:00
|
|
|
* Checks if the patient's body part can be stitched.
|
2019-04-03 11:36:37 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2023-03-06 20:17:01 +00:00
|
|
|
* 0: Medic <OBJECT>
|
2019-06-03 15:31:46 +00:00
|
|
|
* 1: Patient <OBJECT>
|
2023-06-27 22:43:45 +00:00
|
|
|
* 2: Body Part <STRING>
|
2019-04-03 11:36:37 +00:00
|
|
|
*
|
|
|
|
* ReturnValue:
|
|
|
|
* Can Stitch <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2023-06-27 22:43:45 +00:00
|
|
|
* [player, cursorTarget, "head"] call ace_medical_treatment_fnc_canStitch
|
2019-04-03 11:36:37 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2023-06-27 22:43:45 +00:00
|
|
|
params ["_medic", "_patient", "_bodyPart"];
|
2023-03-06 20:17:01 +00:00
|
|
|
|
|
|
|
if ((GVAR(consumeSurgicalKit) == 2) && {!([_medic, _patient, ["ACE_suture"]] call FUNC(hasItem))}) exitWith {false};
|
2019-04-03 11:36:37 +00:00
|
|
|
|
2023-06-27 22:43:45 +00:00
|
|
|
private _isBleeding = false;
|
|
|
|
{
|
|
|
|
_x params ["", "_amountOf", "_bleedingRate"];
|
|
|
|
_isBleeding = _amountOf > 0 && {_bleedingRate > 0};
|
|
|
|
if (_isBleeding) then {break};
|
|
|
|
} forEach (GET_OPEN_WOUNDS(_patient) get _bodyPart);
|
|
|
|
|
|
|
|
(!_isBleeding && {(GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]) isNotEqualTo []}) // return
|