From 8aa635f137d4a46eadb70db9d645ea452cf4652f Mon Sep 17 00:00:00 2001 From: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com> Date: Fri, 7 Jul 2023 00:42:34 -0300 Subject: [PATCH] Adds colorblindness as a mild brain trauma (#76527) ## About The Pull Request What the title says. The brain trauma makes the whole screen monochrome until cured. ![image](https://github.com/tgstation/tgstation/assets/82850673/442d24a8-6625-454c-bc28-64b786b03f49) ## Why It's Good For The Game I feel like the current pool for mild brain traumas is quite lame, this helps spice it up a bit with something that is quite annoying and distracting but not game breaking (as mild brain traumas should generally be). ## Changelog :cl: add: Added colorblindness as a mild brain trauma. /:cl: --------- Co-authored-by: san7890 --- code/datums/brain_damage/mild.dm | 15 +++++++++++++++ code/modules/client/client_colour.dm | 3 +++ 2 files changed, 18 insertions(+) diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 87e6ebe0b22..2b9c73084d8 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -265,3 +265,18 @@ speak_dejavu += speech_args[SPEECH_MESSAGE] else speak_dejavu += speech_args[SPEECH_MESSAGE] + +/datum/brain_trauma/mild/color_blindness + name = "Achromatopsia" + desc = "Patient's occipital lobe is unable to recognize and interpret color, rendering the patient completely colorblind." + scan_desc = "colorblindness" + gain_text = span_warning("The world around you seems to lose its color.") + lose_text = span_notice("The world feels bright and colorful again.") + +/datum/brain_trauma/mild/color_blindness/on_gain() + owner.add_client_colour(/datum/client_colour/monochrome/colorblind) + return ..() + +/datum/brain_trauma/mild/color_blindness/on_lose(silent) + owner.remove_client_colour(/datum/client_colour/monochrome/colorblind) + return ..() diff --git a/code/modules/client/client_colour.dm b/code/modules/client/client_colour.dm index 26ab9e850b6..d45bb8db4fc 100644 --- a/code/modules/client/client_colour.dm +++ b/code/modules/client/client_colour.dm @@ -198,6 +198,9 @@ fade_in = 20 fade_out = 20 +/datum/client_colour/monochrome/colorblind + priority = PRIORITY_HIGH + /datum/client_colour/monochrome/trance priority = PRIORITY_NORMAL