Add setting and take epilepsy friendly mode into account

This commit is contained in:
johnb432 2024-07-20 12:23:41 +02:00
parent 7f7fbf5efa
commit 1ef4cd4c3b
4 changed files with 24 additions and 3 deletions

View File

@ -231,11 +231,11 @@ class GVAR(actions) {
displayName = CSTRING(Actions_CheckPulse);
displayNameProgress = CSTRING(Check_Pulse_Content);
allowedSelections[] = {"All"};
treatmentTime = 15;
condition = QUOTE(GVAR(advancedDiagnose) != 0);
treatmentTime = QUOTE([ARR_2(2.5,15)] select GVAR(enableRealisticPulseChecking));
condition = QUOTE(GVAR(advancedDiagnose) != 0 && {!GVAR(enableRealisticPulseChecking) || {(_medic getSlotItemName TYPE_WATCH) isKindOf [ARR_2('ItemWatch',configFile >> 'CfgWeapons')]}});
callbackSuccess = QFUNC(checkPulse);
callbackProgress = QFUNC(checkPulseProgress);
callbackFailure = QUOTE(QQGVAR(checkPulse) cutText [ARR_2('','PLAIN')];);
callbackFailure = QUOTE(QQGVAR(checkPulse) cutText [ARR_2('','PLAIN')]);
animationMedicProne = "";
animationMedicSelfProne = "";
};

View File

@ -17,6 +17,8 @@
* Public: No
*/
if (!GVAR(enableRealisticPulseChecking)) exitWith {true};
(_this select 0) params ["", "_patient"];
private _display = uiNamespace getVariable [QGVAR(checkPulseDisplay), displayNull];
@ -33,6 +35,10 @@ if (isNull _display) then {
if (CBA_missionTime > _nextPulse) then { _display setVariable [QGVAR(lastPulse), _nextPulse]; };
private _fade = (linearConversion [-0.1, 0, CBA_missionTime - _nextPulse, 0, 0.85, true] max linearConversion [0.35, 0, CBA_missionTime - _lastPulse, 0, 0.75, true]) ^ 2;
if (EGVAR(common,epilepsyFriendlyMode)) then {
_fade = _fade min 0.2;
};
private _ctrlVignette = _display displayCtrl 5000;
_ctrlVignette ctrlSetTextColor [0, 0, 0, _fade];

View File

@ -16,6 +16,15 @@
true
] call CBA_fnc_addSetting;
[
QGVAR(enableRealisticPulseChecking),
"CHECKBOX",
[LSTRING(RealisticPulseChecking_DisplayName), LSTRING(RealisticPulseChecking_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
true,
true
] call CBA_fnc_addSetting;
[
QGVAR(advancedBandages),
"LIST",

View File

@ -116,6 +116,12 @@
<Spanish>Habilita el manejo de la medicación más avanzada y en profundidad. Tambien permite el uso de Adenosina.</Spanish>
<Korean>더욱 더 확장된, 깊은 약물 치료를 활성화합니다. 또한 아데노신 기능을 활성화합니다.</Korean>
</Key>
<Key ID="STR_ACE_Medical_Treatment_RealisticPulseChecking_DisplayName">
<English>Realistic Pulse Checking</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_RealisticPulseChecking_Description">
<English>Enables realistic pulse checking, which requires a watch.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedBandages_DisplayName">
<English>Advanced Bandages</English>
<German>Erweiterte Bandagen</German>