Revert "Ports speech impediments from oldbase (#3317)" (#3643)

This reverts commit efdff52590.
This commit is contained in:
Azarak
2021-02-25 13:40:45 +00:00
committed by GitHub
parent fe15be9c2e
commit a53d6fa0e7
4 changed files with 0 additions and 149 deletions
@@ -34,70 +34,3 @@
medical_record_text = "Patient is a DNR, and cannot be revived in any way."
value = 0
mob_trait = TRAIT_DNR
//Speech impediments
/datum/quirk/speech_impediment_rl
name = "Speech impediment (r as l)"
desc = "You mispronounce \"r\" as \"l\""
value = 0
medical_record_text = "Patient experiences difficulty in pronouncing certain phonemes."
/datum/quirk/speech_impediment_rl/add()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.enable_speech_mod(/datum/speech_mod/impediment_rl)
/datum/quirk/speech_impediment_rl/remove()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.disable_speech_mod(/datum/speech_mod/impediment_rl)
/datum/quirk/speech_impediment_lw
name = "Speech impediment (l as w)"
desc = "You mispronounce \"l\" as \"w\""
value = 0
medical_record_text = "Patient experiences difficulty in pronouncing certain phonemes."
/datum/quirk/speech_impediment_lw/add()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.enable_speech_mod(/datum/speech_mod/impediment_lw)
/datum/quirk/speech_impediment_lw/remove()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.disable_speech_mod(/datum/speech_mod/impediment_lw)
/datum/quirk/speech_impediment_rw
name = "Speech impediment (r as w)"
desc = "You mispronounce \"r\" as \"w\""
value = 0
medical_record_text = "Patient experiences difficulty in pronouncing certain phonemes."
/datum/quirk/speech_impediment_rw/add()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.enable_speech_mod(/datum/speech_mod/impediment_rw)
/datum/quirk/speech_impediment_rw/remove()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.disable_speech_mod(/datum/speech_mod/impediment_rw)
/datum/quirk/speech_impediment_rw_lw
name = "Speech impediment (r and l as w)"
desc = "You mispronounce \"r\" and \"l\" as \"w\""
value = 0
medical_record_text = "Patient experiences difficulty in pronouncing certain phonemes."
/datum/quirk/speech_impediment_rw_lw/add()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.enable_speech_mod(/datum/speech_mod/impediment_rw_lw)
/datum/quirk/speech_impediment_rw_lw/remove()
var/mob/living/carbon/human/H = quirk_holder
if(H)
H.disable_speech_mod(/datum/speech_mod/impediment_rw_lw)
@@ -1,51 +0,0 @@
/mob/living/carbon/human/var/list/speech_mods = list()
/mob/living/carbon/human/proc/toggle_speech_mod(datumtype)
var/checkbool = TRUE
for(var/datum/speech_mod/S in speech_mods)
if(istype(S,datumtype))
S.remove_speech_mod()
qdel(S)
checkbool = FALSE
break
if(checkbool)
var/datum/speech_mod/speech = new datumtype
speech.add_speech_mod(src)
/mob/living/carbon/human/proc/enable_speech_mod(datumtype)
for(var/datum/speech_mod/S in speech_mods)
if(istype(S,datumtype))
return
var/datum/speech_mod/speech = new datumtype
speech.add_speech_mod(src)
/mob/living/carbon/human/proc/disable_speech_mod(datumtype)
for(var/datum/speech_mod/S in speech_mods)
if(istype(S,datumtype))
S.remove_speech_mod()
qdel(S)
/datum/speech_mod
var/soundtext = ""
var/mob/living/carbon/human/affected_mob = null
/datum/speech_mod/proc/handle_speech(datum/source, list/speech_args)
return
/datum/speech_mod/proc/after_add()
RegisterSignal(affected_mob, COMSIG_MOB_SAY, .proc/handle_speech)
if(soundtext)
to_chat(affected_mob, "You start [soundtext].")
return
/datum/speech_mod/proc/add_speech_mod(mob/living/carbon/human/M)
affected_mob = M
affected_mob.speech_mods += src
after_add()
/datum/speech_mod/proc/remove_speech_mod()
if(soundtext)
to_chat(affected_mob, "You stop [soundtext].")
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
affected_mob.speech_mods -= src
affected_mob = null
@@ -1,29 +0,0 @@
/datum/speech_mod/impediment_rl
soundtext = "mispronouncing \"r\" as \"l\""
/datum/speech_mod/impediment_rl/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "r", "l")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "R", "L")
/datum/speech_mod/impediment_lw
soundtext = "mispronouncing \"l\" as \"w\""
/datum/speech_mod/impediment_lw/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "l", "w")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "L", "W")
/datum/speech_mod/impediment_rw
soundtext = "mispronouncing \"r\" as \"w\""
/datum/speech_mod/impediment_rw/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "r", "w")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "R", "W")
/datum/speech_mod/impediment_rw_lw
soundtext = "mispronouncing \"r\" and \"l\" as \"w\""
/datum/speech_mod/impediment_rw_lw/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "r", "w")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "R", "W")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "l", "w")
speech_args[SPEECH_MESSAGE] = replacetext(speech_args[SPEECH_MESSAGE], "L", "W")
-2
View File
@@ -3437,8 +3437,6 @@
#include "modular_skyrat\master_files\code\datums\traits\good.dm"
#include "modular_skyrat\master_files\code\datums\traits\negative.dm"
#include "modular_skyrat\master_files\code\datums\traits\neutral.dm"
#include "modular_skyrat\master_files\code\datums\traits\speech_mod\_speech_mod.dm"
#include "modular_skyrat\master_files\code\datums\traits\speech_mod\impediments.dm"
#include "modular_skyrat\master_files\code\game\objects\ghost_role_spawners.dm"
#include "modular_skyrat\master_files\code\game\objects\items\hhmirror.dm"
#include "modular_skyrat\master_files\code\game\objects\items\oxygen_candle.dm"