[SEMI-MODULAR?][TESTMERGE FIRST] Glow in the dark markings/bodyparts/eyes (#8960)

* FUCKIN WOOO

* much better

* yesssssss

* yeetus deletus the merge conflictus dies

* fug that was an oops

* better

* linters are weird

* woops I erased tesh tails

* better

* wingfix

Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
Seris02
2021-11-06 22:41:29 -04:00
committed by GitHub
co-authored by Gandalf
parent f345ed295f
commit 99a6fe31f2
45 changed files with 789 additions and 431 deletions
+50 -2
View File
@@ -548,14 +548,62 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
/datum/preference/tri_color
abstract_type = /datum/preference/tri_color
var/type_to_check = /datum/preference/toggle/allow_mismatched_parts
var/actually_check = TRUE
/datum/preference/tri_color/deserialize(input, datum/preferences/preferences)
var/list/input_colors = input
return list(sanitize_color(input_colors[1]), sanitize_color(input_colors[2]), sanitize_color(input_colors[3]))
return list(sanitize_hexcolor(input_colors[1]), sanitize_hexcolor(input_colors[2]), sanitize_hexcolor(input_colors[3]))
/datum/preference/tri_color/create_default_value()
return list(random_color(), random_color(), random_color())
return list("#[random_color()]", "#[random_color()]", "#[random_color()]")
/datum/preference/tri_color/is_valid(list/value)
return islist(value) && value.len == 3 && (findtext(value[1], GLOB.is_color) && findtext(value[2], GLOB.is_color) && findtext(value[3], GLOB.is_color))
/datum/preference/tri_color/is_accessible(datum/preferences/preferences)
if (!actually_check || type == abstract_type)
return ..(preferences)
var/passed_initial_check = ..(preferences)
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
var/part_enabled = preferences.read_preference(type_to_check)
return ((passed_initial_check || allowed) && part_enabled)
/datum/preference/tri_color/apply_to_human(mob/living/carbon/human/target, value)
if (type == abstract_type)
return ..()
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_COLOR_LIST] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
/datum/preference/tri_bool
abstract_type = /datum/preference/tri_bool
var/type_to_check = /datum/preference/toggle/allow_mismatched_parts
/datum/preference/tri_bool/deserialize(input, datum/preferences/preferences)
var/list/input_bools = input
return list(sanitize_integer(input_bools[1]), sanitize_integer(input_bools[2]), sanitize_integer(input_bools[3]))
/datum/preference/tri_bool/create_default_value()
return list(FALSE, FALSE, FALSE)
/datum/preference/tri_bool/is_valid(list/value)
return islist(value) && value.len == 3 && isnum(value[1]) && isnum(value[2]) && isnum(value[3])
/datum/preference/tri_bool/is_accessible(datum/preferences/preferences)
if(type == abstract_type)
return ..(preferences)
var/passed_initial_check = ..(preferences)
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
var/emissives_allowed = preferences.read_preference(/datum/preference/toggle/allow_emissives)
var/part_enabled = preferences.read_preference(type_to_check)
return ((passed_initial_check || allowed) && part_enabled && emissives_allowed)
/datum/preference/tri_bool/apply_to_human(mob/living/carbon/human/target, value)
if (type == abstract_type)
return ..()
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_EMISSIVE_LIST] = list(sanitize_integer(value[1]), sanitize_integer(value[2]), sanitize_integer(value[3]))
// SKYRAT EDIT END