mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add HealTime modifiers to medical settings (#5188)
* Add modifiers of TreatmentTime of PAK and Medkit to settings * Fix indents and stringtable tags * Fix Healtime vars * Absolute time for PAK to settings * Add Medkit Healtime setting
This commit is contained in:
parent
f4e8972a37
commit
38e7913caf
@ -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
|
||||
|
@ -305,6 +305,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);
|
||||
};
|
||||
|
@ -23,4 +23,18 @@ class ACE_Settings {
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
};
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
@ -43,6 +43,7 @@ PREP(dropDownTriageCard);
|
||||
PREP(getTriageStatus);
|
||||
PREP(handleBandageOpening);
|
||||
PREP(healTime);
|
||||
PREP(HealTimeMedkit);
|
||||
PREP(isBeingCarried);
|
||||
PREP(isBeingDragged);
|
||||
PREP(onMedicationUsage);
|
||||
|
@ -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;
|
||||
};
|
||||
|
31
addons/medical_treatment/functions/fnc_HealTimeMedkit.sqf
Normal file
31
addons/medical_treatment/functions/fnc_HealTimeMedkit.sqf
Normal 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
|
@ -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
|
||||
|
@ -78,6 +78,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>
|
||||
|
Loading…
Reference in New Issue
Block a user