mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added a function to calculate the PAK treatmentTime
This commit is contained in:
parent
99b13a584a
commit
46a73f3177
@ -219,7 +219,7 @@ class ACE_Medical_Actions {
|
|||||||
items[] = {"ACE_personalAidKit"};
|
items[] = {"ACE_personalAidKit"};
|
||||||
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||||
requiredMedic = QGVAR(medicSetting_PAK);
|
requiredMedic = QGVAR(medicSetting_PAK);
|
||||||
treatmentTime = "10 max (call {_sum = 0; { _sum = _sum + _x; } forEach ((_this select 1) getVariable ['ACE_Medical_bodyPartStatus', []]); _sum * 10}) min 120";
|
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime));
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
||||||
itemConsumed = QGVAR(consumeItem_PAK);
|
itemConsumed = QGVAR(consumeItem_PAK);
|
||||||
animationPatient = "";
|
animationPatient = "";
|
||||||
|
@ -76,6 +76,7 @@ PREP(treatmentAdvanced_CPR);
|
|||||||
PREP(treatmentAdvanced_CPRLocal);
|
PREP(treatmentAdvanced_CPRLocal);
|
||||||
PREP(treatmentAdvanced_fullHeal);
|
PREP(treatmentAdvanced_fullHeal);
|
||||||
PREP(treatmentAdvanced_fullHealLocal);
|
PREP(treatmentAdvanced_fullHealLocal);
|
||||||
|
PREP(treatmentAdvanced_fullHealTreatmentTime);
|
||||||
PREP(treatmentAdvanced_medication);
|
PREP(treatmentAdvanced_medication);
|
||||||
PREP(treatmentAdvanced_medicationLocal);
|
PREP(treatmentAdvanced_medicationLocal);
|
||||||
PREP(treatmentAdvanced_surgicalKit_onProgress);
|
PREP(treatmentAdvanced_surgicalKit_onProgress);
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* fn_healTreatmentTime.sqf
|
||||||
|
* @Descr: N/A
|
||||||
|
* @Author: Ruthberg
|
||||||
|
*
|
||||||
|
* @Arguments: []
|
||||||
|
* @Return:
|
||||||
|
* @PublicAPI: false
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_target", "_totalDamage"];
|
||||||
|
_target = _this;
|
||||||
|
_totalDamage = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
_totalDamage = _totalDamage + _x;
|
||||||
|
} forEach (_target getVariable [QGVAR(bodyPartStatus), []]);
|
||||||
|
|
||||||
|
(10 max (_totalDamage * 10) min 120)
|
Loading…
Reference in New Issue
Block a user