Fix a bunch of warnings (#10886)

* Fix a bunch of warnings

Also made ensnareable not broadcast as they're only used directed.
Mainly just Get<T> and AppearanceSystem

* buckle too

* fix tests

Co-authored-by: wrexbe <wrexbe@protonmail.com>
This commit is contained in:
metalgearsloth
2022-08-28 13:26:35 +10:00
committed by GitHub
parent cf84c20f68
commit d767ce9585
17 changed files with 75 additions and 79 deletions

View File

@@ -17,6 +17,7 @@ namespace Content.Shared.Vehicle;
/// </summary>
public abstract partial class SharedVehicleSystem : EntitySystem
{
[Dependency] protected readonly SharedAppearanceSystem Appearance = default!;
[Dependency] private readonly MovementSpeedModifierSystem _modifier = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
@@ -134,10 +135,7 @@ public abstract partial class SharedVehicleSystem : EntitySystem
/// </summary>
protected void UpdateDrawDepth(EntityUid uid, int drawDepth)
{
if (!TryComp<AppearanceComponent>(uid, out var appearance))
return;
appearance.SetData(VehicleVisuals.DrawDepth, drawDepth);
Appearance.SetData(uid, VehicleVisuals.DrawDepth, drawDepth);
}
/// <summary>
@@ -145,10 +143,7 @@ public abstract partial class SharedVehicleSystem : EntitySystem
/// </summary>
protected void UpdateAutoAnimate(EntityUid uid, bool autoAnimate)
{
if (!TryComp<AppearanceComponent>(uid, out var appearance))
return;
appearance.SetData(VehicleVisuals.AutoAnimate, autoAnimate);
Appearance.SetData(uid, VehicleVisuals.AutoAnimate, autoAnimate);
}
}