Fix broken state when attempting to escape a locker while cuffed (#42313)
Check that the DoAfter starts successfully instead of just assuming it does.
This commit is contained in:
parent
32d5681e9e
commit
04b9645b62
|
|
@ -57,9 +57,12 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||||
NeedHand = false, //No hands 'cause we be kickin'
|
NeedHand = false, //No hands 'cause we be kickin'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Make sure the do after is able to start
|
||||||
|
if (!_doAfterSystem.TryStartDoAfter(doAfterEventArgs))
|
||||||
|
return;
|
||||||
|
|
||||||
resistLockerComponent.IsResisting = true;
|
resistLockerComponent.IsResisting = true;
|
||||||
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-start-resisting"), user, user, PopupType.Large);
|
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-start-resisting"), user, user, PopupType.Large);
|
||||||
_doAfterSystem.TryStartDoAfter(doAfterEventArgs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDoAfter(EntityUid uid, ResistLockerComponent component, DoAfterEvent args)
|
private void OnDoAfter(EntityUid uid, ResistLockerComponent component, DoAfterEvent args)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue