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:
@@ -28,6 +28,7 @@ namespace Content.Client.Tabletop
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly AppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SpriteSystem _sprite = default!;
|
||||
|
||||
// Time in seconds to wait until sending the location of a dragged entity to the server again
|
||||
private const float Delay = 1f / 10; // 10 Hz
|
||||
@@ -224,12 +225,12 @@ namespace Content.Client.Tabletop
|
||||
// the appearance handle the rest
|
||||
if (_appearance.TryGetData<Vector2>(uid, TabletopItemVisuals.Scale, out var scale, args.Component))
|
||||
{
|
||||
args.Sprite.Scale = scale;
|
||||
_sprite.SetScale((uid, args.Sprite), scale);
|
||||
}
|
||||
|
||||
if (_appearance.TryGetData<int>(uid, TabletopItemVisuals.DrawDepth, out var drawDepth, args.Component))
|
||||
{
|
||||
args.Sprite.DrawDepth = drawDepth;
|
||||
_sprite.SetDrawDepth((uid, args.Sprite), drawDepth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +282,7 @@ namespace Content.Client.Tabletop
|
||||
if (eye == null)
|
||||
return MapCoordinates.Nullspace;
|
||||
|
||||
var size = (Vector2) viewport.ViewportSize / EyeManager.PixelsPerMeter; // Convert to tiles instead of pixels
|
||||
var size = (Vector2)viewport.ViewportSize / EyeManager.PixelsPerMeter; // Convert to tiles instead of pixels
|
||||
var eyePosition = eye.Position.Position;
|
||||
var eyeRotation = eye.Rotation;
|
||||
var eyeScale = eye.Scale;
|
||||
|
||||
Reference in New Issue
Block a user