From 373da9f3cb9bb3e31abcc4c70289ffc04db32fc0 Mon Sep 17 00:00:00 2001
From: Ghilker <42839747+Ghilker@users.noreply.github.com>
Date: Sat, 10 Apr 2021 04:44:42 +0200
Subject: [PATCH] Colorblind users can now examine the atmos components to read
on what color they are (#58254)
---
code/__HELPERS/piping_colors_lists.dm | 16 ++++++++++++++++
.../atmospherics/machinery/atmosmachinery.dm | 5 +++++
.../machinery/components/components_base.dm | 4 ----
.../atmospherics/machinery/pipes/pipes.dm | 4 ----
4 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/code/__HELPERS/piping_colors_lists.dm b/code/__HELPERS/piping_colors_lists.dm
index 2ff2d95752c..8ab7918fc93 100644
--- a/code/__HELPERS/piping_colors_lists.dm
+++ b/code/__HELPERS/piping_colors_lists.dm
@@ -29,3 +29,19 @@ GLOBAL_LIST_INIT(pipe_colors_ordered, sortList(list(
COLOR_STRONG_VIOLET = 4,
COLOR_YELLOW = 5
)))
+
+///Names shown in the examine for every colored atmos component
+GLOBAL_LIST_INIT(pipe_color_name, sortList(list(
+ COLOR_VERY_LIGHT_GRAY = "grey",
+ COLOR_BLUE = "blue",
+ COLOR_RED = "red",
+ COLOR_VIBRANT_LIME = "green",
+ COLOR_TAN_ORANGE = "orange",
+ COLOR_CYAN = "cyan",
+ COLOR_DARK = "dark",
+ COLOR_YELLOW = "yellow",
+ COLOR_BROWN = "brown",
+ COLOR_LIGHT_PINK = "pink",
+ COLOR_PURPLE = "purple",
+ COLOR_STRONG_VIOLET = "violet"
+)))
diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm
index 1d3497f2dec..8f1af849b6f 100644
--- a/code/modules/atmospherics/machinery/atmosmachinery.dm
+++ b/code/modules/atmospherics/machinery/atmosmachinery.dm
@@ -65,8 +65,13 @@
///Store the smart pipes connections, used for pipe construction
var/connection_num = 0
+/obj/machinery/atmospherics/LateInitialize()
+ . = ..()
+ name = "[GLOB.pipe_color_name[pipe_color]] [name]"
+
/obj/machinery/atmospherics/examine(mob/user)
. = ..()
+ . += "[src] is on layer [piping_layer]."
if((vent_movement & VENTCRAWL_ENTRANCE_ALLOWED) && isliving(user))
var/mob/living/L = user
if(HAS_TRAIT(L, TRAIT_VENTCRAWLER_NUDE) || HAS_TRAIT(L, TRAIT_VENTCRAWLER_ALWAYS))
diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm
index 83eaa22a5a3..813f2b4706e 100644
--- a/code/modules/atmospherics/machinery/components/components_base.dm
+++ b/code/modules/atmospherics/machinery/components/components_base.dm
@@ -31,10 +31,6 @@
if(hide)
RegisterSignal(src, COMSIG_OBJ_HIDE, .proc/hide_pipe)
-/obj/machinery/atmospherics/components/examine(mob/user)
- . = ..()
- . += "[src] is on layer [piping_layer]."
-
// Iconnery
/**
diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm
index c459ace29a1..f831cfa4a1c 100644
--- a/code/modules/atmospherics/machinery/pipes/pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/pipes.dm
@@ -26,10 +26,6 @@
if(hide)
AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) //if changing this, change the subtypes RemoveElements too, because thats how bespoke works
-/obj/machinery/atmospherics/pipe/examine(mob/user)
- . = ..()
- . += "[src] is on layer [piping_layer]."
-
/obj/machinery/atmospherics/pipe/nullifyNode(i)
var/obj/machinery/atmospherics/oldN = nodes[i]
..()