mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Abling Disability (#4485)
This PR implements a system for manipulating a client's color safely and also ports a prioritization system for sorting client color from /tg/. Currently this PR also implements client coloration in the form of color blindness, namely: Monochromacy Deuteranopia Tritanopia Protanopia DTP are mild brain traumas, whereas monocrhomacy is a severe brain trauma. Furthermore, this PR removes the Needs Glasses prompt in character creation, and replaces it with a disability selector, allowing people to more closely refine their special little snowflakes. Current disabilities available: Nervousness Nearsightedness Deuteranopia Tritanopia Protanopia Deafness Muteness
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
//Character trait system. Currently geared only for disabilities but a refactor to make it trait neutral would be trivial.
|
||||
|
||||
/datum/character_disabilities
|
||||
var/name = "Enigma"
|
||||
var/desc = "This trait was not meant to be seen by mortal minds."
|
||||
|
||||
/datum/character_disabilities/proc/apply_self(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/datum/character_disabilities/nearsighted
|
||||
name = "Nearsightedness"
|
||||
desc = "Without prescription glasses your vision is impaired."
|
||||
|
||||
/datum/character_disabilities/nearsighted/apply_self(var/mob/living/carbon/human/H)
|
||||
H.disabilities |= NEARSIGHTED
|
||||
|
||||
/datum/character_disabilities/nervous
|
||||
name = "Nervousness"
|
||||
desc = "You are prone to stuttering and bouts of anxiety."
|
||||
|
||||
/datum/character_disabilities/nervous/apply_self(var/mob/living/carbon/human/H)
|
||||
H.disabilities |= NERVOUS
|
||||
|
||||
/datum/character_disabilities/deuteranomaly
|
||||
name = "Deuteranopia"
|
||||
desc = "You have difficulty perceiving green."
|
||||
|
||||
/datum/character_disabilities/deuteranomaly/apply_self(var/mob/living/carbon/human/H)
|
||||
H.add_client_color(/datum/client_color/deuteranopia)
|
||||
|
||||
/datum/character_disabilities/protanopia
|
||||
name = "Protanopia"
|
||||
desc = "You have difficulty perceiving red."
|
||||
|
||||
/datum/character_disabilities/protanopia/apply_self(var/mob/living/carbon/human/H)
|
||||
H.add_client_color(/datum/client_color/protanopia)
|
||||
|
||||
/datum/character_disabilities/tritanopia
|
||||
name = "Tritanopia"
|
||||
desc = "You have difficulty perceiving green and yellow."
|
||||
|
||||
/datum/character_disabilities/tritanopia/apply_self(var/mob/living/carbon/human/H)
|
||||
H.add_client_color(/datum/client_color/tritanopia)
|
||||
|
||||
/datum/character_disabilities/mute
|
||||
name = "Muteness"
|
||||
desc = "You are unable to form coherent speech."
|
||||
|
||||
/datum/character_disabilities/mute/apply_self(var/mob/living/carbon/human/H)
|
||||
H.sdisabilities |= MUTE
|
||||
|
||||
/datum/character_disabilities/deaf
|
||||
name = "Deafness"
|
||||
desc = "You are unable to percieve sound."
|
||||
|
||||
/datum/character_disabilities/deaf/apply_self(var/mob/living/carbon/human/H)
|
||||
H.sdisabilities |= DEAF
|
||||
@@ -135,6 +135,12 @@
|
||||
LAZYINITLIST(O.temporary_markings)
|
||||
O.temporary_markings[M] = attr
|
||||
|
||||
/mob/living/carbon/human/proc/sync_trait_prefs_to_mob(datum/preferences/prefs)
|
||||
var/list/traits = prefs.disabilities
|
||||
for(var/M in traits)
|
||||
var/datum/character_disabilities/trait = chargen_disabilities_list[M]
|
||||
trait.apply_self(src)
|
||||
|
||||
// Helper proc that grabs whatever organ this humantype uses to see.
|
||||
// Usually eyes, but can be something else.
|
||||
// If `no_synthetic` is TRUE, returns null for mobs that are mechanical, or for mechanical eyes.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
var/can_repair = 0
|
||||
|
||||
var/health_prefix = ""
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/cultify()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4)
|
||||
var/imprinted = "empty"
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
//////////////////////////////Capturing////////////////////////////////////////////////////////
|
||||
|
||||
@@ -88,6 +89,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/constructshell/cult
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
icon_state = "construct-cult"
|
||||
desc = "This eerie contraption looks like it would come alive if supplied with a missing ingredient."
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
faction = "cult"
|
||||
supernatural = 1
|
||||
tameable = FALSE
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/cult/cultify()
|
||||
return
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
minbodytemp = 0
|
||||
|
||||
supernatural = 1
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
/mob/living/simple_animal/hostile/creature/cult/cultify()
|
||||
return
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/cult
|
||||
faction = "cult"
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/cult/cultify()
|
||||
return
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
faction = "cult"
|
||||
status_flags = CANPUSH
|
||||
hunger_enabled = 0
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
|
||||
/mob/living/simple_animal/shade/cultify()
|
||||
return
|
||||
|
||||
@@ -50,3 +50,5 @@
|
||||
//set macro to normal incase it was overriden (like cyborg currently does)
|
||||
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
|
||||
MOB_STOP_THINKING(src)
|
||||
|
||||
update_client_color()
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
mind.handle_mob_deletion(src)
|
||||
for(var/infection in viruses)
|
||||
qdel(infection)
|
||||
for(var/cc in client_colors)
|
||||
qdel(cc)
|
||||
client_colors = null
|
||||
viruses.Cut()
|
||||
|
||||
//Added this to prevent nonliving mobs from ghostising
|
||||
|
||||
Reference in New Issue
Block a user