This commit is contained in:
commy2 2018-01-02 15:08:10 +01:00
commit b9d792ebcd
8 changed files with 67 additions and 3 deletions

View File

@ -41,6 +41,7 @@ Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
Anton
Arcanum417 <lubos.len@gmail.com>
Arkhir <wonsz666@gmail.com >
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut

View File

@ -306,6 +306,7 @@ class GVAR(Actions) {
items[] = {"ACE_medKit"};
treatmentLocations[] = {QEGVAR(medical,useLocation_MedKit)};
requiredMedic = QEGVAR(medical,medicSetting_MedKit);
treatmentTime = QUOTE(_target call FUNC(HealTimeMedkit));
callbackSuccess = QFUNC(treatmentPartialHeal);
itemConsumed = QEGVAR(medical,consumeItem_MedKit);
};

View File

@ -30,4 +30,18 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
};
class EGVAR(medical,MedkitTime) {
category = ECSTRING(medical,Category_Medical);
displayName = CSTRING(MedkitTime);
description = CSTRING(MedkitTime_Description);
typeName = "SCALAR";
value = 0;
};
class EGVAR(medical,PAKTime) {
category = ECSTRING(medical,Category_Medical);
displayName = CSTRING(PAKTime);
description = CSTRING(PAKTime_Description);
typeName = "SCALAR";
value = 0;
};
};

View File

@ -46,6 +46,7 @@ PREP(dropDownTriageCard);
PREP(getTriageStatus);
PREP(handleBandageOpening);
PREP(healTime);
PREP(HealTimeMedkit);
PREP(isBeingCarried);
PREP(isBeingDragged);
PREP(onMedicationUsage);

View File

@ -8,7 +8,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_medical"};
author = ECSTRING(common,ACETeam);
authors[] = {""};
authors[] = {"Glowbal", "KoffeinFlummi", "Arcanum"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};

View File

@ -0,0 +1,31 @@
/*
* Author: Ruthberg, Arcanum
* 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_treatment_fnc_HealTimeMedkit
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
private _totalDamage = 0;
private _treatTime = 0;
{
_totalDamage = _totalDamage + _x;
} forEach (_unit getVariable [QEGVAR(medical,bodyPartDamage), []]);
if (EGVAR(medical,MedkitTime) > 0) then {
_treatTime = EGVAR(medical,MedkitTime);
} else {
_treatTime = 10 max (_totalDamage * 5) min 180;
};
_treatTime

View File

@ -18,9 +18,14 @@
params ["_unit"];
private _totalDamage = 0;
private _treatTime = 0;
{
_totalDamage = _totalDamage + _x;
} forEach (_unit getVariable [QEGVAR(medical,bodyPartDamage), []]);
10 max (_totalDamage * 5) min 180
if (EGVAR(medical,PAKTime) > 0) then {
_treatTime = EGVAR(medical,PAKTime);
} else {
_treatTime = 10 max (_totalDamage * 5) min 180;
};
_treatTime

View File

@ -86,6 +86,17 @@
<Hungarian>Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent.</Hungarian>
<Italian>Per quanto devono restare le barelle? In secondi. -1 è permanente</Italian>
<Japanese>医療廃棄物オブジェクトが表示されつづける時間を設定しますか?-1 は永遠です。</Japanese>
<Key ID="STR_ACE_Medical_Treatment_PAKTime">
<English>How long should PAK take to apply ?</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_PAKTime_Description">
<English>How long should PAK take to apply ? Use 0 for default (based on damage)</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedkitTime">
<English>How long should Medkit take to apply ?</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedkitTime_Description">
<English>How long should Medkit take to apply ? Use 0 for default (based on damage)</English>
</Key>
</Package>
</Project>