diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 638b4a31cf..b361ef1a78 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -242,9 +242,12 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." icon_state = "fire" /obj/screen/alert/fire/Click() - if(isliving(usr)) - var/mob/living/L = usr - return L.resist() + var/mob/living/L = usr + if(!L.can_resist()) + return + L.changeNext_move(CLICK_CD_RESIST) + if(L.canmove) + return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt. //ALIENS @@ -644,9 +647,20 @@ so as to remain in compliance with the most up-to-date laws." desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself." /obj/screen/alert/restrained/Click() - if(isliving(usr)) - var/mob/living/L = usr - return L.resist() + var/mob/living/L = usr + if(!L.can_resist()) + return + L.changeNext_move(CLICK_CD_RESIST) + if((L.canmove) && (L.last_special <= world.time)) + return L.resist_restraints() + +/obj/screen/alert/restrained/buckled/Click() + var/mob/living/L = usr + if(!L.can_resist()) + return + L.changeNext_move(CLICK_CD_RESIST) + if(L.last_special <= world.time) + return L.resist_buckle() // PRIVATE = only edit, use, or override these if you're editing the system as a whole diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index acea72e911..f31ee2fa95 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -544,11 +544,14 @@ if(!force_moving) ..(pressure_difference, direction, pressure_resistance_prob_delta) +/mob/living/proc/can_resist() + return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE)) + /mob/living/verb/resist() set name = "Resist" set category = "IC" - if(!isliving(src) || next_move > world.time || incapacitated(ignore_restraints = 1)) + if(!can_resist()) return changeNext_move(CLICK_CD_RESIST)