mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Splits eye color into two vars | Heterochromia Quirk [MDB IGNORE] (#13390)
* Splits eye color into two vars | Heterochromia Quirk * yesyes * eeee Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
Zephyr
Gandalf
parent
4ed05d2d48
commit
1bc09326d0
@@ -29,7 +29,8 @@
|
||||
|
||||
#define DNA_BLOCK_SIZE_COLOR DEFAULT_HEX_COLOR_LEN
|
||||
|
||||
#define DNA_EYE_COLOR_BLOCK 4
|
||||
#define DNA_EYE_COLOR_LEFT_BLOCK 4
|
||||
#define DNA_EYE_COLOR_RIGHT_BLOCK 4
|
||||
#define DNA_FACIAL_HAIR_COLOR_BLOCK 2
|
||||
#define DNA_FACIAL_HAIRSTYLE_BLOCK 6
|
||||
#define DNA_GENDER_BLOCK 5
|
||||
|
||||
+12
-6
@@ -12,7 +12,8 @@
|
||||
GLOBAL_LIST_INIT(identity_block_lengths, list(
|
||||
"[DNA_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_FACIAL_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_LEFT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_RIGHT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
))
|
||||
|
||||
/**
|
||||
@@ -37,7 +38,8 @@ GLOBAL_LIST_INIT(features_block_lengths, list(
|
||||
GLOBAL_LIST_INIT(identity_block_lengths, list(
|
||||
"[DNA_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_FACIAL_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_LEFT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_RIGHT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
))
|
||||
|
||||
/**
|
||||
@@ -211,7 +213,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
|
||||
L[DNA_FACIAL_HAIRSTYLE_BLOCK] = construct_block(GLOB.facial_hairstyles_list.Find(H.facial_hairstyle), GLOB.facial_hairstyles_list.len)
|
||||
L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color, include_crunch = FALSE)
|
||||
L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len)
|
||||
L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color, include_crunch = FALSE)
|
||||
L[DNA_EYE_COLOR_LEFT_BLOCK] = sanitize_hexcolor(H.eye_color_left, include_crunch = FALSE)
|
||||
L[DNA_EYE_COLOR_RIGHT_BLOCK] = sanitize_hexcolor(H.eye_color_right, include_crunch = FALSE)
|
||||
|
||||
for(var/blocknum in 1 to DNA_UNI_IDENTITY_BLOCKS)
|
||||
. += L[blocknum] || random_string(GET_UI_BLOCK_LEN(blocknum), GLOB.hex_characters)
|
||||
@@ -339,8 +342,10 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
|
||||
set_uni_identity_block(blocknumber, sanitize_hexcolor(H.facial_hair_color, include_crunch = FALSE))
|
||||
if(DNA_SKIN_TONE_BLOCK)
|
||||
set_uni_identity_block(blocknumber, construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len))
|
||||
if(DNA_EYE_COLOR_BLOCK)
|
||||
set_uni_identity_block(blocknumber, sanitize_hexcolor(H.eye_color, include_crunch = FALSE))
|
||||
if(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
set_uni_identity_block(blocknumber, sanitize_hexcolor(H.eye_color_left, include_crunch = FALSE))
|
||||
if(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
set_uni_identity_block(blocknumber, sanitize_hexcolor(H.eye_color_right, include_crunch = FALSE))
|
||||
if(DNA_GENDER_BLOCK)
|
||||
switch(H.gender)
|
||||
if(MALE)
|
||||
@@ -615,7 +620,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
|
||||
hair_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_HAIR_COLOR_BLOCK))
|
||||
facial_hair_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
|
||||
skin_tone = GLOB.skin_tones[deconstruct_block(get_uni_identity_block(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
|
||||
eye_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_BLOCK))
|
||||
eye_color_left = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_LEFT_BLOCK))
|
||||
eye_color_right = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_RIGHT_BLOCK))
|
||||
facial_hairstyle = GLOB.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)]
|
||||
hairstyle = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)]
|
||||
var/features = dna.unique_features
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
ADD_TRAIT(target, TRAIT_UNNATURAL_RED_GLOWY_EYES, CULT_TRAIT)
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/human_parent = target
|
||||
human_parent.eye_color = BLOODCULT_EYE
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
human_parent.eye_color_left = BLOODCULT_EYE
|
||||
human_parent.eye_color_right = BLOODCULT_EYE
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
human_parent.update_body()
|
||||
|
||||
/**
|
||||
@@ -39,8 +41,10 @@
|
||||
REMOVE_TRAIT(target, TRAIT_UNNATURAL_RED_GLOWY_EYES, CULT_TRAIT)
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/human_parent = target
|
||||
human_parent.eye_color = initial(human_parent.eye_color)
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
human_parent.eye_color_left = initial(human_parent.eye_color_left)
|
||||
human_parent.eye_color_right = initial(human_parent.eye_color_right)
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
human_parent.dna.update_ui_block(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
human_parent.update_body()
|
||||
UnregisterSignal(target, list(COMSIG_CHANGELING_TRANSFORM, COMSIG_HUMAN_MONKEYIZE, COMSIG_MONKEY_HUMANIZE))
|
||||
return ..()
|
||||
|
||||
@@ -173,6 +173,60 @@
|
||||
species.disliked_food = initial(species.disliked_food)
|
||||
UnregisterSignal(human_holder, COMSIG_SPECIES_GAIN)
|
||||
|
||||
/datum/quirk/heterochromatic
|
||||
name = "Heterochromatic"
|
||||
desc = "One of your eyes is a different color than the other!"
|
||||
icon = "eye-low-vision" // Ignore the icon name, its actually a fairly good representation of different color eyes
|
||||
value = 0
|
||||
var/color
|
||||
|
||||
/datum/quirk/heterochromatic/add()
|
||||
color = color || quirk_holder.client?.prefs?.read_preference(/datum/preference/color/heterochromatic)
|
||||
if(!color)
|
||||
return
|
||||
|
||||
link_to_holder()
|
||||
|
||||
/datum/quirk/heterochromatic/post_add()
|
||||
if(color)
|
||||
return
|
||||
|
||||
color = quirk_holder.client?.prefs?.read_preference(/datum/preference/color/heterochromatic)
|
||||
if(!color)
|
||||
return
|
||||
|
||||
link_to_holder()
|
||||
|
||||
/datum/quirk/heterochromatic/remove()
|
||||
UnregisterSignal(quirk_holder, COMSIG_CARBON_LOSE_ORGAN)
|
||||
|
||||
/datum/quirk/heterochromatic/proc/link_to_holder()
|
||||
var/mob/living/carbon/human/human_holder = quirk_holder
|
||||
human_holder.eye_color_heterochromatic = TRUE
|
||||
human_holder.eye_color_right = color
|
||||
// We set override to TRUE as link to holder will be called whenever the preference is applied, given this quirk exists on the mob
|
||||
RegisterSignal(human_holder, COMSIG_CARBON_LOSE_ORGAN, .proc/check_eye_removal, override=TRUE)
|
||||
|
||||
var/obj/item/organ/eyes/eyes_of_the_holder = quirk_holder.getorgan(/obj/item/organ/eyes)
|
||||
if(!eyes_of_the_holder)
|
||||
return
|
||||
|
||||
eyes_of_the_holder.eye_color_right = color
|
||||
eyes_of_the_holder.old_eye_color_right = color
|
||||
eyes_of_the_holder.refresh()
|
||||
|
||||
/datum/quirk/heterochromatic/proc/check_eye_removal(datum/source, obj/item/organ/eyes/removed)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!istype(removed))
|
||||
return
|
||||
|
||||
// Eyes were removed, remove heterochromia from the human holder and bid them adieu
|
||||
var/mob/living/carbon/human/human_holder = quirk_holder
|
||||
human_holder.eye_color_heterochromatic = FALSE
|
||||
human_holder.eye_color_right = initial(human_holder.eye_color_right)
|
||||
UnregisterSignal(human_holder, COMSIG_CARBON_LOSE_ORGAN)
|
||||
|
||||
/datum/quirk/monochromatic
|
||||
name = "Monochromacy"
|
||||
desc = "You suffer from full colorblindness, and perceive nearly the entire world in blacks and whites."
|
||||
|
||||
@@ -64,15 +64,18 @@
|
||||
duration = 10 SECONDS
|
||||
alert_type = /atom/movable/screen/alert/status_effect/stoned
|
||||
status_type = STATUS_EFFECT_REFRESH
|
||||
var/original_eye_color
|
||||
var/original_eye_color_left
|
||||
var/original_eye_color_right
|
||||
|
||||
/datum/status_effect/stoned/on_apply()
|
||||
if(!ishuman(owner))
|
||||
CRASH("[type] status effect added to non-human owner: [owner ? owner.type : "null owner"]")
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
original_eye_color = human_owner.eye_color
|
||||
original_eye_color_left = human_owner.eye_color_left
|
||||
original_eye_color_right = human_owner.eye_color_right
|
||||
human_owner.add_movespeed_modifier(/datum/movespeed_modifier/reagent/cannabis) //slows you down
|
||||
human_owner.eye_color = BLOODCULT_EYE //makes cult eyes less obvious
|
||||
human_owner.eye_color_left = BLOODCULT_EYE //makes cult eyes less obvious
|
||||
human_owner.eye_color_right = BLOODCULT_EYE //makes cult eyes less obvious
|
||||
human_owner.update_body() //updates eye color
|
||||
ADD_TRAIT(human_owner, TRAIT_BLOODSHOT_EYES, type) //dilates blood vessels in eyes
|
||||
ADD_TRAIT(human_owner, TRAIT_CLUMSY, type) //impairs motor coordination
|
||||
@@ -85,7 +88,8 @@
|
||||
stack_trace("[type] status effect being removed from non-human owner: [owner ? owner.type : "null owner"]")
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
human_owner.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/cannabis)
|
||||
human_owner.eye_color = original_eye_color
|
||||
human_owner.eye_color_left = original_eye_color_left
|
||||
human_owner.eye_color_right = original_eye_color_right
|
||||
human_owner.update_body()
|
||||
REMOVE_TRAIT(human_owner, TRAIT_BLOODSHOT_EYES, type)
|
||||
REMOVE_TRAIT(human_owner, TRAIT_CLUMSY, type)
|
||||
|
||||
@@ -265,12 +265,14 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
amazed_human.update_mutant_bodyparts(force_update = TRUE) /// SKYRAT EDIT - Mirrors are no longer scared of colored ears
|
||||
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eye_color = input(amazed_human, "Choose your eye color", "Eye Color", amazed_human.eye_color) as color|null
|
||||
var/new_eye_color = input(amazed_human, "Choose your eye color", "Eye Color", amazed_human.eye_color_left) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return TRUE
|
||||
if(new_eye_color)
|
||||
amazed_human.eye_color = sanitize_hexcolor(new_eye_color)
|
||||
amazed_human.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
amazed_human.eye_color_left = sanitize_hexcolor(new_eye_color)
|
||||
amazed_human.eye_color_right = sanitize_hexcolor(new_eye_color)
|
||||
amazed_human.dna.update_ui_block(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
amazed_human.dna.update_ui_block(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
amazed_human.update_body()
|
||||
|
||||
/obj/structure/mirror/magic/lesser/Initialize(mapload)
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
H.facial_hairstyle = random_facial_hairstyle(H.gender)
|
||||
H.hair_color = "#[random_color()]"
|
||||
H.facial_hair_color = H.hair_color
|
||||
H.eye_color = random_eye_color()
|
||||
var/random_eye_color = random_eye_color()
|
||||
H.eye_color_left = random_eye_color
|
||||
H.eye_color_right = random_eye_color
|
||||
H.dna.blood_type = random_blood_type()
|
||||
|
||||
// Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant.
|
||||
|
||||
@@ -505,7 +505,8 @@
|
||||
r_hand = /obj/item/melee/blood_magic/stun
|
||||
|
||||
/datum/outfit/cultist/post_equip(mob/living/carbon/human/H, visualsOnly)
|
||||
H.eye_color = BLOODCULT_EYE
|
||||
H.eye_color_left = BLOODCULT_EYE
|
||||
H.eye_color_right = BLOODCULT_EYE
|
||||
H.update_body()
|
||||
|
||||
var/obj/item/clothing/suit/hooded/hooded = locate() in H
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
if(visualsOnly)
|
||||
return
|
||||
equipped_on.fully_replace_character_name(null,"Waldo")
|
||||
equipped_on.eye_color = "#000000"
|
||||
equipped_on.eye_color_left = "#000000"
|
||||
equipped_on.eye_color_right = "#000000"
|
||||
equipped_on.gender = MALE
|
||||
equipped_on.skin_tone = "caucasian3"
|
||||
equipped_on.hairstyle = "Business Hair 3"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/datum/preference/color/heterochromatic
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_key = "heterochromatic"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
|
||||
/datum/preference/color/heterochromatic/is_accessible(datum/preferences/preferences)
|
||||
if (!..(preferences))
|
||||
return FALSE
|
||||
|
||||
return "Heterochromatic" in preferences.all_quirks
|
||||
|
||||
/datum/preference/color/heterochromatic/apply_to_human(mob/living/carbon/human/target, value)
|
||||
for(var/datum/quirk/heterochromatic/hetero_quirk in target.quirks)
|
||||
hetero_quirk.color = value
|
||||
hetero_quirk.link_to_holder()
|
||||
@@ -69,6 +69,7 @@
|
||||
return TRUE
|
||||
|
||||
preferences.all_quirks = new_quirks
|
||||
preferences.character_preview_view?.update_body()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
return TRUE
|
||||
|
||||
preferences.all_quirks = new_quirks
|
||||
preferences.character_preview_view?.update_body()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if (!..(preferences))
|
||||
return FALSE
|
||||
|
||||
return preferences.parent?.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM // SKYRAT EDIT - ORIGINAL: return preferences.parent.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM
|
||||
return preferences.parent && (preferences.parent.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM)
|
||||
|
||||
/datum/preference/choiced/random_name
|
||||
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
|
||||
|
||||
@@ -29,13 +29,25 @@
|
||||
relevant_species_trait = EYECOLOR
|
||||
|
||||
/datum/preference/color/eye_color/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.eye_color = value
|
||||
var/hetero = target.eye_color_heterochromatic
|
||||
target.eye_color_left = value
|
||||
if(!hetero)
|
||||
target.eye_color_right = 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
|
||||
if (!eyes_organ || !istype(eyes_organ))
|
||||
return
|
||||
|
||||
if (!initial(eyes_organ.eye_color_left))
|
||||
eyes_organ.eye_color_left = value
|
||||
eyes_organ.old_eye_color_left = value
|
||||
|
||||
if(hetero) // Don't override the snowflakes please
|
||||
return
|
||||
|
||||
if (!initial(eyes_organ.eye_color_right))
|
||||
eyes_organ.eye_color_right = value
|
||||
eyes_organ.old_eye_color_right = value
|
||||
|
||||
/datum/preference/color/eye_color/create_default_value()
|
||||
return random_eye_color()
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
/obj/item/clothing/glasses/blindfold/white/update_icon(updates=ALL, mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(ishuman(user) && !colored_before)
|
||||
add_atom_colour(user.eye_color, FIXED_COLOUR_PRIORITY)
|
||||
add_atom_colour(user.eye_color_left, FIXED_COLOUR_PRIORITY) // I want this to be an average of the colors of both eyes, but that can be done later
|
||||
colored_before = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/blindfold/white/worn_overlays(mutable_appearance/standing, isinhands = FALSE, file2use)
|
||||
@@ -421,7 +421,7 @@
|
||||
var/mob/living/carbon/human/H = loc
|
||||
var/mutable_appearance/M = mutable_appearance('icons/mob/clothing/eyes.dmi', "blindfoldwhite")
|
||||
M.appearance_flags |= RESET_COLOR
|
||||
M.color = H.eye_color
|
||||
M.color = H.eye_color_left
|
||||
. += M
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/big
|
||||
|
||||
@@ -725,7 +725,8 @@
|
||||
if(1)
|
||||
to_chat(user, span_danger("Your appearance morphs to that of a very small humanoid ash dragon! You get to look like a freak without the cool abilities."))
|
||||
consumer.dna.features = list("mcolor" = "#A02720", "tail_lizard" = "Dark Tiger", "tail_human" = "None", "snout" = "Sharp", "horns" = "Curled", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "Long", "body_markings" = "Dark Tiger Body", "legs" = "Digitigrade Legs")
|
||||
consumer.eye_color = "#FEE5A3"
|
||||
consumer.eye_color_left = "#FEE5A3"
|
||||
consumer.eye_color_right = "#FEE5A3"
|
||||
consumer.set_species(/datum/species/lizard)
|
||||
if(2)
|
||||
to_chat(user, span_danger("Your flesh begins to melt! Miraculously, you seem fine otherwise."))
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
var/facial_hairstyle = "Shaved"
|
||||
|
||||
//Eye colour
|
||||
var/eye_color = "#000000"
|
||||
var/eye_color_left = "#000000"
|
||||
var/eye_color_right = "#000000"
|
||||
/// Var used to keep track of a human mob having a heterochromatic right eye. To ensure prefs don't overwrite shit
|
||||
var/eye_color_heterochromatic = FALSE
|
||||
|
||||
var/skin_tone = "caucasian1" //Skin tone
|
||||
|
||||
|
||||
@@ -946,29 +946,24 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
|
||||
// eyes
|
||||
if(!(NOEYESPRITES in dna.species.species_traits))
|
||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
||||
var/mutable_appearance/eye_overlay
|
||||
if(!E)
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
var/obj/item/organ/eyes/parent_eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if(parent_eyes)
|
||||
add_overlay(parent_eyes.generate_body_overlay(src))
|
||||
else
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', E.eye_icon_state, -BODY_LAYER)
|
||||
if((EYECOLOR in dna.species.species_traits) && E)
|
||||
eye_overlay.color = "#" + eye_color
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
eye_overlay.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(eye_overlay)
|
||||
var/mutable_appearance/missing_eyes = mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
missing_eyes.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
missing_eyes.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(missing_eyes)
|
||||
//SKYRAT EDIT ADDITION
|
||||
if (E && E.is_emissive)
|
||||
var/mutable_appearance/emissive_appearance = emissive_appearance('icons/mob/human_face.dmi', E ? E.eye_icon_state : "eyes_missing", -BODY_LAYER)
|
||||
if (parent_eyes && parent_eyes.is_emissive)
|
||||
var/mutable_appearance/emissive_appearance = emissive_appearance('icons/mob/human_face.dmi', parent_eyes ? parent_eyes.eye_icon_state : "eyes_missing", -BODY_LAYER)
|
||||
emissive_appearance.appearance_flags &= ~RESET_TRANSFORM
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
emissive_appearance.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
emissive_appearance.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(emissive_appearance)
|
||||
//SKYRAT EDIT END
|
||||
|
||||
|
||||
update_inv_head()
|
||||
update_inv_wear_mask()
|
||||
|
||||
|
||||
@@ -591,31 +591,25 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
standing += eye_overlay
|
||||
var/obj/item/organ/eyes/eye_organ = species_human.getorganslot(ORGAN_SLOT_EYES)
|
||||
var/mutable_appearance/no_eyeslay
|
||||
var/mutable_appearance/eye_overlay
|
||||
var/obscured = species_human.check_obscured_slots(TRUE) //eyes that shine in the dark shouldn't show when you have glasses
|
||||
var/add_pixel_x = 0
|
||||
var/add_pixel_y = 0
|
||||
//cut any possible vis overlays
|
||||
if(body_vis_overlays.len)
|
||||
SSvis_overlays.remove_vis_overlay(species_human, body_vis_overlays)
|
||||
|
||||
if(OFFSET_FACE in species_human.dna.species.offset_features)
|
||||
add_pixel_x = species_human.dna.species.offset_features[OFFSET_FACE][1]
|
||||
add_pixel_y = species_human.dna.species.offset_features[OFFSET_FACE][2]
|
||||
|
||||
if(!eye_organ)
|
||||
no_eyeslay = mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
no_eyeslay.pixel_x += add_pixel_x
|
||||
no_eyeslay.pixel_y += add_pixel_y
|
||||
standing += no_eyeslay
|
||||
if(!no_eyeslay)//we need eyes
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', eye_organ.eye_icon_state, -BODY_LAYER)
|
||||
if(eye_organ.overlay_ignore_lighting && !(obscured & ITEM_SLOT_EYES))
|
||||
eye_overlay.overlays += emissive_appearance(eye_overlay.icon, eye_overlay.icon_state, alpha = eye_overlay.alpha)
|
||||
|
||||
eye_overlay.pixel_x += add_pixel_x
|
||||
eye_overlay.pixel_y += add_pixel_y
|
||||
if((EYECOLOR in species_traits) && eye_organ)
|
||||
eye_overlay.color = species_human.eye_color
|
||||
standing += eye_overlay
|
||||
if(!no_eyeslay)
|
||||
for(var/eye_overlay in eye_organ.generate_body_overlay(species_human))
|
||||
standing += eye_overlay
|
||||
|
||||
// blush
|
||||
if (HAS_TRAIT(species_human, TRAIT_BLUSHING)) // Caused by either the *blush emote or the "drunk" mood event
|
||||
@@ -844,7 +838,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
if(FACEHAIR)
|
||||
accessory_overlay.color = source.facial_hair_color
|
||||
if(EYECOLOR)
|
||||
accessory_overlay.color = source.eye_color
|
||||
accessory_overlay.color = source.eye_color_left
|
||||
else
|
||||
accessory_overlay.color = forced_colour
|
||||
standing += accessory_overlay
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
|
||||
// We want to give the head some boring old eyes just so it doesn't look too jank on the head sprite.
|
||||
head.eyes = new /obj/item/organ/eyes(head)
|
||||
head.eyes.eye_color = human.eye_color
|
||||
head.eyes.eye_color_left = human.eye_color_left
|
||||
head.eyes.eye_color_right = human.eye_color_right
|
||||
head.update_icon_dropped()
|
||||
|
||||
human.set_safe_hunger_level()
|
||||
|
||||
@@ -226,21 +226,26 @@ Lizard subspecies: SILVER SCALED
|
||||
///stored mutcolor for when we turn back off of a silverscale.
|
||||
var/old_mutcolor
|
||||
///stored eye color for when we turn back off of a silverscale.
|
||||
var/old_eyecolor
|
||||
var/old_eye_color_left
|
||||
///See above
|
||||
var/old_eye_color_right
|
||||
|
||||
/datum/species/lizard/silverscale/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
var/mob/living/carbon/human/new_silverscale = C
|
||||
old_mutcolor = C.dna.features["mcolor"]
|
||||
old_eyecolor = new_silverscale.eye_color
|
||||
old_eye_color_left = new_silverscale.eye_color_left
|
||||
old_eye_color_right = new_silverscale.eye_color_right
|
||||
new_silverscale.dna.features["mcolor"] = "#eeeeee"
|
||||
new_silverscale.eye_color = "#0000a0"
|
||||
new_silverscale.eye_color_left = "#0000a0"
|
||||
new_silverscale.eye_color_right = "#0000a0"
|
||||
..()
|
||||
new_silverscale.add_filter("silver_glint", 2, list("type" = "outline", "color" = "#ffffff63", "size" = 2))
|
||||
|
||||
/datum/species/lizard/silverscale/on_species_loss(mob/living/carbon/C)
|
||||
var/mob/living/carbon/human/was_silverscale = C
|
||||
was_silverscale.dna.features["mcolor"] = old_mutcolor
|
||||
was_silverscale.eye_color = old_eyecolor
|
||||
was_silverscale.eye_color_left = old_eye_color_left
|
||||
was_silverscale.eye_color_right = old_eye_color_right
|
||||
|
||||
was_silverscale.remove_filter("silver_glint")
|
||||
..()
|
||||
|
||||
@@ -335,14 +335,17 @@
|
||||
. += lips_overlay
|
||||
|
||||
// eyes
|
||||
var/image/eyes_overlay = image('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER, SOUTH)
|
||||
. += eyes_overlay
|
||||
if(eyes)
|
||||
eyes_overlay.icon_state = eyes.eye_icon_state
|
||||
|
||||
if(eyes.eye_color)
|
||||
eyes_overlay.color = eyes.eye_color
|
||||
|
||||
if(eyes) // This is a bit of copy/paste code from eyes.dm:generate_body_overlay
|
||||
var/image/eye_left = image('icons/mob/human_face.dmi', "[eyes.eye_icon_state]_l", -BODY_LAYER, SOUTH)
|
||||
var/image/eye_right = image('icons/mob/human_face.dmi', "[eyes.eye_icon_state]_r", -BODY_LAYER, SOUTH)
|
||||
if(eyes.eye_color_left)
|
||||
eye_left.color = eyes.eye_color_left
|
||||
if(eyes.eye_color_right)
|
||||
eye_right.color = eyes.eye_color_right
|
||||
. += eye_left
|
||||
. += eye_right
|
||||
else
|
||||
. += image('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER, SOUTH)
|
||||
else
|
||||
if(!facial_hair_hidden && facial_overlay && (FACEHAIR in species_flags_list))
|
||||
facial_overlay.alpha = hair_alpha
|
||||
|
||||
@@ -25,9 +25,11 @@
|
||||
var/overlay_ignore_lighting = FALSE
|
||||
var/see_in_dark = 2
|
||||
var/tint = 0
|
||||
var/eye_color = "" //set to a hex code to override a mob's eye color
|
||||
var/eye_color_left = "" //set to a hex code to override a mob's left eye color
|
||||
var/eye_color_right = "" //set to a hex code to override a mob's right eye color
|
||||
var/eye_icon_state = "eyes"
|
||||
var/old_eye_color = "fff"
|
||||
var/old_eye_color_left = "fff"
|
||||
var/old_eye_color_right = "fff"
|
||||
var/flash_protect = FLASH_PROTECTION_NONE
|
||||
var/see_invisible = SEE_INVISIBLE_LIVING
|
||||
var/lighting_alpha
|
||||
@@ -41,13 +43,20 @@
|
||||
. = ..()
|
||||
if(ishuman(eye_owner))
|
||||
var/mob/living/carbon/human/human_owner = eye_owner
|
||||
if (human_owner.emissive_eyes)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(human_owner.emissive_eyes)
|
||||
is_emissive = TRUE
|
||||
old_eye_color = human_owner.eye_color
|
||||
if(eye_color)
|
||||
human_owner.eye_color = eye_color
|
||||
// SKYRAT EDIT END
|
||||
old_eye_color_left = human_owner.eye_color_left
|
||||
old_eye_color_right = human_owner.eye_color_right
|
||||
if(eye_color_left)
|
||||
human_owner.eye_color_left = eye_color_left
|
||||
else
|
||||
eye_color = human_owner.eye_color
|
||||
eye_color_left = human_owner.eye_color_left
|
||||
if(eye_color_right)
|
||||
human_owner.eye_color_right = eye_color_right
|
||||
else
|
||||
eye_color_right = human_owner.eye_color_right
|
||||
if(HAS_TRAIT(human_owner, TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
|
||||
eye_owner.update_tint()
|
||||
@@ -58,13 +67,20 @@
|
||||
/obj/item/organ/eyes/proc/refresh()
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/affected_human = owner
|
||||
old_eye_color = affected_human.eye_color
|
||||
// SKYRAT EDIT ADDITION
|
||||
if (affected_human.emissive_eyes)
|
||||
is_emissive = TRUE
|
||||
if(eye_color)
|
||||
affected_human.eye_color = eye_color
|
||||
// SKYRAT EDIT END
|
||||
old_eye_color_left = affected_human.eye_color_left
|
||||
old_eye_color_right = affected_human.eye_color_right
|
||||
if(eye_color_left)
|
||||
affected_human.eye_color_left = eye_color_left
|
||||
else
|
||||
eye_color = affected_human.eye_color
|
||||
eye_color_left = affected_human.eye_color_left
|
||||
if(eye_color_right)
|
||||
affected_human.eye_color_right = eye_color_right
|
||||
else
|
||||
eye_color_right = affected_human.eye_color_right
|
||||
if(HAS_TRAIT(affected_human, TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
|
||||
owner.update_tint()
|
||||
@@ -76,9 +92,12 @@
|
||||
|
||||
/obj/item/organ/eyes/Remove(mob/living/carbon/eye_owner, special = 0)
|
||||
..()
|
||||
if(ishuman(eye_owner) && eye_color)
|
||||
if(ishuman(eye_owner))
|
||||
var/mob/living/carbon/human/human_owner = eye_owner
|
||||
human_owner.eye_color = old_eye_color
|
||||
if(eye_color_left)
|
||||
human_owner.eye_color_left = old_eye_color_left
|
||||
if(eye_color_right)
|
||||
human_owner.eye_color_right = old_eye_color_right
|
||||
human_owner.update_body()
|
||||
eye_owner.cure_blind(EYE_DAMAGE)
|
||||
eye_owner.cure_nearsighted(EYE_DAMAGE)
|
||||
@@ -88,10 +107,43 @@
|
||||
eye_owner.update_sight()
|
||||
is_emissive = FALSE
|
||||
|
||||
#define OFFSET_X 1
|
||||
#define OFFSET_Y 2
|
||||
|
||||
/// This proc generates a list of overlays that the eye should be displayed using for the given parent
|
||||
/obj/item/organ/eyes/proc/generate_body_overlay(mob/living/carbon/human/parent)
|
||||
if(!istype(parent) || parent.getorgan(/obj/item/organ/eyes) != src)
|
||||
CRASH("Generating a body overlay for [src] targeting an invalid parent '[parent]'.")
|
||||
|
||||
var/mutable_appearance/eye_left = mutable_appearance('icons/mob/human_face.dmi', "[eye_icon_state]_l", -BODY_LAYER)
|
||||
var/mutable_appearance/eye_right = mutable_appearance('icons/mob/human_face.dmi', "[eye_icon_state]_r", -BODY_LAYER)
|
||||
|
||||
if(EYECOLOR in parent.dna?.species.species_traits)
|
||||
eye_right.color = eye_color_right
|
||||
eye_left.color = eye_color_left
|
||||
|
||||
if(OFFSET_FACE in parent.dna?.species.offset_features)
|
||||
var/offset = parent.dna.species.offset_features[OFFSET_FACE]
|
||||
eye_left.pixel_x += offset[OFFSET_X]
|
||||
eye_right.pixel_x += offset[OFFSET_X]
|
||||
eye_left.pixel_y += offset[OFFSET_Y]
|
||||
eye_right.pixel_y += offset[OFFSET_Y]
|
||||
|
||||
var/obscured = parent.check_obscured_slots(TRUE)
|
||||
if(overlay_ignore_lighting && !(obscured & ITEM_SLOT_EYES))
|
||||
eye_left.overlays += emissive_appearance(eye_left.icon, eye_left.icon_state, alpha = eye_left.alpha)
|
||||
eye_right.overlays += emissive_appearance(eye_right.icon, eye_right.icon_state, alpha = eye_right.alpha)
|
||||
|
||||
return list(eye_left, eye_right)
|
||||
|
||||
#undef OFFSET_X
|
||||
#undef OFFSET_Y
|
||||
|
||||
//Gotta reset the eye color, because that persists
|
||||
/obj/item/organ/eyes/enter_wardrobe()
|
||||
. = ..()
|
||||
eye_color = initial(eye_color)
|
||||
eye_color_left = initial(eye_color_left)
|
||||
eye_color_right = initial(eye_color_right)
|
||||
|
||||
/obj/item/organ/eyes/on_life(delta_time, times_fired)
|
||||
. = ..()
|
||||
@@ -180,7 +232,8 @@
|
||||
/obj/item/organ/eyes/robotic/basic
|
||||
name = "basic robotic eyes"
|
||||
desc = "A pair of basic cybernetic eyes that restore vision, but at some vulnerability to light."
|
||||
eye_color = "5500ff"
|
||||
eye_color_left = "5500ff"
|
||||
eye_color_right = "5500ff"
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/eyes/robotic/basic/emp_act(severity)
|
||||
@@ -196,7 +249,8 @@
|
||||
/obj/item/organ/eyes/robotic/xray
|
||||
name = "\improper X-ray eyes"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
|
||||
eye_color = "000"
|
||||
eye_color_left = "000"
|
||||
eye_color_right = "000"
|
||||
see_in_dark = NIGHTVISION_FOV_RANGE
|
||||
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
|
||||
@@ -211,7 +265,8 @@
|
||||
/obj/item/organ/eyes/robotic/thermals
|
||||
name = "thermal eyes"
|
||||
desc = "These cybernetic eye implants will give you thermal vision. Vertical slit pupil included."
|
||||
eye_color = "FC0"
|
||||
eye_color_left = "FC0"
|
||||
eye_color_right = "FC0"
|
||||
sight_flags = SEE_MOBS
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
@@ -220,7 +275,8 @@
|
||||
/obj/item/organ/eyes/robotic/flashlight
|
||||
name = "flashlight eyes"
|
||||
desc = "It's two flashlights rigged together with some wire. Why would you put these in someone's head?"
|
||||
eye_color ="fee5a3"
|
||||
eye_color_left ="fee5a3"
|
||||
eye_color_right ="fee5a3"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight_eyes"
|
||||
flash_protect = FLASH_PROTECTION_WELDER
|
||||
@@ -261,7 +317,8 @@
|
||||
/obj/item/organ/eyes/robotic/glow
|
||||
name = "High Luminosity Eyes"
|
||||
desc = "Special glowing eyes, used by snowflakes who want to be special."
|
||||
eye_color = "000"
|
||||
eye_color_left = "000"
|
||||
eye_color_right = "000"
|
||||
actions_types = list(/datum/action/item_action/organ_action/use, /datum/action/item_action/organ_action/toggle)
|
||||
var/current_color_string = "#ffffff"
|
||||
var/active = FALSE
|
||||
@@ -320,7 +377,8 @@
|
||||
|
||||
/obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor)
|
||||
current_color_string = newcolor
|
||||
eye_color = current_color_string //SKYRAT EDIT CHANGE
|
||||
eye_color_left = RGB2EYECOLORSTRING(current_color_string)
|
||||
eye_color_right = eye_color_left
|
||||
if(!QDELETED(owner) && ishuman(owner)) //Other carbon mobs don't have eye color.
|
||||
owner.dna.species.handle_body(owner)
|
||||
|
||||
@@ -492,7 +550,8 @@
|
||||
name = "adapted eyes"
|
||||
desc = "These red eyes look like two foggy marbles. They give off a particularly worrying glow in the dark."
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
eye_color = "f00"
|
||||
eye_color_left = "f00"
|
||||
eye_color_right = "f00"
|
||||
icon_state = "adapted_eyes"
|
||||
eye_icon_state = "eyes_glow"
|
||||
overlay_ignore_lighting = TRUE
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
@@ -126,17 +126,15 @@
|
||||
human_user.update_hair()
|
||||
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color) as color|null
|
||||
var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color_left) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
return TRUE
|
||||
if(new_eye_color)
|
||||
var/n_color = sanitize_hexcolor(new_eye_color)
|
||||
var/obj/item/organ/eyes/eyes = human_user.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(eyes)
|
||||
eyes.eye_color = n_color
|
||||
human_user.eye_color = n_color
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
human_user.dna.species.handle_body()
|
||||
human_user.eye_color_left = sanitize_hexcolor(new_eye_color)
|
||||
human_user.eye_color_right = sanitize_hexcolor(new_eye_color)
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
human_user.update_body()
|
||||
|
||||
/obj/item/hhmirror/wracemagic
|
||||
name = "raceless handheld magic mirror"
|
||||
@@ -212,17 +210,15 @@
|
||||
human_user.update_hair()
|
||||
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color) as color|null
|
||||
var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color_left) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
return TRUE
|
||||
if(new_eye_color)
|
||||
var/n_color = sanitize_hexcolor(new_eye_color)
|
||||
var/obj/item/organ/eyes/eyes = human_user.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(eyes)
|
||||
eyes.eye_color = n_color
|
||||
human_user.eye_color = n_color
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
human_user.dna.species.handle_body()
|
||||
human_user.eye_color_left = sanitize_hexcolor(new_eye_color)
|
||||
human_user.eye_color_right = sanitize_hexcolor(new_eye_color)
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_LEFT_BLOCK)
|
||||
human_user.dna.update_ui_block(DNA_EYE_COLOR_RIGHT_BLOCK)
|
||||
human_user.update_body()
|
||||
charges--
|
||||
if(charges == 0)
|
||||
qdel(src)
|
||||
|
||||
@@ -1252,57 +1252,3 @@
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
type_to_check = /datum/preference/toggle/neck_acc
|
||||
|
||||
/// Heterochromia
|
||||
|
||||
/datum/preference/toggle/heterochromia
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "heterochromia_toggle"
|
||||
relevant_mutant_bodypart = "heterochromia"
|
||||
default_value = FALSE
|
||||
|
||||
/datum/preference/toggle/heterochromia/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/toggle/heterochromia/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
return passed_initial_check || allowed
|
||||
|
||||
/datum/preference/choiced/heterochromia
|
||||
savefile_key = "feature_heterochromia"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
relevant_mutant_bodypart = "heterochromia"
|
||||
|
||||
/datum/preference/choiced/heterochromia/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/heterochromia)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/choiced/heterochromia/init_possible_values()
|
||||
return assoc_to_keys(GLOB.sprite_accessories["heterochromia"])
|
||||
|
||||
/datum/preference/choiced/heterochromia/apply_to_human(mob/living/carbon/human/target, value)
|
||||
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"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/heterochromia/create_default_value()
|
||||
var/datum/sprite_accessory/heterochromia/none/default = /datum/sprite_accessory/heterochromia/none
|
||||
return initial(default.name)
|
||||
|
||||
/datum/preference/tri_color/heterochromia
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "heterochromia_color"
|
||||
relevant_mutant_bodypart = "heterochromia"
|
||||
type_to_check = /datum/preference/toggle/heterochromia
|
||||
|
||||
/datum/preference/tri_bool/heterochromia
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "heterochromia_emissive"
|
||||
relevant_mutant_bodypart = "heterochromia"
|
||||
type_to_check = /datum/preference/toggle/heterochromia
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
GLOBAL_LIST_INIT(identity_block_lengths, list(
|
||||
"[DNA_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_FACIAL_HAIR_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_LEFT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
"[DNA_EYE_COLOR_RIGHT_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
|
||||
))
|
||||
|
||||
/**
|
||||
@@ -251,7 +252,8 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block)
|
||||
hair_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_HAIR_COLOR_BLOCK))
|
||||
facial_hair_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
|
||||
skin_tone = GLOB.skin_tones[deconstruct_block(get_uni_identity_block(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
|
||||
eye_color = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_BLOCK))
|
||||
eye_color_left = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_LEFT_BLOCK))
|
||||
eye_color_right = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_RIGHT_BLOCK))
|
||||
facial_hairstyle = GLOB.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)]
|
||||
hairstyle = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)]
|
||||
var/features = dna.unique_features
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/datum/sprite_accessory/heterochromia
|
||||
name = "Heterochromia"
|
||||
key = "heterochromia"
|
||||
relevent_layers = list(BODY_FRONT_UNDER_CLOTHES)
|
||||
color_src = USE_ONE_COLOR
|
||||
icon = 'modular_skyrat/master_files/icons/mob/body_markings/heterochromia.dmi'
|
||||
default_color = "#555555"
|
||||
|
||||
/datum/sprite_accessory/heterochromia/is_hidden(mob/living/carbon/human/H, obj/item/bodypart/HD)
|
||||
if(H.head && (H.head.flags_inv & HIDEEYES))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/sprite_accessory/heterochromia/none
|
||||
name = "None"
|
||||
icon_state = "none"
|
||||
|
||||
/datum/sprite_accessory/heterochromia/human
|
||||
name = "Heterochromia (Human)"
|
||||
icon_state = "human"
|
||||
|
||||
/datum/sprite_accessory/heterochromia/vox
|
||||
name = "Heterochromia (Vox)"
|
||||
icon_state = "vox"
|
||||
|
||||
/datum/sprite_accessory/heterochromia/teshari
|
||||
name = "Heterochromia (Teshari)"
|
||||
icon_state = "teshari"
|
||||
@@ -155,7 +155,7 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
if(FACEHAIR)
|
||||
accessory_overlay.color = H.facial_hair_color
|
||||
if(EYECOLOR)
|
||||
accessory_overlay.color = H.eye_color
|
||||
accessory_overlay.color = H.eye_color_left
|
||||
else
|
||||
accessory_overlay.color = override_color
|
||||
if (accessories)
|
||||
@@ -210,7 +210,7 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
if(FACEHAIR)
|
||||
extra_accessory_overlay.color = H.facial_hair_color
|
||||
if(EYECOLOR)
|
||||
extra_accessory_overlay.color = H.eye_color
|
||||
extra_accessory_overlay.color = H.eye_color_left
|
||||
|
||||
standing += extra_accessory_overlay
|
||||
|
||||
@@ -441,7 +441,7 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
if(eyes?.is_emissive)
|
||||
eye_emissive = emissive_appearance_copy(eye_overlay)
|
||||
if((EYECOLOR in species_traits) && eyes)
|
||||
eye_overlay.color = species_human.eye_color
|
||||
eye_overlay.color = species_human.eye_color_left
|
||||
if(OFFSET_FACE in species_human.dna.species.offset_features)
|
||||
eye_overlay.pixel_x += species_human.dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += species_human.dna.species.offset_features[OFFSET_FACE][2]
|
||||
|
||||
@@ -3,15 +3,18 @@
|
||||
icon_state = "cybernetic_eyeballs"
|
||||
|
||||
/obj/item/organ/eyes/robotic/xray
|
||||
eye_color = "#00ffe5"
|
||||
eye_color_left = "#00ffe5"
|
||||
eye_color_right = "#00ffe5"
|
||||
icon_state = "xray_eyes"
|
||||
|
||||
/obj/item/organ/eyes/robotic/thermals
|
||||
eye_color = "#FC0"
|
||||
eye_color_left = "#FC0"
|
||||
eye_color_right = "#FC0"
|
||||
icon_state = "thermal_eyes"
|
||||
|
||||
/obj/item/organ/eyes/robotic/shield
|
||||
eye_color = "#ff2700"
|
||||
eye_color_left = "#ff2700"
|
||||
eye_color_right = "#ff2700"
|
||||
icon_state = "shielded_eyes"
|
||||
|
||||
/obj/item/organ/eyes/night_vision/cyber
|
||||
@@ -19,6 +22,7 @@
|
||||
icon = 'modular_skyrat/modules/implants/icons/internal_HA.dmi' //All in the chest implants .dmi
|
||||
icon_state = "eyes_nvcyber"
|
||||
desc = "A pair of eyes with built-in nightvision optics, with the additional bonus of being rad as hell."
|
||||
eye_color = "#0ffc03"
|
||||
eye_color_left = "#0ffc03"
|
||||
eye_color_right = "#ff2700"
|
||||
status = ORGAN_ROBOTIC
|
||||
organ_flags = ORGAN_SYNTHETIC
|
||||
|
||||
+1
-1
@@ -2552,6 +2552,7 @@
|
||||
#include "code\modules\client\preferences\ghost.dm"
|
||||
#include "code\modules\client\preferences\ghost_lighting.dm"
|
||||
#include "code\modules\client\preferences\glasses.dm"
|
||||
#include "code\modules\client\preferences\heterochromatic.dm"
|
||||
#include "code\modules\client\preferences\hotkeys.dm"
|
||||
#include "code\modules\client\preferences\item_outlines.dm"
|
||||
#include "code\modules\client\preferences\jobless_role.dm"
|
||||
@@ -5063,7 +5064,6 @@
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\genitals.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\hair.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\head_accessory.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\heterochromia.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\horns.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\ipc.dm"
|
||||
#include "modular_skyrat\modules\customization\modules\mob\dead\new_player\sprite_accessories\moth_antennae.dm"
|
||||
|
||||
+5
@@ -75,3 +75,8 @@ export const feature_vampire_status: Feature<string> = {
|
||||
name: "Vampire status",
|
||||
component: FeatureDropdownInput,
|
||||
};
|
||||
|
||||
export const heterochromatic: Feature<string> = {
|
||||
name: "Heterochromatic (Right Eye) color",
|
||||
component: FeatureColorInput,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user