diff --git a/code/datums/brain_damage/hypnosis.dm b/code/datums/brain_damage/hypnosis.dm index f937c19658..37aee6df7e 100644 --- a/code/datums/brain_damage/hypnosis.dm +++ b/code/datums/brain_damage/hypnosis.dm @@ -68,4 +68,4 @@ new /datum/hallucination/chat(owner, TRUE, FALSE, "[hypnotic_phrase]") /datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args) - hearing_args[HEARING_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_MESSAGE], "$1") + hearing_args[HEARING_RAW_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_RAW_MESSAGE], "$1") diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 012f771a29..235417d62c 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -241,7 +241,7 @@ if(prob(25)) var/deja_vu = pick_n_take(hear_dejavu) var/static/regex/quoted_spoken_message = regex("\".+\"", "gi") - hearing_args[HEARING_MESSAGE] = quoted_spoken_message.Replace(hearing_args[HEARING_MESSAGE], "\"[deja_vu]\"") //Quotes included to avoid cases where someone says part of their name + hearing_args[HEARING_RAW_MESSAGE] = quoted_spoken_message.Replace(hearing_args[HEARING_RAW_MESSAGE], "\"[deja_vu]\"") //Quotes included to avoid cases where someone says part of their name return if(hear_dejavu.len >= 15) if(prob(50)) diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 034f2baaaf..80a1bd2470 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -88,7 +88,7 @@ if(findtext(hearing_args[HEARING_RAW_MESSAGE], reg)) addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message - hearing_args[HEARING_MESSAGE] = reg.Replace(hearing_args[HEARING_MESSAGE], "$1") + hearing_args[HEARING_RAW_MESSAGE] = reg.Replace(hearing_args[HEARING_RAW_MESSAGE], "$1") break /datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args) diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index c1f8d6d349..94b91bb35d 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -23,7 +23,6 @@ owner.special_role = special_role if(give_objectives) forge_traitor_objectives() - RegisterSignal(owner.current, COMSIG_MOVABLE_HEAR, .proc/handle_hearing) finalize_traitor() ..() @@ -49,17 +48,16 @@ A.verbs -= /mob/living/silicon/ai/proc/choose_modules A.malf_picker.remove_malf_verbs(A) qdel(A.malf_picker) - UnregisterSignal(owner.current, COMSIG_MOVABLE_HEAR, .proc/handle_hearing) SSticker.mode.traitors -= owner if(!silent && owner.current) to_chat(owner.current," You are no longer the [special_role]! ") owner.special_role = null /datum/antagonist/traitor/proc/handle_hearing(datum/source, list/hearing_args) - var/message = hearing_args[HEARING_MESSAGE] + var/message = hearing_args[HEARING_RAW_MESSAGE] message = GLOB.syndicate_code_phrase_regex.Replace(message, "$1") message = GLOB.syndicate_code_response_regex.Replace(message, "$1") - hearing_args[HEARING_MESSAGE] = message + hearing_args[HEARING_RAW_MESSAGE] = message /datum/antagonist/traitor/proc/add_objective(datum/objective/O) objectives += O @@ -261,16 +259,20 @@ /datum/antagonist/traitor/apply_innate_effects(mob/living/mob_override) . = ..() update_traitor_icons_added() - var/mob/living/silicon/ai/A = mob_override || owner.current - if(istype(A) && traitor_kind == TRAITOR_AI) + var/mob/M = mob_override || owner.current + if(isAI(M) && traitor_kind == TRAITOR_AI) + var/mob/living/silicon/ai/A = M A.hack_software = TRUE + RegisterSignal(M, COMSIG_MOVABLE_HEAR, .proc/handle_hearing) /datum/antagonist/traitor/remove_innate_effects(mob/living/mob_override) . = ..() update_traitor_icons_removed() - var/mob/living/silicon/ai/A = mob_override || owner.current - if(istype(A) && traitor_kind == TRAITOR_AI) + var/mob/M = mob_override || owner.current + if(iaAI(M) && traitor_kind == TRAITOR_AI) + var/mob/living/silicon/ai/A = M A.hack_software = FALSE + UnregisterSignal(M, COMSIG_MOVABLE_HEAR) /datum/antagonist/traitor/proc/give_codewords() if(!owner.current)