Simple animals (wraiths, juggernauts, etc) can now be targeted by turrets. They can also destroy turrets

Simple animals can now smash lights.

Simple animals use their attack value vs grilles now, I'm not sure why they didn't before. This means juggernauts should smash them quickly, and artificers much more slowly.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3964 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
kortgstation@gmail.com
2012-07-01 23:37:54 +00:00
parent 47bb6e7588
commit 51d0fbc3ce
3 changed files with 34 additions and 2 deletions
+22 -1
View File
@@ -148,6 +148,9 @@
for(var/obj/mecha/M in protected_area.turretTargets)
if(M.occupant)
new_targets += M
for(var/mob/living/simple_animal/M in protected_area.turretTargets)
if(!M.stat)
new_targets += M
if(new_targets.len)
new_target = pick(new_targets)
return new_target
@@ -386,19 +389,37 @@
onclose(user, "turretid")
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M] [M.attacktext] [src]!</B>"), 1)
src.health -= M.melee_damage_upper
if (src.health <= 0)
src.die()
else
M << "\red That object is useless to you."
return
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
src.health -= 15
src.health -= M.
if (src.health <= 0)
src.die()
else
M << "\green That object is useless to you."
return
/obj/machinery/turretid/Topic(href, href_list)
..()
if (src.locked)
+1 -1
View File
@@ -88,7 +88,7 @@
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(4)
src.health -= M.melee_damage_upper
healthcheck()
return
+11
View File
@@ -455,6 +455,17 @@
M.show_message("\red [user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
broken()
return
/obj/machinery/light/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper == 0) return
if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
M << "\red That object is useless to you."
return
else if (status == LIGHT_OK||status == LIGHT_BURNED)
for(var/mob/O in viewers(src))
O.show_message("\red [M.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
broken()
return
// attack with hand - remove tube/bulb
// if hands aren't protected and the light is on, burn the player