Medical - Add Pain Unconscious Threshold setting (#8394)

* Add PAIN_UNCONSCIOUS slider

Add PAIN_UNCONSCIOUS slider to ACE Medical settings

* fix GVAR name

* Update addons/medical_damage/stringtable.xml

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>

* Update addons/medical_damage/stringtable.xml

Co-authored-by: jonpas <jonpas33@gmail.com>

* stringtable

* remove setter in preInit and cleanup PAIN_UNCONSCIOUS_DEFAULT

---------

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Sergey Vergun 2023-08-05 15:32:21 +03:00 committed by GitHub
parent a591aa9508
commit 96a4a8cf8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 3 deletions

View File

@ -34,6 +34,15 @@
true
] call CBA_fnc_addSetting;
[
QEGVAR(medical,painUnconsciousThreshold),
"SLIDER",
[LSTRING(PainUnconsciousThreshold_DisplayName), LSTRING(PainUnconsciousThreshold_Description)],
ELSTRING(medical,Category),
[0, 1, 0.5, 2, false],
true
] call CBA_fnc_addSetting;
[
QEGVAR(medical,deathChance),
"SLIDER",

View File

@ -777,6 +777,14 @@
<Chinesesimp>当一个人的疼痛超过承受能力的极限时,他陷入昏迷的概率。</Chinesesimp>
<Korean>고통 한계점을 넘을 시 기절하는 확률을 정합니다.</Korean>
</Key>
<Key ID="STR_ACE_Medical_Damage_PainUnconsciousThreshold_DisplayName">
<English>Pain Unconscious Threshold</English>
<Russian>Порог боли для потери сознания</Russian>
</Key>
<Key ID="STR_ACE_Medical_Damage_PainUnconsciousThreshold_Description">
<English>Sets the threshold for severe pain, above which a person can fall unconscious upon receiving damage.</English>
<Russian>Устанавливает количество боли от полученной травмы, при котором юнит может потерять сознание.</Russian>
</Key>
<Key ID="STR_ACE_Medical_Damage_DeathChance_DisplayName">
<English>Fatal Injury Death Chance</English>
<Russian>Вероятность смерти от смертельной травмы</Russian>

View File

@ -14,7 +14,6 @@ if (isNil QUOTE(ORGAN_DAMAGE_THRESHOLD)) then {ORGAN_DAMAGE_THRESHOLD = ORGAN_DA
if (isNil QUOTE(HEART_HIT_CHANCE)) then {HEART_HIT_CHANCE = HEART_HIT_CHANCE_DEFAULT};
if (isNil QUOTE(PENETRATION_THRESHOLD)) then {PENETRATION_THRESHOLD = PENETRATION_THRESHOLD_DEFAULT};
if (isNil QUOTE(BLOOD_LOSS_KNOCK_OUT_THRESHOLD)) then {BLOOD_LOSS_KNOCK_OUT_THRESHOLD = BLOOD_LOSS_KNOCK_OUT_THRESHOLD_DEFAULT};
if (isNil QUOTE(PAIN_UNCONSCIOUS)) then {PAIN_UNCONSCIOUS = PAIN_UNCONSCIOUS_DEFAULT};
if (isNil QUOTE(PAIN_FADE_TIME)) then {PAIN_FADE_TIME = PAIN_FADE_TIME_DEFAULT};
if (isNil QUOTE(LIMPING_DAMAGE_THRESHOLD)) then {LIMPING_DAMAGE_THRESHOLD = LIMPING_DAMAGE_THRESHOLD_DEFAULT};
if (isNil QUOTE(FRACTURE_DAMAGE_THRESHOLD)) then {FRACTURE_DAMAGE_THRESHOLD = FRACTURE_DAMAGE_THRESHOLD_DEFAULT};

View File

@ -73,8 +73,7 @@
#define DAMAGE_TOTAL_COLORS 10
// --- pain
#define PAIN_UNCONSCIOUS EGVAR(medical,const_painUnconscious)
#define PAIN_UNCONSCIOUS_DEFAULT 0.5
#define PAIN_UNCONSCIOUS EGVAR(medical,painUnconsciousThreshold)
// Pain fade out time (time it takes until pain is guaranteed to be completly gone)
#define PAIN_FADE_TIME EGVAR(medical,const_painFadeTime)