mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 21:52:42 +00:00
* Begins work on the Industrial expansion, ft hidden Lore * Removed Painite, Quartz, and Void Opal from generation pending their eventual uses. Recipes modified to use them have been reverted of this use. Fix Fix. * Reset map to master. * Add copper to Robotics, R&D, Engineering, and EVA.
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
/obj/item/device/assembly/voice
|
|
name = "voice analyzer"
|
|
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
|
icon_state = "voice"
|
|
origin_tech = list(TECH_MAGNET = 1)
|
|
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, MAT_COPPER = 10, "waste" = 10)
|
|
var/listening = 0
|
|
var/recorded //the activation message
|
|
|
|
/obj/item/device/assembly/voice/hear_talk(mob/M, list/message_pieces, verb)
|
|
var/msg = multilingual_to_message(message_pieces)
|
|
if(listening)
|
|
recorded = msg
|
|
listening = 0
|
|
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
|
T.visible_message("[bicon(src)] beeps, \"Activation message is '[recorded]'.\"")
|
|
else
|
|
if(findtext(msg, recorded))
|
|
pulse(0)
|
|
|
|
/obj/item/device/assembly/voice/activate()
|
|
if(secured)
|
|
if(!holder)
|
|
listening = !listening
|
|
var/turf/T = get_turf(src)
|
|
T.visible_message("[bicon(src)] beeps, \"[listening ? "Now" : "No longer"] recording input.\"")
|
|
|
|
|
|
/obj/item/device/assembly/voice/attack_self(mob/user)
|
|
if(!user)
|
|
return FALSE
|
|
activate()
|
|
return TRUE
|
|
|
|
/obj/item/device/assembly/voice/toggle_secure()
|
|
. = ..()
|
|
listening = 0 |