Voice trigger fixes

This commit is contained in:
ZomgPonies
2013-11-24 03:21:37 -05:00
parent 9756d1e311
commit 9f2091983e
2 changed files with 14 additions and 3 deletions
+10 -3
View File
@@ -48,12 +48,13 @@
proc/holder_movement() //Called when the holder is moved
return
proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
interact(mob/user as mob) //Called when attack_self is called
return
proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
process_cooldown()
cooldown--
if(cooldown <= 0) return 0
@@ -79,6 +80,12 @@
// connected.Pulse(src)
// if(radio && (wires & WIRE_RADIO_PULSE))
//Not sure what goes here quite yet send signal?
if(istype(loc,/obj/item/weapon/grenade)) // This is a hack. Todo: Manage this better -Sayu
var/obj/item/weapon/grenade/G = loc
G.prime() // Adios, muchachos
return 1
+4
View File
@@ -17,6 +17,8 @@
return "[src] is deactivated."
hear_talk(mob/living/M as mob, msg)
if(!istype(M,/mob/living))
return
if(listening)
recorded = msg
listening = 0
@@ -25,6 +27,8 @@
else
if(findtext(msg, recorded))
pulse(0)
var/turf/T = get_turf(src) //otherwise it won't work in hand
T.visible_message("\icon[src] \red beeps!")
activate()
return // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way.