TG: Fixes for detective work. Should fix some of the massive lag, probably caused

by all those list()s that were being made for every atom.  And this is why I
should not code at 2AM.  (A UI overhaul-ish thing will come soon for the
detective computer.)
Revision: r3257
Author: 	 joe.heinemeyer
This commit is contained in:
Ren Erthilo
2012-04-25 23:26:42 +01:00
parent 030b1c7f6a
commit d5d4e8b506
3 changed files with 22 additions and 15 deletions

View File

@@ -385,6 +385,20 @@
user << browse(t, "window=turretid")
onclose(user, "turretid")
/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
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)
@@ -400,6 +414,12 @@
src.attack_hand(usr)
/obj/machinery/turretid/proc/updateTurrets()
if(control_area)
for (var/obj/machinery/turret/aTurret in get_area_all_atoms(control_area))
aTurret.setState(enabled, lethal)
src.update_icons()
/obj/machinery/turretid/proc/update_icons()
if (src.enabled)
if (src.lethal)
src.icon_state = "motion1"
@@ -417,20 +437,6 @@
for (var/obj/machinery/turret/aTurret in turrets)
aTurret.setState(enabled, lethal)
/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
if (src.health <= 0)
src.die()
else
M << "\green That object is useless to you."
return
/obj/structure/turret/gun_turret
name = "Gun Turret"
density = 1

View File

@@ -1,3 +1,4 @@
/*
CONTAINS:
T-RAY