From da7ae3c049a1c4810e20a2d9f58fa2018bbf5449 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 14 Jul 2014 22:06:14 -0400 Subject: [PATCH] Moves turf collision handling into living_defense Conflicts: code/modules/mob/living/living_defense.dm --- code/game/atoms.dm | 2 +- code/modules/mob/living/living_defense.dm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3408492e8a9..94199066e55 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -43,7 +43,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/Del() // Pass to Destroy(). diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index d8aa866fa8b..2b5f1671fac 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -78,6 +78,9 @@ dtype = W.damtype if (W.hitsound && W.throwforce > 0) playsound(loc, W.hitsound, 30, 1, -1) + + //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].") @@ -126,6 +129,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)