Cleanup more SpriteComponent warnings (part 2) (#37527)
* Cleanup warnings in MagazineVisualsSpriteTest * Cleanup warnings in WiresVisualizerSystem * Cleanup warnings in GunSystem.SpentAmmo * Cleanup warnings in GunSystem * Cleanup warnings in GunSystem.ChamberMagazine * Cleanup warnings in MeleeWeaponSystem.Effects * Cleanup warnings in ToggleableLightVisualsSystem * Cleanup warnings in StatusIconOverlay * Cleanup warnings in SpriteFadeSystem * Cleanup warnings in PdaVisualizerSystem * Cleanup warnings in EnvelopeSystem * Cleanup warnings in MechSystem * Cleanup warnings in MappingOverlay * Cleanup warnings in LockVisualizerSystem * Cleanup warnings in DragDropSystem * Cleanup warnings in GhostSystem * Cleanup warnings in TriggerSystem.Proximity * Cleanup warnings in DragonSystem * Cleanup warnings in PortableScrubberVisualsSystem * File-scoped namespace for PortableScrubberVisualsSystem
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System.Numerics;
|
||||
using Content.Client.Gameplay;
|
||||
using Content.Shared.Sprite;
|
||||
using Robust.Client.GameObjects;
|
||||
@@ -10,7 +9,6 @@ using Robust.Client.UserInterface;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Content.Client.Sprite;
|
||||
|
||||
@@ -28,6 +26,7 @@ public sealed class SpriteFadeSystem : EntitySystem
|
||||
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SpriteSystem _sprite = default!;
|
||||
|
||||
private List<(MapCoordinates Point, bool ExcludeBoundingBox)> _points = new();
|
||||
|
||||
@@ -58,7 +57,7 @@ public sealed class SpriteFadeSystem : EntitySystem
|
||||
if (MetaData(uid).EntityLifeStage >= EntityLifeStage.Terminating || !TryComp<SpriteComponent>(uid, out var sprite))
|
||||
return;
|
||||
|
||||
sprite.Color = sprite.Color.WithAlpha(component.OriginalAlpha);
|
||||
_sprite.SetColor((uid, sprite), sprite.Color.WithAlpha(component.OriginalAlpha));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -132,7 +131,7 @@ public sealed class SpriteFadeSystem : EntitySystem
|
||||
|
||||
if (!sprite.Color.A.Equals(newColor))
|
||||
{
|
||||
sprite.Color = sprite.Color.WithAlpha(newColor);
|
||||
_sprite.SetColor((ent, sprite), sprite.Color.WithAlpha(newColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,7 +156,7 @@ public sealed class SpriteFadeSystem : EntitySystem
|
||||
|
||||
if (!newColor.Equals(sprite.Color.A))
|
||||
{
|
||||
sprite.Color = sprite.Color.WithAlpha(newColor);
|
||||
_sprite.SetColor((uid, sprite), sprite.Color.WithAlpha(newColor));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user