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:
Tayrtahn 2026-01-08 16:18:23 -05:00 committed by BarryNorfolk
parent 32d5681e9e
commit 04b9645b62
1 changed files with 4 additions and 1 deletions

View File

@ -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)