if (args.Sprite == null)
return;
- // If not defined, defaults to standing.
- _appearance.TryGetData<RotationState>(uid, RotationVisuals.RotationState, out var state, args.Component);
+ if (!_appearance.TryGetData<RotationState>(uid, RotationVisuals.RotationState, out var state, args.Component))
+ return;
switch (state)
{
using Content.Shared.Movement.Pulling.Events;
using Content.Shared.Popups;
using Content.Shared.Pulling.Events;
+using Content.Shared.Rotation;
using Content.Shared.Standing;
using Content.Shared.Storage.Components;
using Content.Shared.Stunnable;
buckle.Comp.BuckleTime = _gameTiming.CurTime;
ActionBlocker.UpdateCanMove(buckle);
Appearance.SetData(buckle, StrapVisuals.State, buckle.Comp.Buckled);
+ Appearance.SetData(buckle, RotationVisuals.RotationState, RotationState.Horizontal);
Dirty(buckle);
}
SetBuckledTo(buckle, strap!);
Appearance.SetData(strap, StrapVisuals.State, true);
Appearance.SetData(buckle, BuckleVisuals.Buckled, true);
+ Appearance.SetData(buckle, RotationVisuals.RotationState, RotationState.Horizontal);
_rotationVisuals.SetHorizontalAngle(buckle.Owner, strap.Comp.Rotation);
_rotationVisuals.ResetHorizontalAngle(buckle.Owner);
Appearance.SetData(strap, StrapVisuals.State, strap.Comp.BuckledEntities.Count != 0);
Appearance.SetData(buckle, BuckleVisuals.Buckled, false);
+ Appearance.SetData(buckle, RotationVisuals.RotationState, RotationState.Vertical);
if (HasComp<KnockedDownComponent>(buckle) || _mobState.IsIncapacitated(buckle))
_standing.Down(buckle);