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);
switch (strap.Comp.Position)
{
case StrapPosition.Stand:
- _standing.Stand(buckle);
+ _standing.Stand(buckle, force: true);
break;
case StrapPosition.Down:
- _standing.Down(buckle, false, false);
+ _standing.Down(buckle, false, false, force: true);
break;
}
_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);
+ _standing.Down(buckle, playSound: false);
else
_standing.Stand(buckle);
return !standingState.Standing;
}
- public bool Down(EntityUid uid, bool playSound = true, bool dropHeldItems = true,
+ public bool Down(EntityUid uid,
+ bool playSound = true,
+ bool dropHeldItems = true,
+ bool force = false,
StandingStateComponent? standingState = null,
AppearanceComponent? appearance = null,
HandsComponent? hands = null)
RaiseLocalEvent(uid, new DropHandItemsEvent(), false);
}
- var msg = new DownAttemptEvent();
- RaiseLocalEvent(uid, msg, false);
+ if (!force)
+ {
+ var msg = new DownAttemptEvent();
+ RaiseLocalEvent(uid, msg, false);
- if (msg.Cancelled)
- return false;
+ if (msg.Cancelled)
+ return false;
+ }
standingState.Standing = false;
Dirty(uid, standingState);