From 3d8dd28f191d9429ef15bc585fb31eda40cccf8d Mon Sep 17 00:00:00 2001
From: L <105110468+kittysmooch@users.noreply.github.com>
Date: Tue, 22 Oct 2024 00:58:20 -0700
Subject: [PATCH] damn this bitch mute! good for them
---
modular_doppler/modular_items/tts_device.dm | 36 +++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 modular_doppler/modular_items/tts_device.dm
diff --git a/modular_doppler/modular_items/tts_device.dm b/modular_doppler/modular_items/tts_device.dm
new file mode 100644
index 0000000000000..b2fbbca04edb0
--- /dev/null
+++ b/modular_doppler/modular_items/tts_device.dm
@@ -0,0 +1,36 @@
+/obj/item/ttsdevice
+ name = "TTS Device"
+ desc = "A small device with a keyboard attached. Anything entered on the keyboard is played out the speaker. \nAlt-click the device to make it beep. \nCtrl-click to name the device."
+ icon = 'icons/obj/device.dmi'
+ icon_state = "gangtool-purple"
+ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
+ w_class = WEIGHT_CLASS_SMALL
+ obj_flags = UNIQUE_RENAME
+ slot_flags = ITEM_SLOT_BELT
+
+/obj/item/ttsdevice/attack_self(mob/user)
+ var/input = stripped_input(user,"What would you like the device to say?", ,"", 500)
+ if(QDELETED(src) || !user.canUseTopic(src, BE_CLOSE))
+ return
+ if(input)
+ src.say(input)
+ input = null
+
+/obj/item/ttsdevice/AltClick(mob/living/user)
+ var/noisechoice = input(user, "What noise would you like to make?", "Robot Noises") as null|anything in list("Beep","Buzz","Ping")
+ if(noisechoice == "Beep")
+ user.visible_message("[user] has made their TTS beep!", "You make your TTS beep!")
+ playsound(user, 'sound/machines/twobeep.ogg', 50, 1, -1)
+ if(noisechoice == "Buzz")
+ user.visible_message("[user] has made their TTS buzz!", "You make your TTS buzz!")
+ playsound(user, 'sound/machines/buzz-sigh.ogg', 50, 1, -1)
+ if(noisechoice == "Ping")
+ user.visible_message("[user] has made their TTS ping!", "You make your TTS ping!")
+ playsound(user, 'sound/machines/ping.ogg', 50, 1, -1)
+
+/obj/item/ttsdevice/CtrlClick(mob/living/user)
+ var/new_name = input(user, "Name your Text-to-Speech device: \nThis matters for displaying it in the chat bar:", "TTS Device") as text|null
+ if(new_name)
+ new_name = reject_bad_name(new_name)
+ name = "[new_name]'s [initial(name)]"