Skip to content

Commit

Permalink
Merge pull request #562 from sailro/noflash
Browse files Browse the repository at this point in the history
Add noflash feature
  • Loading branch information
sailro authored Sep 11, 2024
2 parents 0ae1c64 + 0570c89 commit 6cb895b
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 1 deletion.
34 changes: 34 additions & 0 deletions Features/NoFlash.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using EFT.Trainer.Properties;
using JetBrains.Annotations;

#nullable enable

namespace EFT.Trainer.Features;

[UsedImplicitly]
internal class NoFlash : ToggleFeature
{
public override string Name => Strings.FeatureNoFlashName;
public override string Description => Strings.FeatureNoFlashDescription;

public override bool Enabled { get; set; } = false;

protected override void UpdateWhenEnabled()
{
var camera = GameState.Current?.Camera;
if (camera == null)
return;

if (camera.GetComponent<GrenadeFlashScreenEffect>() is { enabled: true } flash)
{
flash.enabled = false;
flash.EffectStrength = 0;
}

if (camera.GetComponent<EyeBurn>() is { enabled: true } eyeburn)
{
eyeburn.enabled = false;
eyeburn.EyesBurn = false;
}
}
}
1 change: 1 addition & 0 deletions NLog.EFT.Trainer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<Compile Include="Features\NoCollision.cs" />
<Compile Include="Features\NoSway.cs" />
<Compile Include="Features\NoRecoil.cs" />
<Compile Include="Features\NoFlash.cs" />
<Compile Include="Features\NoVisor.cs" />
<Compile Include="Features\Players.cs" />
<Compile Include="Features\PointOfInterest.cs" />
Expand Down
18 changes: 18 additions & 0 deletions Properties/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Properties/Strings.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -943,4 +943,10 @@ Les couleurs sont stockées sous la forme d'un tableau de valeurs flottantes 'RG
<data name="CommandSpawnHideoutItems" xml:space="preserve">
<value>spawnhi</value>
</data>
<data name="FeatureNoFlashName" xml:space="preserve">
<value>noflash</value>
</data>
<data name="FeatureNoFlashDescription" xml:space="preserve">
<value>Pas d'effet de flash persistant ou de brûlure oculaire après une grenade flash.</value>
</data>
</root>
6 changes: 6 additions & 0 deletions Properties/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -943,4 +943,10 @@ Colors are stored as an array of 'RGBA' floats</value>
<data name="CommandSpawnHideoutItems" xml:space="preserve">
<value>spawnhi</value>
</data>
<data name="FeatureNoFlashName" xml:space="preserve">
<value>noflash</value>
</data>
<data name="FeatureNoFlashDescription" xml:space="preserve">
<value>No persistent flash or eye-burn effect after a flash grenade.</value>
</data>
</root>
8 changes: 7 additions & 1 deletion Properties/Strings.zh-cn.resx
Original file line number Diff line number Diff line change
Expand Up @@ -944,4 +944,10 @@
<data name="CommandSpawnHideoutItems" xml:space="preserve">
<value>spawnhi</value>
</data>
</root>
<data name="FeatureNoFlashName" xml:space="preserve">
<value>不闪烁</value>
</data>
<data name="FeatureNoFlashDescription" xml:space="preserve">
<value>闪光弹爆炸后不会产生持续闪光或灼伤眼睛的效果。</value>
</data>
</root>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This is an attempt -for educational purposes only- to alter a Unity game at runt
| `Map` | `map` | Full screen map with radar esp. |
| `NightVision` | `night` | Night vision. |
| `NoCollision` | `nocoll` | No physical collisions, making you immune to bullets, grenades and barbed wires. |
| `NoFlash` | `noflash` | No persistent flash or eye-burn effect after a flash grenade. |
| `NoMalfunctions` | `nomal` | No weapon malfunctions: no misfires or failures to eject or feed. No jammed bolts or overheating. |
| `NoRecoil` | `norecoil` | No recoil. |
| `NoSway` | `nosway` | No sway. |
Expand Down Expand Up @@ -126,6 +127,7 @@ This trainer hooks into the command system, so you can easily setup features usi
| loot | `on` or `off` | | Show/Hide tracked items |
| night | `on` or `off` | `off` | Enable/Disable night vision |
| nocoll | `on` or `off` | `off` | Disable/Enable physical collisions |
| noflash | `on` or `off` | `off` | Disable/Enable flash/eyeburn effects |
| nomal | `on` or `off` | `off` | Disable/Enable weapon malfunctions |
| norecoil | `on` or `off` | `off` | Disable/Enable recoil |
| nosway | `on` or `off` | `off` | Disable/Enable sway |
Expand Down

0 comments on commit 6cb895b

Please sign in to comment.