TG: 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.
Revision: r2978
Author: 	 kortgstation
This commit is contained in:
Ren Erthilo
2012-04-16 22:19:57 +01:00
parent d72dd39f21
commit a5613a7aa0
5 changed files with 52 additions and 0 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