Improve buckling's interactions with standing state (#29741)
This commit is contained in:
@@ -25,7 +25,10 @@ namespace Content.Shared.Standing
|
||||
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)
|
||||
@@ -49,11 +52,14 @@ namespace Content.Shared.Standing
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user