mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-14 19:30:01 +01:00
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:
@@ -57,9 +57,12 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||
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;
|
||||
_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)
|
||||
|
||||
Reference in New Issue
Block a user