From 096e7d4d67488b2cf9c68f683615d8e4819554fa Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 16 Jun 2021 01:31:53 +0300 Subject: [PATCH] https://github.com/tgstation/tgstation/pull/49927 --- code/modules/research/nanites/nanite_programs/sensor.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm index 77c4dd84f1..c03a70c116 100644 --- a/code/modules/research/nanites/nanite_programs/sensor.dm +++ b/code/modules/research/nanites/nanite_programs/sensor.dm @@ -236,8 +236,6 @@ /datum/nanite_program/sensor/voice name = "Voice Sensor" desc = "The nanites receive a signal when they detect a specific, preprogrammed word or phrase being said." - desc = "Sends a signal when the nanites hear a determined word or sentence." - var/spent = FALSE /datum/nanite_program/sensor/voice/register_extra_settings() . = ..() @@ -249,16 +247,17 @@ RegisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear) /datum/nanite_program/sensor/voice/on_mob_remove() - UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear) + UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR) /datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args) + SIGNAL_HANDLER var/datum/nanite_extra_setting/sentence = extra_settings[NES_SENTENCE] var/datum/nanite_extra_setting/inclusive = extra_settings[NES_INCLUSIVE_MODE] if(!sentence.get_value()) return if(inclusive.get_value()) - if(findtextEx(hearing_args[HEARING_RAW_MESSAGE], sentence)) + if(findtext(hearing_args[HEARING_RAW_MESSAGE], sentence.get_value())) send_code() else - if(hearing_args[HEARING_RAW_MESSAGE] == sentence) + if(lowertext(hearing_args[HEARING_RAW_MESSAGE]) == lowertext(sentence.get_value())) send_code()