Skip to content

Commit

Permalink
Medical - Add Global Wound Reopen Chance Modifer (#7747)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
dgibso29 authored Jun 13, 2020
1 parent c399921 commit 185c15d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Codingboy
Coren <[email protected]>
Crusty
C0kkie
dgibso29 <[email protected]>
Dharma Bellamkonda <[email protected]>
Dimaslg <[email protected]>
diwako
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
[{
Expand Down
9 changes: 9 additions & 0 deletions addons/medical_treatment/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 14 additions & 0 deletions addons/medical_treatment/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 185c15d

Please sign in to comment.