mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Add condition for surgicial kit (#6916)
* Added condition canStitch * Update XEH_PREP.hpp * Update addons/medical_treatment/functions/fnc_canStitch.sqf Co-Authored-By: Katalam <39590058+Katalam@users.noreply.github.com> * Added example, removed arguments information and changed > to isEqualTo * Added example in canBandage too
This commit is contained in:
parent
24a533b968
commit
55a7d53437
@ -269,6 +269,7 @@ class GVAR(Actions) {
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = QEGVAR(medical,medicSetting_SurgicalKit);
|
||||
treatmentTime = QUOTE(count (_target getVariable [ARR_2('EGVAR(medical,bandagedWounds)',[])]) * 5);
|
||||
condition = QFUNC(canStitch);
|
||||
callbackSuccess = "";
|
||||
callbackProgress = QFUNC(treatmentSurgicalKit_onProgress);
|
||||
itemConsumed = QEGVAR(medical,consumeItem_SurgicalKit);
|
||||
|
@ -43,6 +43,7 @@ PREP(bodyCleanupLoop);
|
||||
PREP(calculateBlood);
|
||||
PREP(canAccessMedicalEquipment);
|
||||
PREP(canBandage);
|
||||
PREP(canStitch);
|
||||
PREP(findMostEffectiveWound);
|
||||
PREP(getBandageTime);
|
||||
PREP(getTriageStatus);
|
||||
|
@ -13,6 +13,9 @@
|
||||
* ReturnValue:
|
||||
* Can Bandage <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, cursorTarget, "Head", "FieldDressing"] call ace_medical_treatment_fnc_canBandage
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
|
21
addons/medical_treatment/functions/fnc_canStitch.sqf
Normal file
21
addons/medical_treatment/functions/fnc_canStitch.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Katalam
|
||||
* Prevents stitch actions from showing if the body is either fully stitched or has no open wounds.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
* Can Stitch <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, cursorTarget] call ace_medical_treatment_fnc_canStitch
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["", "_patient"];
|
||||
|
||||
!((_patient getVariable [QEGVAR(medical,bandagedWounds), []]) isEqualTo [])
|
Loading…
Reference in New Issue
Block a user