mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 11:39:18 +00:00
* makes it so the sanitize_hexcolors' default is 6 characters rather than 3 and gets rid of color_legacy * Feex * Feex some more * Final feex * Please no more I'm tired * <<<<<<< HEAD Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
126 lines
4.1 KiB
Plaintext
126 lines
4.1 KiB
Plaintext
/proc/generate_possible_values_for_sprite_accessories_on_head(accessories)
|
|
var/list/values = possible_values_for_sprite_accessory_list(accessories)
|
|
|
|
var/icon/head_icon = icon('icons/mob/human_parts_greyscale.dmi', "human_head_m")
|
|
head_icon.Blend(skintone2hex("caucasian1"), ICON_MULTIPLY)
|
|
|
|
for (var/name in values)
|
|
var/datum/sprite_accessory/accessory = accessories[name]
|
|
if (accessory == null || accessory.icon_state == null)
|
|
continue
|
|
|
|
var/icon/final_icon = new(head_icon)
|
|
|
|
var/icon/beard_icon = values[name]
|
|
beard_icon.Blend(COLOR_DARK_BROWN, ICON_MULTIPLY)
|
|
final_icon.Blend(beard_icon, ICON_OVERLAY)
|
|
|
|
final_icon.Crop(10, 19, 22, 31)
|
|
final_icon.Scale(32, 32)
|
|
|
|
values[name] = final_icon
|
|
|
|
return values
|
|
|
|
/datum/preference/color/eye_color
|
|
savefile_key = "eye_color"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
|
relevant_species_trait = EYECOLOR
|
|
|
|
/datum/preference/color/eye_color/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.eye_color = value
|
|
|
|
var/obj/item/organ/eyes/eyes_organ = target.getorgan(/obj/item/organ/eyes)
|
|
if (istype(eyes_organ))
|
|
if (!initial(eyes_organ.eye_color))
|
|
eyes_organ.eye_color = value
|
|
eyes_organ.old_eye_color = value
|
|
|
|
/datum/preference/color/eye_color/create_default_value()
|
|
return random_eye_color()
|
|
|
|
/datum/preference/choiced/facial_hairstyle
|
|
savefile_key = "facial_style_name"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
category = PREFERENCE_CATEGORY_FEATURES
|
|
main_feature_name = "Facial hair"
|
|
should_generate_icons = TRUE
|
|
relevant_species_trait = FACEHAIR
|
|
|
|
/datum/preference/choiced/facial_hairstyle/init_possible_values()
|
|
return generate_possible_values_for_sprite_accessories_on_head(GLOB.facial_hairstyles_list)
|
|
|
|
/datum/preference/choiced/facial_hairstyle/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.facial_hairstyle = value
|
|
|
|
/datum/preference/choiced/facial_hairstyle/compile_constant_data()
|
|
var/list/data = ..()
|
|
|
|
data[SUPPLEMENTAL_FEATURE_KEY] = "facial_hair_color"
|
|
|
|
return data
|
|
|
|
/datum/preference/color/facial_hair_color
|
|
savefile_key = "facial_hair_color"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
|
|
relevant_species_trait = FACEHAIR
|
|
|
|
/datum/preference/color/facial_hair_color/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.facial_hair_color = value
|
|
|
|
/datum/preference/color/hair_color
|
|
savefile_key = "hair_color"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
|
|
relevant_species_trait = HAIR
|
|
|
|
/datum/preference/color/hair_color/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.hair_color = value
|
|
|
|
/datum/preference/choiced/hairstyle
|
|
savefile_key = "hairstyle_name"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
category = PREFERENCE_CATEGORY_FEATURES
|
|
main_feature_name = "Hairstyle"
|
|
should_generate_icons = TRUE
|
|
relevant_species_trait = HAIR
|
|
|
|
/datum/preference/choiced/hairstyle/init_possible_values()
|
|
return generate_possible_values_for_sprite_accessories_on_head(GLOB.hairstyles_list)
|
|
|
|
/datum/preference/choiced/hairstyle/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.hairstyle = value
|
|
|
|
/datum/preference/choiced/hairstyle/compile_constant_data()
|
|
var/list/data = ..()
|
|
|
|
data[SUPPLEMENTAL_FEATURE_KEY] = "hair_color"
|
|
|
|
return data
|
|
|
|
/datum/preference/choiced/hair_gradient
|
|
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
savefile_key = "hair_gradient"
|
|
|
|
/datum/preference/choiced/hair_gradient/init_possible_values()
|
|
return assoc_to_keys(GLOB.hair_gradients_list)
|
|
|
|
/datum/preference/choiced/hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.grad_style = value
|
|
target.update_hair()
|
|
|
|
/datum/preference/choiced/hair_gradient/create_default_value()
|
|
return "None"
|
|
|
|
/datum/preference/color/hair_gradient
|
|
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
savefile_key = "hair_gradient_color"
|
|
|
|
/datum/preference/color/hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.grad_color = value
|
|
target.update_hair()
|