Port initial Bay12 object listener fix (#2106)

Port of Baystation12/Baystation12#13264

Large PR to put into Master, but the bug is really annoying and since it affect a traitor item, an often used one, I'll take the risk.

Fixes #1956
Fixes explosives implants and lawgiver not working.
This commit is contained in:
skull132
2017-04-19 10:15:19 +03:00
committed by GitHub
parent e54af87ebf
commit 77c7e23ebe
15 changed files with 215 additions and 76 deletions
+9
View File
@@ -211,6 +211,15 @@
return 1
/obj/item/device/assembly_holder/New()
..()
listening_objects += src
/obj/item/device/assembly_holder/Destroy()
listening_objects -= src
return ..()
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking)
if(a_right)
a_right.hear_talk(M,msg,verb,speaking)
+9 -1
View File
@@ -7,6 +7,14 @@
var/listening = 0
var/recorded //the activation message
/obj/item/device/assembly/voice/New()
..()
listening_objects += src
/obj/item/device/assembly/voice/Destroy()
listening_objects -= src
return ..()
/obj/item/device/assembly/voice/hear_talk(mob/living/M as mob, msg)
if(listening)
recorded = msg
@@ -33,4 +41,4 @@
/obj/item/device/assembly/voice/toggle_secure()
. = ..()
listening = 0
listening = 0