Simple mobs who can attack (not Ian) can now destroy windows/grilles.

Ectoplasm can now be used to make GHOST BURGERS.

Fixed a bug from my last commit involving simple mobs interacting with walls.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2978 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
kortgstation@gmail.com
2012-01-20 19:52:27 +00:00
parent fa01234c5f
commit 937ce838f7
6 changed files with 52 additions and 1 deletions
+9
View File
@@ -81,6 +81,15 @@
healthcheck()
return
attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
playsound(src.loc, 'grillehit.ogg', 80, 1)
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(4)
healthcheck()
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
+24
View File
@@ -138,6 +138,30 @@
return
return
/obj/structure/window/attack_animal(mob/living/simple_animal/M as mob)
if (M.melee_damage_upper == 0)
return
M << text("\green You smash against the window.")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\red [] smashes against the window.", M)
playsound(src.loc, 'Glasshit.ogg', 100, 1)
src.health -= M.melee_damage_upper
if(src.health <= 0)
M << text("\green You smash through the window.")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\red [] smashes through the window!", M)
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attack_metroid()
if(!istype(usr, /mob/living/carbon/metroid/adult))
return