Merge pull request #2754 from VOREStation/aro-colorblind

Colorblindness Traits
This commit is contained in:
Arokha Sieyes
2018-01-16 02:46:10 -05:00
committed by GitHub
2 changed files with 48 additions and 5 deletions
@@ -100,4 +100,33 @@
name = "Lightweight"
desc = "Your light weight and poor balance make you very susceptible to unhelpful bumping. Think of it like a bowling ball versus a pin."
cost = -4
var_changes = list("lightweight" = 1)
var_changes = list("lightweight" = 1)
/datum/trait/colorblind
name = "Colorblindness (Monochromancy)"
desc = "You simply can't see colors at all, period. You are 100% colorblind."
cost = -4
/datum/trait/colorblind/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
if(!H.plane_holder)
H.plane_holder = new
H.plane_holder.set_vis(VIS_D_COLORBLIND,TRUE) //The default is monocrhomia, no need to set values
/datum/trait/colorblind/para_vulp
name = "Colorblindness (Para Vulp)"
desc = "You have a severe issue with green colors and have difficulty recognizing them from red colors."
cost = -3
/datum/trait/colorblind/para_vulp/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
H.plane_holder.alter_values(VIS_D_COLORBLIND,list("variety" = "Paradise Vulp"))
/datum/trait/colorblind/para_taj
name = "Colorblindness (Para Taj)"
desc = "You have a minor issue with blue colors and have difficulty recognizing them from red colors."
cost = -2
/datum/trait/colorblind/para_taj/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
H.plane_holder.alter_values(VIS_D_COLORBLIND,list("variety" = "Paradise Taj"))
+18 -4
View File
@@ -63,6 +63,17 @@
for(var/SP in subplanes)
set_vis(which = SP, new_alpha = new_alpha)
/datum/plane_holder/proc/alter_values(var/which = null, var/list/values = null)
ASSERT(which)
var/obj/screen/plane_master/PM = plane_masters[which]
if(!PM)
crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
PM.alter_plane_values(arglist(values))
if(PM.sub_planes)
var/list/subplanes = PM.sub_planes
for(var/SP in subplanes)
alter_values(SP, values)
////////////////////
// The Plane Master
////////////////////
@@ -103,6 +114,9 @@
new_alpha = sanitize_integer(new_alpha, 0, 255, 255)
alpha = new_alpha
/obj/screen/plane_master/proc/alter_plane_values()
return //Stub
////////////////////
// Special masters
////////////////////
@@ -162,11 +176,11 @@
"Paradise Taj" = MATRIX_Taj_Colorblind
)
/obj/screen/plane_master/colorblindness/proc/set_variety(var/which = null)
var/new_type = varieties[which]
if(!new_type) return
/obj/screen/plane_master/colorblindness/alter_plane_values(var/variety = null)
var/new_matrix = varieties[variety]
if(!new_matrix) return
color = new_type
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