Skip to content

Commit ae47a9f

Browse files
BaerMitUmlautAndreasBrostrom
authored andcommitted
Common - Add epilepsy friendly mode (acemod#8452)
* Add epilepsy friendly mode * Disable LSD vehicles in epilepsy friendly mode
1 parent 1cba199 commit ae47a9f

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

addons/common/functions/fnc_moduleLSDVehicles.sqf

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
params ["", "_units", "_activated"];
1919

20-
if !(_activated) exitWith {};
20+
if (!_activated || {GVAR(epilepsyFriendlyMode)}) exitWith {};
2121

2222
if (isNil QGVAR(LSD_Vehicles)) then {
2323
GVAR(LSD_Vehicles) = [];

addons/common/initSettings.sqf

+9
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@
1616
true,
1717
true
1818
] call CBA_fnc_addSetting;
19+
20+
[
21+
QGVAR(epilepsyFriendlyMode),
22+
"CHECKBOX",
23+
[LSTRING(EpilepsyFriendlyMode), LSTRING(EpilepsyFriendlyModeTooltip)],
24+
format ["ACE %1", localize LSTRING(DisplayName)],
25+
false,
26+
2
27+
] call CBA_fnc_addSetting;

addons/common/stringtable.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,14 @@
13791379
<Spanish>Permitir a los scripts de ACE reducir el volumen la música</Spanish>
13801380
<Turkish>ACE scripti müziği kısmana izin verir</Turkish>
13811381
</Key>
1382+
<Key ID="STR_ACE_Common_EpilepsyFriendlyMode">
1383+
<English>Epilepsy friendly mode</English>
1384+
<German>Epilepsiefreundlicher Modus</German>
1385+
</Key>
1386+
<Key ID="STR_ACE_Common_EpilepsyFriendlyModeTooltip">
1387+
<English>Disables some flashing light effects to reduce seizure risk.</English>
1388+
<German>Deaktiviert einige Lichtflackereffekte um das Risiko von Epilepsieanfällen zu reduzieren.</German>
1389+
</Key>
13821390
<Key ID="STR_ACE_Common_FlagBlack">
13831391
<English>Flag (ACE - Black)</English>
13841392
<German>Flagge (Ace - Schwarz)</German>

addons/grenades/functions/fnc_flashbangExplosionEH.sqf

+3-1
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
122122

123123
// Blind player
124124
if (_strength > 0.1) then {
125+
private _blend = [[1,1,1,0], [0.3,0.3,0.3,1]] select EGVAR(common,epilepsyFriendlyMode);
126+
125127
GVAR(flashbangPPEffectCC) ppEffectEnable true;
126-
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
128+
GVAR(flashbangPPEffectCC) ppEffectAdjust [1, 1, (0.8 + _strength) min 1, _blend, [0,0,0,1], [0,0,0,0]];
127129
GVAR(flashbangPPEffectCC) ppEffectCommit 0.01;
128130

129131
//PARTIALRECOVERY - start decreasing effect over time

addons/nightvision/functions/fnc_onFiredPlayer.sqf

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
1919
TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile);
2020

21-
if ((!GVAR(running)) || {!GVAR(shutterEffects)} || {_weapon == "throw"} || {_weapon == "put"}) exitWith {};
21+
if ((!GVAR(running))
22+
|| {!GVAR(shutterEffects)}
23+
|| {EGVAR(common,epilepsyFriendlyMode)}
24+
|| {_weapon == "throw"}
25+
|| {_weapon == "put"}
26+
) exitWith {};
2227

2328
private _visibleFireCoef = 1;
2429
if (_unit == ace_player) then {

0 commit comments

Comments
 (0)