From a53d6fa0e7d631e6ef50edc7fa8b332e638341eb Mon Sep 17 00:00:00 2001 From: Azarak Date: Thu, 25 Feb 2021 14:40:45 +0100 Subject: [PATCH] Revert "Ports speech impediments from oldbase (#3317)" (#3643) This reverts commit efdff525904d044008cf6b9aebd1b351cd4d8b8c. --- .../code/datums/traits/neutral.dm | 67 ------------------- .../datums/traits/speech_mod/_speech_mod.dm | 51 -------------- .../datums/traits/speech_mod/impediments.dm | 29 -------- tgstation.dme | 2 - 4 files changed, 149 deletions(-) delete mode 100644 modular_skyrat/master_files/code/datums/traits/speech_mod/_speech_mod.dm delete mode 100644 modular_skyrat/master_files/code/datums/traits/speech_mod/impediments.dm diff --git a/modular_skyrat/master_files/code/datums/traits/neutral.dm b/modular_skyrat/master_files/code/datums/traits/neutral.dm index 7e71da26b78..cbdc3d705b0 100644 --- a/modular_skyrat/master_files/code/datums/traits/neutral.dm +++ b/modular_skyrat/master_files/code/datums/traits/neutral.dm @@ -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) diff --git a/modular_skyrat/master_files/code/datums/traits/speech_mod/_speech_mod.dm b/modular_skyrat/master_files/code/datums/traits/speech_mod/_speech_mod.dm deleted file mode 100644 index 1028d506a46..00000000000 --- a/modular_skyrat/master_files/code/datums/traits/speech_mod/_speech_mod.dm +++ /dev/null @@ -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 diff --git a/modular_skyrat/master_files/code/datums/traits/speech_mod/impediments.dm b/modular_skyrat/master_files/code/datums/traits/speech_mod/impediments.dm deleted file mode 100644 index 41f2d889443..00000000000 --- a/modular_skyrat/master_files/code/datums/traits/speech_mod/impediments.dm +++ /dev/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") diff --git a/tgstation.dme b/tgstation.dme index 0293bd653f3..34b03bc0fbb 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"