Cleanup more SpriteComponent warnings (part 4) (#37550)

* Cleanup warnings in ClickableSystem

* Cleanup warnings in FultonSystem

* Cleanup warning in HolidaySystem

* Cleanup warning in DoAfterOverlay

* Cleanup warning in EntityHealthBarOverlay

* Cleanup warning in SmokeVisualizerSystem

* Cleanup warning in VaporVisualizerSystem

* Cleanup warning in ColorFlashEffectSystem

* Cleanup warnings in StealthSystem

* Cleanup warnings in TrayScannerSystem

* Cleanup warnings in InventoryUIController

* Cleanup warnings in HideMechanismsCommand

* Cleanup warning in ShowMechanismsCommand

* Cleanup warnings in EntityPickupAnimationSystem

* Cleanup warnings in PointingSystem

* Cleanup warning in StickyVisualizerSystem

* Cleanup warnings in TabletopSystem

* Cleanup warnings in PillSystem

* Cleanup warnings in DiceSystem

* Cleanup warnings in ProjectileSystem
This commit is contained in:
Tayrtahn
2025-05-17 21:48:11 -04:00
committed by GitHub
parent f098a8e6d5
commit 3dcfc3a99e
20 changed files with 64 additions and 54 deletions

View File

@@ -1,11 +1,9 @@
using System.Numerics;
using Content.Shared.Salvage.Fulton;
using Robust.Shared.Spawners;
using JetBrains.Annotations;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Animations;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Utility;
using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent;
@@ -16,6 +14,7 @@ public sealed class FultonSystem : SharedFultonSystem
{
[Dependency] private readonly ISerializationManager _serManager = default!;
[Dependency] private readonly AnimationPlayerSystem _player = default!;
[Dependency] private readonly SpriteSystem _sprite = default!;
private static readonly TimeSpan AnimationDuration = TimeSpan.FromSeconds(0.4);
@@ -82,8 +81,8 @@ public sealed class FultonSystem : SharedFultonSystem
}
sprite.NoRotation = true;
var effectLayer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResPath("Objects/Tools/fulton_balloon.rsi"), "fulton_balloon"));
sprite.LayerSetOffset(effectLayer, EffectOffset + new Vector2(0f, 0.5f));
var effectLayer = _sprite.AddLayer((animationEnt, sprite), new SpriteSpecifier.Rsi(new ResPath("Objects/Tools/fulton_balloon.rsi"), "fulton_balloon"));
_sprite.LayerSetOffset((animationEnt, sprite), effectLayer, EffectOffset + new Vector2(0f, 0.5f));
var despawn = AddComp<TimedDespawnComponent>(animationEnt);
despawn.Lifetime = 1.5f;