11using System . Numerics ;
2+ using Content . Shared . _DV . CCVars ; // DeltaV - Enable Stars via CVar.
23using Content . Shared . CombatMode ;
34using Content . Shared . Interaction ;
45using Content . Shared . Stunnable ;
56using Robust . Client . Animations ;
67using Robust . Client . GameObjects ;
78using Robust . Shared . Animations ;
9+ using Robust . Shared . Configuration ; // DeltaV - Enable Stars via CVar.
810using Robust . Shared . Input ;
911using Robust . Shared . Input . Binding ;
1012using Robust . Shared . Random ;
@@ -13,6 +15,7 @@ namespace Content.Client.Stunnable;
1315
1416public sealed class StunSystem : SharedStunSystem
1517{
18+ [ Dependency ] private readonly IConfigurationManager _cfg = default ! ; // DeltaV - Enable Stars via CVar.
1619 [ Dependency ] private readonly SharedCombatModeSystem _combat = default ! ;
1720 [ Dependency ] private readonly IRobustRandom _random = default ! ;
1821 [ Dependency ] private readonly SpriteSystem _spriteSystem = default ! ;
@@ -78,6 +81,9 @@ private void UpdateAppearance(Entity<SpriteComponent?> entity, string state)
7881
7982 var visible = Appearance . TryGetData < bool > ( entity , StunVisuals . SeeingStars , out var stars ) && stars ;
8083
84+ if ( visible && ! _cfg . GetCVar ( DCCVars . ShowStunVisuals ) ) // DeltaV - Enable Stars via CVar.
85+ visible = false ;
86+
8187 _spriteSystem . LayerSetVisible ( ( entity , entity . Comp ) , index , visible ) ;
8288 _spriteSystem . LayerSetRsiState ( ( entity , entity . Comp ) , index , state ) ;
8389 }
0 commit comments