April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -12,40 +12,42 @@
|
||||
var/listening = 0
|
||||
var/recorded = "" //the activation message
|
||||
var/mode = 1
|
||||
var/global/list/modes = list("inclusive",
|
||||
var/static/list/modes = list("inclusive",
|
||||
"exclusive",
|
||||
"recognizer",
|
||||
"voice sensor")
|
||||
|
||||
/obj/item/device/assembly/voice/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
|
||||
/obj/item/device/assembly/voice/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Use a multitool to swap between \"inclusive\", \"exclusive\", \"recognizer\", and \"voice sensor\" mode.</span>")
|
||||
|
||||
/obj/item/device/assembly/voice/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(speaker == src)
|
||||
return
|
||||
|
||||
if(listening && !radio_freq)
|
||||
record_speech(speaker, raw_message)
|
||||
record_speech(speaker, raw_message, message_language)
|
||||
else
|
||||
if(check_activation(speaker, raw_message))
|
||||
spawn(10)
|
||||
pulse(0)
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/device/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message)
|
||||
/obj/item/device/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
|
||||
switch(mode)
|
||||
if(1)
|
||||
recorded = raw_message
|
||||
listening = 0
|
||||
say("Activation message is '[recorded]'.")
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(2)
|
||||
recorded = raw_message
|
||||
listening = 0
|
||||
say("Activation message is '[recorded]'.")
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(3)
|
||||
recorded = speaker.GetVoice()
|
||||
listening = 0
|
||||
say("Your voice pattern is saved.")
|
||||
say("Your voice pattern is saved.", message_language)
|
||||
if(4)
|
||||
if(length(raw_message))
|
||||
spawn(10)
|
||||
pulse(0)
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/device/assembly/voice/proc/check_activation(atom/movable/speaker, raw_message)
|
||||
. = 0
|
||||
|
||||
Reference in New Issue
Block a user