diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index ad0d20f4ed..9f4ece96f8 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -212,7 +212,7 @@ Proc for attack log creation, because really why not if (progbar) qdel(progbar) -/proc/do_after(mob/user, delay, atom/target = null, needhand = 1, progress = 1) +/proc/do_after(mob/user, delay, atom/target = null, needhand = 1, progress = 1, var/incapacitation_flags = INCAPACITATION_DEFAULT) if(!user) return 0 var/atom/target_loc = null @@ -235,7 +235,7 @@ Proc for attack log creation, because really why not if (progress) progbar.update(world.time - starttime) - if(!user || user.incapacitated() || user.loc != original_loc) + if(!user || user.incapacitated(incapacitation_flags) || user.loc != original_loc) . = 0 break diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm index 07248927bd..8b6f722718 100644 --- a/code/modules/mob/living/carbon/resist.dm +++ b/code/modules/mob/living/carbon/resist.dm @@ -1,4 +1,3 @@ - /mob/living/carbon/process_resist() //drop && roll @@ -17,9 +16,12 @@ "You extinguish yourself." ) ExtinguishMob() - return + return TRUE - else if(handcuffed) + if(..()) + return TRUE + + if(handcuffed) spawn() escape_handcuffs() else if(legcuffed) spawn() escape_legcuffs() @@ -57,8 +59,8 @@ "You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" ) - if(do_after(src, breakouttime)) - if(!handcuffed) + if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) + if(!handcuffed || buckled) return visible_message( "\The [src] manages to remove \the [handcuffed]!", @@ -91,7 +93,7 @@ "You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" ) - if(do_after(src, breakouttime)) + if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) if(!legcuffed || buckled) return visible_message( @@ -113,7 +115,7 @@ "You attempt to break your [handcuffed.name]. (This will take around 5 seconds and you need to stand still)" ) - if(do_after(src, 50)) + if(do_after(src, 5 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) if(!handcuffed || buckled) return @@ -134,7 +136,7 @@ src << "You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)" visible_message("[src] is trying to break the legcuffs!") - if(do_after(src, 50)) + if(do_after(src, 5 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) if(!legcuffed || buckled) return @@ -166,7 +168,7 @@ "You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)" ) - if(do_after(usr, 1200)) + if(do_after(usr, 2 MINUTES, incapacitation_flags = INCAPACITATION_DEFAULT & ~(INCAPACITATION_RESTRAINED | INCAPACITATION_BUCKLED_FULLY))) if(!buckled) return visible_message("[usr] manages to unbuckle themself!", diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 11ec46fde5..f3e1173d53 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -581,11 +581,13 @@ default behaviour is: //unbuckling yourself if(buckled) spawn() escape_buckle() + return TRUE //Breaking out of a locker? if( src.loc && (istype(src.loc, /obj/structure/closet)) ) var/obj/structure/closet/C = loc spawn() C.mob_breakout(src) + return TRUE /mob/living/proc/escape_inventory(obj/item/weapon/holder/H) if(H != src.loc) return