-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1586 from acemod/dynamicPAKtreatmentTime
PAK treatment time based on total amount of damage.
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |