diff --git a/code/game/objects/items/devices/translator.dm b/code/game/objects/items/devices/translator.dm index a66d9710c2..49128a6fca 100644 --- a/code/game/objects/items/devices/translator.dm +++ b/code/game/objects/items/devices/translator.dm @@ -6,6 +6,9 @@ icon_state = "translator" w_class = ITEMSIZE_SMALL origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) + var/mult_icons = 1 //Changes sprite when it translates + var/visual = 1 //If you need to see to get the message + var/audio = 0 //If you need to hear to get the message var/listening = 0 var/datum/language/langset @@ -15,7 +18,8 @@ if(langset) listening = 1 listening_objects |= src - icon_state = "[initial(icon_state)]1" + if(mult_icons) + icon_state = "[initial(icon_state)]1" to_chat(user, "You enable \the [src], translating into [langset.name].") else //Turning OFF listening = 0 @@ -29,7 +33,8 @@ return //Show the "I heard something" animation. - flick("[initial(icon_state)]2",src) + if(mult_icons) + flick("[initial(icon_state)]2",src) //Handheld or pocket only. if(!isliving(loc)) @@ -40,15 +45,31 @@ if (language && (language.flags & NONVERBAL)) return //Not gonna translate sign language + if (visual && ((L.sdisabilities & BLIND) || L.eye_blind)) + return //Can't see the screen, don't get the message + + if (audio && ((L.sdisabilities & DEAF) || L.ear_deaf)) + return //Can't hear the translation, don't get the message + //Only translate if they can't understand, otherwise pointlessly spammy //I'll just assume they don't look at the screen in that case //They don't understand the spoken language we're translating FROM if(!L.say_understands(speaker,language)) - //They understand the PRINTED language + //They understand the output language if(L.say_understands(null,langset)) - to_chat(L, "[src] displays, \"[message]\"") + to_chat(L, "[src] translates, \"[message]\"") - //They don't understand the PRINTED language + //They don't understand the output language else - to_chat(L, "[src] displays, \"[langset.scramble(message)]\"") + to_chat(L, "[src] translates, \"[langset.scramble(message)]\"") + +//Let's try an ear-worn version +/obj/item/device/universal_translator/ear + name = "translator earpiece" + desc = "This handy device appears to translate the languages it hears into another language for a user." + icon_state = "earpiece" + w_class = ITEMSIZE_TINY + slot_flags = SLOT_EARS + visual = 0 + audio = 1 \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_ears.dm b/code/modules/client/preference_setup/loadout/loadout_ears.dm index 02bfdaa8b7..d3c7c633ce 100644 --- a/code/modules/client/preference_setup/loadout/loadout_ears.dm +++ b/code/modules/client/preference_setup/loadout/loadout_ears.dm @@ -8,3 +8,8 @@ /datum/gear/ears/headphones display_name = "headphones" path = /obj/item/clothing/ears/earmuffs/headphones + +/datum/gear/ears/translator + display_name = "universal translator, ear" + path = /obj/item/device/universal_translator/ear + cost = 5 \ No newline at end of file diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 4e366be140..d9b7bd22aa 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ