Medical - Adjustable times for many treatment actions (#7951)

* adjustable times for most constant treatment times

* add new line, formatting

* cleanup merge

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
diwako 2020-10-29 17:37:44 +01:00 committed by GitHub
parent 9e3409fc6e
commit 2b0db19807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 6 deletions

View File

@ -113,9 +113,6 @@
#define DEFAULT_BANDAGE_REOPENING_MIN_DELAY 120
#define DEFAULT_BANDAGE_REOPENING_MAX_DELAY 200
// Time it takes to stitch one wound
#define WOUND_STITCH_TIME 5
#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0]
#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0]

View File

@ -259,7 +259,7 @@ class GVAR(actions) {
allowedSelections[] = {"Body"};
allowSelfTreatment = 0;
medicRequired = 0;
treatmentTime = 15;
treatmentTime = QGVAR(treatmentTimeCPR);
items[] = {};
condition = QFUNC(canCPR);
callbackSuccess = QFUNC(cprSuccess);

View File

@ -18,4 +18,4 @@
params ["", "_patient"];
count (_patient call FUNC(getStitchableWounds)) * WOUND_STITCH_TIME
count (_patient call FUNC(getStitchableWounds)) * GVAR(treatmentTimeStich)

View File

@ -28,7 +28,7 @@ private _stitchableWounds = _patient call FUNC(getStitchableWounds);
if (_stitchableWounds isEqualTo []) exitWith {false};
// Not enough time has elapsed to stitch a wound
if (_totalTime - _elapsedTime > (count _stitchableWounds - 1) * WOUND_STITCH_TIME) exitWith {true};
if (_totalTime - _elapsedTime > (count _stitchableWounds - 1) * GVAR(treatmentTimeStich)) exitWith {true};
private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient);
private _stitchedWounds = GET_STITCHED_WOUNDS(_patient);

View File

@ -216,6 +216,15 @@
true
] call CBA_settings_fnc_init;
[
QGVAR(treatmentTimeStich),
"SLIDER",
[LSTRING(treatmentTimeStich_DisplayName), LSTRING(treatmentTimeStich_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[0.01, 10, 5, 2],
true
] call CBA_settings_fnc_init;
[
QGVAR(medicIV),
"LIST",
@ -252,6 +261,15 @@
true
] call CBA_settings_fnc_init;
[
QGVAR(treatmentTimeCPR),
"SLIDER",
[LSTRING(treatmentTimeCPR_DisplayName), LSTRING(treatmentTimeCPR_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[0.1, 30, 15, 1],
true
] call CBA_settings_fnc_init;
[
QGVAR(holsterRequired),
"LIST",

View File

@ -183,6 +183,18 @@
<French>Temps en secondes qu'il faut pour appliquer un sac mortuaire.</French>
<German>Zeit in Sekunden, die benötigt wird, um einen Leichensack aufzutragen.</German>
</Key>
<Key ID="STR_ACE_Medical_Treatment_treatmentTimeStich_DisplayName">
<English>Stitching time per wound</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_treatmentTimeStich_Description">
<English>Time that is needed to stitch one wound</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_treatmentTimeCPR_DisplayName">
<English>Time to give CPR</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_treatmentTimeCPR_Description">
<English>Time in seconds how long the CPR action takes to complete</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ClearTraumaAfterBandage_DisplayName">
<English>Clear Trauma After Bandage</English>
<Japanese>治療後に外傷を削除</Japanese>