Skip to content

Commit

Permalink
Goggles - Add effect event for API (#10314)
Browse files Browse the repository at this point in the history
Co-authored-by: Grim <[email protected]>
  • Loading branch information
MiszczuZPolski and LinkIsGrim authored Sep 17, 2024
1 parent b662de6 commit a5f8b89
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/goggles/functions/fnc_applyDirtEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if ([_unit] call FUNC(isGogglesVisible)) then {

private _effectBrightness = linearConversion [0,1,([] call EFUNC(common,ambientBrightness)),0.25,1];
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1];
[QGVAR(effect), [_unit, "dirt"]] call CBA_fnc_localEvent;
TRACE_1("dirt",_effectBrightness);
};
};
Expand Down
1 change: 1 addition & 0 deletions addons/goggles/functions/fnc_applyDustEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ GVAR(DustHandler) = [{

GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 2;
[QGVAR(effect), [_unit, "dust"]] call CBA_fnc_localEvent;

[{
if (GVAR(DustHandler) == -1) then {
Expand Down
1 change: 1 addition & 0 deletions addons/goggles/functions/fnc_applyRainEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if (GVAR(RainLastLevel) != rain) then {
GVAR(RainDrops) setParticleClass "ACERainEffect";
GVAR(RainDrops) setDropInterval (0.07 * (1.1 - GVAR(RainLastLevel)));
GVAR(RainDrops) attachTo [vehicle _unit, [0,0,0]];
[QGVAR(effect), [_unit, "rain"]] call CBA_fnc_localEvent;
};
} else {
if (GVAR(RainLastLevel) > 0.05) then {
Expand Down
1 change: 1 addition & 0 deletions addons/goggles/functions/fnc_applyRotorWashEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@ if (_rotorWash select 1 > 0) then {
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_scale, _scale, _scale, _scale], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 0.5;
GVAR(PostProcessEyes) ppEffectEnable true;
[QGVAR(effect), [_unit, "rotorWash"]] call CBA_fnc_localEvent;
};
};
1 change: 1 addition & 0 deletions docs/wiki/framework/goggles-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ class CfgGlasses {
| ---------- | ----------- | ------------------- | -------- |
| `ace_glassesChanged` | Glasses Changed | `[_unit, _glassesClass]` | Local |
| `ace_glassesCracked` | Glasses Cracked | `[_unit]` | Local |
| `ace_goggles_effect` | Applied Goggle Effect | `[_unit, "cause"]` | Local

0 comments on commit a5f8b89

Please sign in to comment.