From 9f2091983e5923b8c53142d31a4ca9e8bb6781ec Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 24 Nov 2013 03:21:37 -0500 Subject: [PATCH] Voice trigger fixes --- code/modules/assembly/assembly.dm | 13 ++++++++++--- code/modules/assembly/voice.dm | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 570f6da3b2b..87c52eabf1d 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -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 diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index 0a5c7116c9d..169c2e6170e 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -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.