[MIRROR] Makes action buttons call the correct procs (#2902)

* Makes action buttons call the correct procs (#30921)

* Makes action buttons call the correct procs

* Changed to mob/living proc

* CB

* Makes action buttons call the correct procs
This commit is contained in:
CitadelStationBot
2017-09-22 19:00:34 -05:00
committed by Poojawa
parent 0925853992
commit 944753dccd
2 changed files with 24 additions and 7 deletions
+20 -6
View File
@@ -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
+4 -1
View File
@@ -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)