Moves turf collision handling into living_defense

This commit is contained in:
mwerezak
2014-07-14 22:06:14 -04:00
parent 5cf3162f53
commit 177560cf4b
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
step(src, turn(src.dir, 180))
if(istype(src,/mob/living))
var/mob/living/M = src
M.take_organ_damage(20)
M.turf_collision(T, speed)
/atom/proc/assume_air(datum/gas_mixture/giver)
@@ -73,6 +73,9 @@
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
//run to-hit check here
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
@@ -117,6 +120,9 @@
src.anchored = 1
src.pinned += O
//This is called when the mob is thrown into a dense turf
/mob/living/proc/turf_collision(var/turf/T, var/speed)
src.take_organ_damage(speed*4)
/mob/living/proc/near_wall(var/direction,var/distance=1)
var/turf/T = get_step(get_turf(src),direction)