Changes Colourblindness from a Preference to a Disability

For Vulpkanin and Tajara, it gives them their species-specific
colourblindness but their excellent darksight, too. Otherwise it gives
noir vision.

You can choose this disability at character creation. It is off by
default. You can turn it off via genetics and mutadone.

Fixes Cling Transform&Lesser/Greater form & Darksight bugs

Transforming to an identity will now, with 100% reliability, give you
the exact appearance as that ability bar the body_accessory and the
secondary hair/facial hair colours. Same thing with going from lesser
form to an identity that was not the one you lesser formed with.

Fixes the darksight bug from the last commit, happened 'cause typo.
Woops.

Eye Transplantation Applies Eye-dependent Genes

Transplanting colourblind Vulpkanin/Tajara eyes into a Human gives the Human
the dark_view and unique colourblindness of said Vulpkanin eyes.

Removing colourblind eyes will take the disability with it, meaning the
person will have colour vision/low darksight.
This commit is contained in:
KasparoVy
2017-01-20 22:36:45 -05:00
parent 28f9496713
commit c16f734a6d
18 changed files with 141 additions and 68 deletions
@@ -282,8 +282,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<b>Species:</b> <a href='?_src_=prefs;preference=species;task=input'>[species]</a><br>"
if(species == "Vox")
dat += "<b>N2 Tank:</b> <a href='?_src_=prefs;preference=speciesprefs;task=input'>[speciesprefs ? "Large N2 Tank" : "Specialized N2 Tank"]</a><br>"
else if(species in list("Vulpkanin", "Tajaran"))
dat += "<b>Colour Vision:</b> <a href='?_src_=prefs;preference=speciesprefs;task=input'>[speciesprefs ? "Unaugmented" : "Surgically Corrected"]</a><br>"
dat += "<b>Secondary Language:</b> <a href='?_src_=prefs;preference=language;task=input'>[language]</a><br>"
dat += "<b>Blood Type:</b> <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
if(species in list("Human", "Drask", "Vox"))
@@ -817,6 +815,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
HTML += ShowDisabilityState(user,DISABILITY_FLAG_EPILEPTIC,"Seizures")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_DEAF,"Deaf")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_BLIND,"Blind")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_COLOURBLIND,"Colourblind")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_MUTE,"Mute")
@@ -1340,12 +1339,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
organ_data = list()
rlimb_data = list()
if("speciesprefs")
if(species == "Vox") //oldvox code
speciesprefs = !speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
else if(species in list("Vulpkanin", "Tajaran")) //Species that can be colourblind.
var/list/vision_options = list("Surgically Corrected", "Unaugmented") //Surgically corrected eyes (default option) see in full colour but have 2 darksight. Unaugmented eyes are colourblind but have 8 darksight.
speciesprefs = input("Please select your vision preference. \nOverridden by mech. assisted or mechanical eyes. \nSurgically Corrected: Full colour, low darksight. \n Unaugmented: Colourblind, full darksight.", "Character Generation", 0) in vision_options
speciesprefs = (speciesprefs != "Surgically Corrected") //Ensure the default option (surgically corrected) returns 0. I would've set up the vision_options list such that Surgically Corrected = 0, but input() didn't care for it.
speciesprefs = !speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
if("language")
// var/languages_available
var/list/new_languages = list("None")
@@ -2173,6 +2167,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
character.dna.SetSEState(BLINDBLOCK,1,1)
character.disabilities |= BLIND
if(disabilities & DISABILITY_FLAG_COLOURBLIND)
character.dna.SetSEState(COLOURBLINDBLOCK,1,1)
character.disabilities |= COLOURBLIND
if(disabilities & DISABILITY_FLAG_MUTE)
character.dna.SetSEState(MUTEBLOCK,1,1)
character.disabilities |= MUTE