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 Pain Unconscious Threshold setting #8394

Merged
merged 7 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions addons/medical_damage/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
true
] call CBA_fnc_addSetting;

[
QEGVAR(medical,painUnconsciousThreshold),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
QEGVAR(medical,painUnconsciousThreshold),
QUOTE(PAIN_UNCONSCIOUS),

technically it could be this I don't really like it and would rather keep it as is

"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",
Expand Down
8 changes: 8 additions & 0 deletions addons/medical_damage/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion addons/medical_engine/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 1 addition & 2 deletions addons/medical_engine/script_macros_medical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down