Merge pull request #13513 from timothyteakettle/eye-sprites
adds selectable eye types to customization
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// Facial Hair Definitions //
|
||||
/////////////////////////////
|
||||
/datum/sprite_accessory/facial_hair
|
||||
icon = 'icons/mob/human_face.dmi'
|
||||
icon = 'icons/mob/hair.dmi'
|
||||
gender = MALE // barf (unless you're a dorf, dorfs dig chix w/ beards :P)
|
||||
|
||||
// please make sure they're sorted alphabetically and categorized
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Hair Definitions //
|
||||
//////////////////////
|
||||
/datum/sprite_accessory/hair
|
||||
icon = 'icons/mob/human_face.dmi' // default icon for all hairs
|
||||
icon = 'icons/mob/hair.dmi' // default icon for all hairs
|
||||
|
||||
// please make sure they're sorted alphabetically and, where needed, categorized
|
||||
// try to capitalize the names please~
|
||||
|
||||
@@ -117,6 +117,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
//the ids you can use for your species, if empty, it means default only and not changeable
|
||||
var/list/allowed_limb_ids
|
||||
|
||||
//the type of eyes this species has
|
||||
var/eye_type = "normal"
|
||||
|
||||
///////////
|
||||
// PROCS //
|
||||
///////////
|
||||
@@ -512,7 +515,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER)
|
||||
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
|
||||
if(!(NOBLOOD in species_traits))
|
||||
hair_overlay.icon = 'icons/mob/human_face.dmi'
|
||||
hair_overlay.icon = 'icons/mob/hair.dmi'
|
||||
hair_overlay.icon_state = "debrained"
|
||||
|
||||
else if(H.hair_style && (HAIR in species_traits))
|
||||
@@ -571,7 +574,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(HD && !(HAS_TRAIT(H, TRAIT_HUSK)))
|
||||
// lipstick
|
||||
if(H.lip_style && (LIPS in species_traits))
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/lips.dmi', "lips_[H.lip_style]", -BODY_LAYER)
|
||||
lip_overlay.color = H.lip_color
|
||||
|
||||
if(OFFSET_LIPS in H.dna.species.offset_features)
|
||||
@@ -584,10 +587,17 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(!(NOEYES in species_traits))
|
||||
var/has_eyes = H.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!has_eyes)
|
||||
standing += mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
standing += mutable_appearance('icons/mob/eyes.dmi', "eyes_missing", -BODY_LAYER)
|
||||
else
|
||||
var/mutable_appearance/left_eye = mutable_appearance('icons/mob/human_face.dmi', "left_eye", -BODY_LAYER)
|
||||
var/mutable_appearance/right_eye = mutable_appearance('icons/mob/human_face.dmi', "right_eye", -BODY_LAYER)
|
||||
var/left_state = DEFAULT_LEFT_EYE_STATE
|
||||
var/right_state = DEFAULT_RIGHT_EYE_STATE
|
||||
message_admins("okay so our eye type is [eye_type] and we can index it to know [GLOB.eye_types[eye_type]]")
|
||||
if(eye_type in GLOB.eye_types)
|
||||
message_admins("to know that it's in!")
|
||||
left_state = eye_type + "_left_eye"
|
||||
right_state = eye_type + "_right_eye"
|
||||
var/mutable_appearance/left_eye = mutable_appearance('icons/mob/eyes.dmi', left_state, -BODY_LAYER)
|
||||
var/mutable_appearance/right_eye = mutable_appearance('icons/mob/eyes.dmi', right_state, -BODY_LAYER)
|
||||
if((EYECOLOR in species_traits) && has_eyes)
|
||||
left_eye.color = "#" + H.left_eye_color
|
||||
right_eye.color = "#" + H.right_eye_color
|
||||
|
||||
@@ -21,3 +21,5 @@
|
||||
species_type = "insect"
|
||||
|
||||
allowed_limb_ids = list("insect","apid","moth","moth_not_greyscale")
|
||||
|
||||
eye_type = "insect"
|
||||
|
||||
@@ -748,7 +748,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
|
||||
if(HD && !(HAS_TRAIT(src, TRAIT_HUSK)))
|
||||
// lipstick
|
||||
if(lip_style && (LIPS in dna.species.species_traits))
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]", -BODY_LAYER)
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/lips.dmi', "lips_[lip_style]", -BODY_LAYER)
|
||||
lip_overlay.color = lip_color
|
||||
if(OFFSET_LIPS in dna.species.offset_features)
|
||||
lip_overlay.pixel_x += dna.species.offset_features[OFFSET_LIPS][1]
|
||||
@@ -759,10 +759,17 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
|
||||
if(!(NOEYES in dna.species.species_traits))
|
||||
var/has_eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!has_eyes)
|
||||
add_overlay(mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER))
|
||||
add_overlay(mutable_appearance('icons/mob/eyes.dmi', "eyes_missing", -BODY_LAYER))
|
||||
else
|
||||
var/mutable_appearance/left_eye = mutable_appearance('icons/mob/human_face.dmi', "left_eye", -BODY_LAYER)
|
||||
var/mutable_appearance/right_eye = mutable_appearance('icons/mob/human_face.dmi', "right_eye", -BODY_LAYER)
|
||||
var/left_state = DEFAULT_LEFT_EYE_STATE
|
||||
var/right_state = DEFAULT_RIGHT_EYE_STATE
|
||||
if(dna.species)
|
||||
var/eye_type = dna.species.eye_type
|
||||
if(GLOB.eye_types[eye_type])
|
||||
left_state = eye_type + "_left_eye"
|
||||
right_state = eye_type + "_right_eye"
|
||||
var/mutable_appearance/left_eye = mutable_appearance('icons/mob/eyes.dmi', left_state, -BODY_LAYER)
|
||||
var/mutable_appearance/right_eye = mutable_appearance('icons/mob/eyes.dmi', right_state, -BODY_LAYER)
|
||||
if((EYECOLOR in dna.species.species_traits) && has_eyes)
|
||||
left_eye.color = "#" + left_eye_color
|
||||
right_eye.color = "#" + right_eye_color
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
hair_hidden = 1
|
||||
if(!hair_hidden)
|
||||
if(!getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
|
||||
overlays_standing[HAIR_LAYER] = mutable_appearance('icons/mob/human_face.dmi', "debrained", -HAIR_LAYER)
|
||||
overlays_standing[HAIR_LAYER] = mutable_appearance('icons/mob/human_parts.dmi', "debrained", -HAIR_LAYER)
|
||||
apply_overlay(HAIR_LAYER)
|
||||
|
||||
|
||||
|
||||
@@ -59,12 +59,12 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/proc/give_hair()
|
||||
if(ghost_hair_style != null)
|
||||
ghost_hair = mutable_appearance('icons/mob/human_face.dmi', "hair_[ghost_hair_style]", -HAIR_LAYER)
|
||||
ghost_hair = mutable_appearance('icons/mob/hair.dmi', "hair_[ghost_hair_style]", -HAIR_LAYER)
|
||||
ghost_hair.alpha = 200
|
||||
ghost_hair.color = ghost_hair_color
|
||||
add_overlay(ghost_hair)
|
||||
if(ghost_facial_hair_style != null)
|
||||
ghost_facial_hair = mutable_appearance('icons/mob/human_face.dmi', "facial_[ghost_facial_hair_style]", -HAIR_LAYER)
|
||||
ghost_facial_hair = mutable_appearance('icons/mob/hair.dmi', "facial_[ghost_facial_hair_style]", -HAIR_LAYER)
|
||||
ghost_facial_hair.alpha = 200
|
||||
ghost_facial_hair.color = ghost_facial_hair_color
|
||||
add_overlay(ghost_facial_hair)
|
||||
|
||||
Reference in New Issue
Block a user