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 GitHub
parent acc95fae5e
commit f8ff3a92aa

View File

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