mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1586 from acemod/dynamicPAKtreatmentTime
PAK treatment time based on total amount of damage.
This commit is contained in:
commit
1c066a0b3f
@ -219,7 +219,7 @@ class ACE_Medical_Actions {
|
||||
items[] = {"ACE_personalAidKit"};
|
||||
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||
requiredMedic = QGVAR(medicSetting_PAK);
|
||||
treatmentTime = 10;
|
||||
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime));
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
|
||||
itemConsumed = QGVAR(consumeItem_PAK);
|
||||
animationPatient = "";
|
||||
|
@ -76,6 +76,7 @@ PREP(treatmentAdvanced_CPR);
|
||||
PREP(treatmentAdvanced_CPRLocal);
|
||||
PREP(treatmentAdvanced_fullHeal);
|
||||
PREP(treatmentAdvanced_fullHealLocal);
|
||||
PREP(treatmentAdvanced_fullHealTreatmentTime);
|
||||
PREP(treatmentAdvanced_medication);
|
||||
PREP(treatmentAdvanced_medicationLocal);
|
||||
PREP(treatmentAdvanced_surgicalKit_onProgress);
|
||||
|
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Calculates the personal aid kit treatment time based on amount of damage to heal
|
||||
*
|
||||
* Arguments:
|
||||
* unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* treatment time <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [_target] call ace_medical_fnc_treatmentAdvanced_fullHealTreatmentTime
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#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