Medical Damage - Add setting for unconscious chance from pain (#8092)

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
This commit is contained in:
TyroneMF 2021-02-08 03:13:59 +00:00 committed by GitHub
parent 08472f6343
commit 7a65acdc15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View File

@ -32,6 +32,6 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA
private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit);
if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then {
if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < EGVAR(medical,painUnconsciousChance)}}) then {
[QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent;
};

View File

@ -24,3 +24,12 @@
[0, 25, 1, 2],
true
] call CBA_settings_fnc_init;
[
QEGVAR(medical,painUnconsciousChance),
"SLIDER",
[LSTRING(PainUnconsciousChance_DisplayName), LSTRING(PainUnconsciousChance_Description)],
ELSTRING(medical,Category),
[0, 1, 0.1, 2, true],
true
] call CBA_settings_fnc_init;

View File

@ -687,5 +687,13 @@
<Polish>Ustawia próg obrażeń jakie może otrzymać jednostka przed utratą przytomności. (0 jako ustawienie domyślne misji)</Polish>
<Turkish>Bilinçsiz duruma geçmeden önce bir birimin alabileceği hasar miktarını ayarlar. (Görev varsayılanı için 0)</Turkish>
</Key>
<Key ID="STR_ACE_Medical_Damage_PainUnconsciousChance_DisplayName">
<English>Pain Unconscious Chance</English>
<Polish>Szansa na nieprzytomność przez ból</Polish>
</Key>
<Key ID="STR_ACE_Medical_Damage_PainUnconsciousChance_Description">
<English>The probability of a person falling unconscious when their pain is above the tolerance threshold upon receiving damage.</English>
<Polish>Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń.</Polish>
</Key>
</Package>
</Project>