POLARIS: Colorblindness Traits/Modifiers

This commit is contained in:
Arokha Sieyes
2018-05-03 17:51:52 -04:00
parent 2bfba8338f
commit 8fbf78974a
5 changed files with 41 additions and 65 deletions
+19 -1
View File
@@ -82,4 +82,22 @@
name = "Smaller"
desc = "Your body is smaller than average."
icon_scale_percent = 0.9
icon_scale_percent = 0.9
/datum/modifier/trait/colorblind_taj
name = "Colorblind - B+R"
desc = "You are colorblind. You have a minor issue with blue colors and have difficulty recognizing them from red colors."
client_color = MATRIX_Taj_Colorblind
/datum/modifier/trait/colorblind_vulp
name = "Colorblind - G+R"
desc = "You are colorblind. You have a severe issue with green colors and have difficulty recognizing them from red colors."
client_color = MATRIX_Vulp_Colorblind
/datum/modifier/trait/colorblind_mono
name = "Colorblind - Mono"
desc = "You are colorblind. Your condition is rare, but you can see no colors at all."
client_color = MATRIX_Monochromia
+3
View File
@@ -1124,6 +1124,9 @@ default behaviour is:
var/list/colors_to_blend = list()
for(var/datum/modifier/M in modifiers)
if(!isnull(M.client_color))
if(islist(M.client_color)) //It's a color matrix! Forget it. Just use that one.
animate(client, color = M.client_color, time = 10)
return
colors_to_blend += M.client_color
if(colors_to_blend.len)
-56
View File
@@ -31,9 +31,6 @@
plane_masters[VIS_ADMIN2] = new /obj/screen/plane_master{plane = PLANE_ADMIN2} //For admin use
plane_masters[VIS_ADMIN3] = new /obj/screen/plane_master{plane = PLANE_ADMIN3} //For admin use
plane_masters[VIS_D_COLORBLIND] = new /obj/screen/plane_master/colorblindness //Colorblindness (affects world)
plane_masters[VIS_D_COLORBLINDI]= new /obj/screen/plane_master/colorblindness/items //Colorblindness (items in HUD, subplane of above, don't toggle)
plane_masters[VIS_MESONS] = new /obj/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings.
..()
@@ -151,56 +148,3 @@
/obj/screen/plane_master/ghosts
plane = PLANE_GHOSTS
desired_alpha = 127 //When enabled, they're like half-transparent
//'Normal'ness v v v
//Various types of colorblindness R2R R2G R2B G2R G2G G2B B2R B2G B2B
#define MATRIX_Monochromia list(0.33, 0.33, 0.33, 0.59, 0.59, 0.59, 0.11, 0.11, 0.11)
#define MATRIX_Protanopia list(0.57, 0.43, 0, 0.56, 0.44, 0, 0, 0.24, 0.76)
#define MATRIX_Protanomaly list(0.82, 0.18, 0, 0.33, 0.67, 0, 0, 0.13, 0.88)
#define MATRIX_Deuteranopia list(0.63, 0.38, 0, 0.70, 0.30, 0, 0, 0.30, 0.70)
#define MATRIX_Deuteranomaly list(0.80, 0.20, 0, 0.26, 0.74, 0, 0, 0.14, 0.86)
#define MATRIX_Tritanopia list(0.95, 0.05, 0, 0, 0.43, 0.57, 0, 0.48, 0.53)
#define MATRIX_Tritanomaly list(0.97, 0.03, 0, 0, 0.73, 0.27, 0, 0.18, 0.82)
#define MATRIX_Achromatopsia list(0.30, 0.59, 0.11, 0.30, 0.59, 0.11, 0.30, 0.59, 0.11)
#define MATRIX_Achromatomaly list(0.62, 0.32, 0.06, 0.16, 0.78, 0.06, 0.16, 0.32, 0.52)
#define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80)
#define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60)
/////////////////
//Colorblindness uses special color shenanigans
/obj/screen/plane_master/colorblindness
plane = PLANE_WORLD //Affects the main game world
color = MATRIX_Monochromia
alpha = 255 //Starts out nice and opaque
invisibility = 101 //Can't see it usually
mouse_opacity = 1 //Don't make entire world not visible pls
invis_toggle = TRUE
sub_planes = list(VIS_D_COLORBLINDI)
var/list/varieties = list(
"Monochromia" = MATRIX_Monochromia,
"Protanopia" = MATRIX_Protanopia,
"Protanomaly" = MATRIX_Protanomaly,
"Deuteranopia" = MATRIX_Deuteranopia,
"Deuteranomaly" = MATRIX_Deuteranomaly,
"Tritanopia" = MATRIX_Tritanopia,
"Tritanomaly" = MATRIX_Tritanomaly,
"Achromatopsia" = MATRIX_Achromatopsia,
"Achromatomaly" = MATRIX_Achromatomaly,
"Paradise Vulp" = MATRIX_Vulp_Colorblind,
"Paradise Taj" = MATRIX_Taj_Colorblind
)
/obj/screen/plane_master/colorblindness/alter_plane_values(var/variety = null)
var/new_matrix = varieties[variety]
if(!new_matrix) return
color = new_matrix
/obj/screen/plane_master/colorblindness/proc/debug_variety()
var/choice = input(usr,"Pick a type of colorblindness","Which?") as null|anything in varieties
if(choice)
color = varieties[choice]
/obj/screen/plane_master/colorblindness/items
plane = PLANE_PLAYER_HUD_ITEMS
sub_planes = null