Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Add Alternative Survival Chance #8192

Merged
merged 9 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
_critialDamage = true;
};
if ([_unit, _bodyPartNToAdd, _bodyPartDamage, _woundDamage] call FUNC(determineIfFatal)) then {
TRACE_1("determineIfFatal returned true",_woundDamage);
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent;
if !(isPlayer _unit && {random 1 > EGVAR(medical,deathChance)}) then {
TRACE_1("determineIfFatal returned true",_woundDamage);
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent;
};
};

#ifdef DEBUG_MODE_FULL
Expand Down
9 changes: 9 additions & 0 deletions addons/medical_damage/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@
[0, 1, 0.1, 2, true],
true
] call CBA_fnc_addSetting;

[
QEGVAR(medical,deathChance),
"SLIDER",
[LSTRING(deathChance_DisplayName), LSTRING(deathChance_Description)],
ELSTRING(medical,Category),
[0, 1, 1, 2, true],
true
] call CBA_fnc_addSetting;
6 changes: 6 additions & 0 deletions addons/medical_damage/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -697,5 +697,11 @@
<Polish>Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń.</Polish>
<Japanese>ユニットがダメージを受けた時に痛みが許容しきい値を超えた場合、気絶をする確立を設定します。</Japanese>
</Key>
<Key ID="STR_ACE_Medical_Damage_DeathChance_DisplayName">
<English>Fatal Injury Death Chance</English>
</Key>
<Key ID="STR_ACE_Medical_Damage_DeathChance_Description">
<English>The chance of dying to a fatal injury.</English>
</Key>
</Package>
</Project>