Adds Sign Language Quirk (#711)

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-09-09 08:43:01 +02:00
committed by GitHub
co-authored by LemonInTheDark Azarak
parent 42116e5e36
commit 439207100a
14 changed files with 168 additions and 6 deletions
@@ -146,6 +146,12 @@
icon_state = "wizard"
inhand_icon_state = "purplegloves"
/obj/item/clothing/gloves/radio
name = "translation gloves"
desc = "A pair of electronic gloves which connect to nearby radios wirelessly. Allows for sign language users to 'speak' over comms."
icon_state = "radio_g"
inhand_icon_state = "radio_g"
/obj/item/clothing/gloves/color/plasmaman/head_of_personnel
name = "head of personnel's envirogloves"
desc = "Covers up those scandalous, bony hands. Appears to be an attempt at making a replica of the captain's gloves."
+4 -1
View File
@@ -11,7 +11,10 @@
/mob/living/carbon/can_speak_vocal(message)
if(silent)
return 0
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
return ..()
else
return FALSE
return ..()
/mob/living/carbon/could_speak_language(datum/language/language)
+51 -5
View File
@@ -222,6 +222,27 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
var/deaf_message
var/deaf_type
if(HAS_TRAIT(speaker, TRAIT_SIGN_LANG)) //Checks if speaker is using sign language
deaf_message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mods)
if(speaker != src)
if(!radio_freq) //I'm about 90% sure there's a way to make this less cluttered
deaf_type = 1
else
deaf_type = 2
// Create map text prior to modifying message for goonchat, sign lang edition
if (client?.prefs.chat_on_map && !(stat == UNCONSCIOUS || stat == HARD_CRIT) && (client.prefs.see_chat_non_mob || ismob(speaker)))
create_chat_message(speaker, message_language, raw_message, spans)
if(is_blind(src))
return FALSE
message = deaf_message
show_message(message, MSG_VISUAL, deaf_message, deaf_type, avoid_highlighting = speaker == src)
return message
if(speaker != src)
if(!radio_freq) //These checks have to be seperate, else people talking on the radio will make "You can't hear yourself!" appear when hearing people over the radio while deaf.
deaf_message = "<span class='name'>[speaker]</span> [speaker.verb_say] something but you cannot hear [speaker.p_them()]."
@@ -246,6 +267,24 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
eavesdrop_range = EAVESDROP_EXTRA_RANGE
var/list/listening = get_hearers_in_view(message_range+eavesdrop_range, source)
var/list/the_dead = list()
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
var/mob/living/carbon/mute = src
if(istype(mute))
var/empty_indexes = get_empty_held_indexes() //How many hands the player has empty
if(length(empty_indexes) == 1 || !mute.get_bodypart(BODY_ZONE_L_ARM) || !mute.get_bodypart(BODY_ZONE_R_ARM))
message = stars(message)
if(length(empty_indexes) == 0)//Both hands full, can't sign
to_chat(src, "<span class='warning'>You can't sign with your hands full!</span.?>")
return FALSE
if(!mute.get_bodypart(BODY_ZONE_L_ARM) && !mute.get_bodypart(BODY_ZONE_R_ARM))//Can't sign with no arms!
to_chat(src, "<span class='warning'>You can't sign with no hands!</span.?>")
return FALSE
if(mute.handcuffed)//Can't sign when your hands are cuffed, but can at least make a visual effort to
mute.visible_message("<span class='warning'>[src] tries to sign, but can't with [src.p_their()] hands cuffed!</span.?>")
return FALSE
if(mute.has_status_effect(STATUS_EFFECT_PARALYZED))
to_chat(src, "<span class='warning'>You can't sign in this state!</span.?>")
return FALSE
if(client) //client is so that ghosts don't have to listen to mice
for(var/_M in GLOB.player_list)
var/mob/M = _M
@@ -303,14 +342,15 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return TRUE
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
var/mob/living/carbon/human/H = src
if(HAS_TRAIT(src, TRAIT_MUTE))
return FALSE
return (HAS_TRAIT(src, TRAIT_SIGN_LANG) && !H.mind.miming) //Makes sure mimes can't speak using sign language
if(is_muzzled())
return FALSE
return (HAS_TRAIT(src, TRAIT_SIGN_LANG) && !H.mind.miming)
if(!IsVocal())
return FALSE
return (HAS_TRAIT(src, TRAIT_SIGN_LANG) && !H.mind.miming)
return TRUE
@@ -376,9 +416,15 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
else if(message_mods[MODE_SING])
. = verb_sing
else if(stuttering)
. = "stammers"
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
. = "shakily signs"
else
. = "stammers"
else if(derpspeech)
. = "gibbers"
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
. = "incoherently signs"
else
. = "gibbers"
else
. = ..()
@@ -119,12 +119,16 @@
I = organs[I]
if(!I)
return -1
if(I.organ_flags & ORGAN_UNREMOVABLE)
to_chat(user, "<span class='warning'>[I] is too well connected to take out!</span>")
return -1
display_results(user, target, "<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>",
"<span class='notice'>[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].</span>",
"<span class='notice'>[user] begins to extract something from [target]'s [parse_zone(target_zone)].</span>")
else
return -1
/datum/surgery_step/manipulate_organs/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
if(current_type == "insert")
if(istype(tool, /obj/item/organ_storage))
+50
View File
@@ -318,3 +318,53 @@
/obj/item/organ/tongue/ethereal/Initialize(mapload)
. = ..()
languages_possible = languages_possible_ethereal
//Sign Language Tongue - yep, that's how you speak sign language.
/obj/item/organ/tongue/tied
name = "tied tongue"
desc = "If only one had a sword so we may finally untie this knot."
say_mod = "signs"
icon_state = "tonguetied"
modifies_speech = TRUE
organ_flags = ORGAN_UNREMOVABLE
/obj/item/organ/tongue/tied/Insert(mob/living/carbon/M)
. = ..()
M.verb_ask = "signs"
M.verb_exclaim = "signs"
M.verb_whisper = "subtly signs"
M.verb_sing = "rythmically signs"
M.verb_yell = "emphatically signs"
ADD_TRAIT(M, TRAIT_SIGN_LANG, "tongue")
REMOVE_TRAIT(M, TRAIT_MUTE, "tongue")
/obj/item/organ/tongue/tied/Remove(mob/living/carbon/M, special = 0)
..()
M.verb_ask = initial(verb_ask)
M.verb_exclaim = initial(verb_exclaim)
M.verb_whisper = initial(verb_whisper)
M.verb_sing = initial(verb_sing)
M.verb_yell = initial(verb_yell)
REMOVE_TRAIT(M, TRAIT_SIGN_LANG, "tongue") //People who are Ahealed get "cured" of their sign language-having ways. If I knew how to make the tied tongue persist through aheals, I'd do that.
//Thank you Jwapplephobia for helping me with the literal hellcode below
/obj/item/organ/tongue/tied/handle_speech(datum/source, list/speech_args)
var/new_message
var/message = speech_args[SPEECH_MESSAGE]
var/exclamation_found = findtext(message, "!")
var/question_found = findtext(message, "?")
var/mob/living/carbon/M = owner
new_message = message
if(exclamation_found)
new_message = replacetext(new_message, "!", "")
if(question_found)
new_message = replacetext(new_message, "?", "")
speech_args[SPEECH_MESSAGE] = new_message
if(exclamation_found && question_found)
M.visible_message("<span class='notice'>[M] lowers one of [M.p_their()] eyebrows, raising the other.</span>")
else if(exclamation_found)
M.visible_message("<span class='notice'>[M] raises [M.p_their()] eyebrows.</span>")
else if(question_found)
M.visible_message("<span class='notice'>[M] lowers [M.p_their()] eyebrows.</span>")