mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
0b4029b12f
* Medical AI - AI will remove tourniquets * Medical AI - Improve tourniquet removal (for #10166) (#10178) * Fixes & tweaks - Have AI remove tourniquets ASAP - Fixed bug where AI would not remove tourniquet, because it didn't have any bandages - Allowed for more multitasking * Allow healer to administer morphine if out of bandages * Remove TODO comment * Allow AI to remove tourniquets from limbs with no open wounds * Update addons/medical_ai/functions/fnc_healingLogic.sqf --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
28 lines
598 B
Plaintext
28 lines
598 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: BaerMitUmlaut
|
|
* Checks if a unit needs treatment.
|
|
*
|
|
* Arguments:
|
|
* Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Does unit need treatment <BOOL>
|
|
*
|
|
* Example:
|
|
* cursorObject call ace_medical_ai_fnc_isInjured
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
if !(alive _this) exitWith {false};
|
|
|
|
(GET_WOUND_BLEEDING(_this) > 0)
|
|
|| {GET_PAIN_PERCEIVED(_this) > 0.25}
|
|
|| {IS_UNCONSCIOUS(_this)}
|
|
|| {
|
|
private _fractures = GET_FRACTURES(_this);
|
|
((_fractures select 4) == 1) || {(_fractures select 5) == 1}
|
|
}
|
|
|| { GET_TOURNIQUETS(_this) isNotEqualTo DEFAULT_TOURNIQUET_VALUES }
|