From 96a4a8cf8eb624ad6e9da12dd371de2787f3b82d Mon Sep 17 00:00:00 2001 From: Sergey Vergun <1197314+severgun@users.noreply.github.com> Date: Sat, 5 Aug 2023 15:32:21 +0300 Subject: [PATCH] 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 * stringtable * remove setter in preInit and cleanup PAIN_UNCONSCIOUS_DEFAULT --------- Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com> Co-authored-by: jonpas Co-authored-by: LinkIsGrim Co-authored-by: PabstMirror --- addons/medical_damage/initSettings.sqf | 9 +++++++++ addons/medical_damage/stringtable.xml | 8 ++++++++ addons/medical_engine/XEH_preInit.sqf | 1 - addons/medical_engine/script_macros_medical.hpp | 3 +-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/addons/medical_damage/initSettings.sqf b/addons/medical_damage/initSettings.sqf index 14dac50f1a..0ce21319e2 100644 --- a/addons/medical_damage/initSettings.sqf +++ b/addons/medical_damage/initSettings.sqf @@ -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", diff --git a/addons/medical_damage/stringtable.xml b/addons/medical_damage/stringtable.xml index 20465959e0..74c29d97a7 100644 --- a/addons/medical_damage/stringtable.xml +++ b/addons/medical_damage/stringtable.xml @@ -777,6 +777,14 @@ 当一个人的疼痛超过承受能力的极限时,他陷入昏迷的概率。 고통 한계점을 넘을 시 기절하는 확률을 정합니다. + + Pain Unconscious Threshold + Порог боли для потери сознания + + + Sets the threshold for severe pain, above which a person can fall unconscious upon receiving damage. + Устанавливает количество боли от полученной травмы, при котором юнит может потерять сознание. + Fatal Injury Death Chance Вероятность смерти от смертельной травмы diff --git a/addons/medical_engine/XEH_preInit.sqf b/addons/medical_engine/XEH_preInit.sqf index 8157baa4ec..da2ab02141 100644 --- a/addons/medical_engine/XEH_preInit.sqf +++ b/addons/medical_engine/XEH_preInit.sqf @@ -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}; diff --git a/addons/medical_engine/script_macros_medical.hpp b/addons/medical_engine/script_macros_medical.hpp index 962c8d6219..2924d83b13 100644 --- a/addons/medical_engine/script_macros_medical.hpp +++ b/addons/medical_engine/script_macros_medical.hpp @@ -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)