fixes punctuation removal

This commit is contained in:
Wallemations
2020-08-29 03:35:15 -04:00
parent 74c0401832
commit ae71b992dc
2 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -249,7 +249,7 @@
/datum/quirk/tongue_tied
name = "Tongue Tied"
desc = "Due to a past incident, your ability to communicate has been relegated to your hands."
value = 1
value = 0
medical_record_text = "During physical examination, patient's tongue was found to be uniquely damaged."
//Adds tongue & gloves
+13 -12
View File
@@ -347,22 +347,23 @@
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_used = FALSE
var/question_mark_used = FALSE
var/mob/living/carbon/M = owner
for(var/i in 1 to length(message))
if(findtext("!", message[i]))
exclamation_used = TRUE
else if (findtext("?", message[i]))
question_mark_used = TRUE
new_message = message
if(findtext(message, "!"))
if(!findtext(message, "?"))
M.visible_message("<span class='notice'>[M] raises [M.p_their()] eyebrows.</span>")
else
new_message += message[i]
if(exclamation_used)
M.visible_message("<span class='notice'>[M] raises [M.p_their()] eyebrows.</span>")
if(question_mark_used)
M.visible_message("<span class='notice'>[M] lowers [M.p_their()] eyebrows.</span>")
M.visible_message("<span class='notice'>[M] lowers one of [M.p_their()] eyebrows, raising the other.</span>")
new_message = replacetext(new_message, "!", "")
if(findtext(message, "?"))
if(!findtext(message, "!"))
M.visible_message("<span class='notice'>[M] lowers [M.p_their()] eyebrows.</span>")
new_message = replacetext(new_message, "?", "")
speech_args[SPEECH_MESSAGE] = new_message