mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-19 05:09:49 +01:00
d5849910e5
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
/obj/item/text_to_speech
|
|
name = "TTS device"
|
|
desc = "A device that speaks an inputted message. Given to crew which can not speak properly or at all."
|
|
icon = 'icons/obj/integrated_electronics/electronic_setups.dmi'
|
|
icon_state = "setup_small"
|
|
w_class = ITEMSIZE_SMALL
|
|
var/named
|
|
|
|
/obj/item/text_to_speech/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
if(user.incapacitated(INCAPACITATION_KNOCKDOWN|INCAPACITATION_DISABLED)) // EDIT: We can use the device only if we are not in certain types of incapacitation. We don't want chairs stopping us from texting!!
|
|
to_chat(user, "You cannot activate the device in your state.")
|
|
return
|
|
|
|
if(!named)
|
|
to_chat(user, "You input your name into the device.")
|
|
name = "[initial(name)] ([user.real_name])"
|
|
desc = "[initial(desc)] This one is assigned to [user.real_name]."
|
|
named = 1
|
|
/* //Another way of naming the device. Gives more freedom, but could lead to issues.
|
|
device_name = tgui_input_text(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "", MAX_NAME_LEN)
|
|
if(!device_name)
|
|
return
|
|
name = "[initial(name)] - [device_name]"
|
|
named = 1
|
|
*/
|
|
|
|
var/message = tgui_input_text(user,"Choose a message to relay to those around you.", "", "", MAX_MESSAGE_LEN)
|
|
if(message)
|
|
audible_message("[icon2html(src, user.client)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech")
|
|
if(ismob(loc))
|
|
loc.runechat_message("\[TTS Voice\] [message]")
|
|
|
|
/obj/item/text_to_speech/click_alt(mob/user) // QOL Change
|
|
attack_self(user)
|