Medical - Add Global Wound Reopen Chance Modifer (#7747)

* Added Bandage Reopening Chance Modifier

* Added Wound Reopen Chance Addon Setting

* Fixed dumb error in localization setup

* Credit!

* Resolved issue with Addon Settings definition & removed testing values.

* PR Feedback #1

- Removed unnecessary whitespace on LN 46
- Call global var directly at LN 87
- Updated Wound Reopen Chance localized name & description

* PR Feedback #2

- Increased reopen coefficient upper limit from 2 to 5.

* Changed author credit to reflect GitHub email.
This commit is contained in:
Daniel Gibson 2020-06-13 16:52:30 -04:00 committed by GitHub
parent c39992199a
commit 185c15de0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 1 deletions

View File

@ -63,6 +63,7 @@ Codingboy
Coren <coren4@gmail.com>
Crusty
C0kkie
dgibso29 <gibson@earringpranks.com>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
diwako

View File

@ -84,7 +84,7 @@ _target setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true];
TRACE_1("",_reopeningChance);
// Check if we are ever going to reopen this
if (random 1 <= _reopeningChance) then {
if (random 1 <= _reopeningChance * GVAR(woundReopenChance)) then {
private _delay = _reopeningMinDelay + random (_reopeningMaxDelay - _reopeningMinDelay);
TRACE_1("Will open",_delay);
[{

View File

@ -25,6 +25,15 @@
true
] call CBA_settings_fnc_init;
[
QGVAR(woundReopenChance),
"SLIDER",
[LSTRING(WoundReopenChance_DisplayName), LSTRING(WoundReopenChance_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[0, 5, 1, 2],
true
] call CBA_settings_fnc_init;
[
QGVAR(clearTraumaAfterBandage),
"CHECKBOX",

View File

@ -107,6 +107,20 @@
<Czech>Zapnuto &amp; Úrazy se mohou znovu otevřít</Czech>
<Russian>Включено и может открыться заново</Russian>
</Key>
<Key ID="STR_ACE_Medical_Treatment_WoundReopenChance_DisplayName">
<English>Wound Reopening Coefficient</English>
<French>Coefficient de réouverture des plaies</French>
<German>Wundwiederöffnungskoeffizient</German>
<Czech>Koeficient opětovného otevření rány</Czech>
<Russian>Коэффициент повторного открытия раны</Russian>
</Key>
<Key ID="STR_ACE_Medical_Treatment_WoundReopenChance_Description">
<English>Coefficient for controlling the wound reopening chance. The final reopening chance is determined by multiplying this value with the specific reopening chance for the wound type and bandage used.</English>
<French>Coefficient de contrôle des chances de réouverture de la plaie. La chance de réouverture finale est déterminée en multipliant cette valeur par la chance de réouverture spécifique pour le type de plaie et le bandage utilisés.</French>
<German>Koeffizient zur Kontrolle der Wundöffnungswahrscheinlichkeit. Die endgültige Wiedereröffnungschance wird bestimmt, indem dieser Wert mit der spezifischen Wiedereröffnungschance für den verwendeten Wundtyp und Verband multipliziert wird.</German>
<Czech>Koeficient pro řízení šance na opětovné otevření rány. Konečná šance na opětovné otevření se stanoví vynásobením této hodnoty specifickou šancí na opětovné otevření pro použitý typ rány a obvaz.</Czech>
<Russian>Коэффициент контроля вероятности повторного открытия раны. Окончательный шанс повторного открытия определяется путем умножения этого значения на определенный шанс повторного открытия для используемого типа раны и повязки.</Russian>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ClearTraumaAfterBandage_DisplayName">
<English>Clear Trauma After Bandage</English>
<Japanese>治療後に外傷を削除</Japanese>