Fixes morgues and crematoriums (includes resisting)

Fixes their trays breaking for 30 seconds, not logging cremations, not
being able to resist out of them, and all these damn uses of src.
This commit is contained in:
Krausus
2015-07-13 07:31:48 -04:00
parent 5d094585e5
commit 5d342baffb
2 changed files with 150 additions and 125 deletions
+15
View File
@@ -485,6 +485,10 @@
if ((!(L.stat) && !(L.restrained())))
resist_grab(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
// Sliding out of a morgue/crematorium
if(loc && (istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
resist_tray(L)
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
resist_buckle(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
@@ -687,6 +691,17 @@
BD.attack_hand(usr)
C.open()
// resist_tray allows a mob to slide themselves out of a morgue or crematorium
/mob/living/proc/resist_tray(var/mob/living/carbon/CM)
if(!istype(CM))
return
if (usr.stat || usr.restrained())
return
usr << "<span class='alert'>You attempt to slide yourself out of \the [loc]...</span>"
var/obj/structure/S = loc
S.attack_hand(src)
/* resist_stop_drop_roll allows a mob to stop, drop, and roll in order to put out a fire burning on them.
*/////
/mob/living/proc/resist_stop_drop_roll(var/mob/living/carbon/CM)