From 4801bf8ade8a68f7e11aa4abefa5073854dca9a2 Mon Sep 17 00:00:00 2001 From: DetectiveEnotsky <87281888+DetectiveEnotsky@users.noreply.github.com> Date: Sun, 10 May 2026 12:07:00 +0400 Subject: [PATCH] Mask eye shine with glasses, eyepatches and whatever (#31940) * masks eye shine with glasses * fixes indentation yaaay * definitely fixes indentation now trust * Update code/modules/mob/living/carbon/human/human_mob.dm no more funny comments Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: DetectiveEnotsky <87281888+DetectiveEnotsky@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human_mob.dm Useless code begone Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: DetectiveEnotsky <87281888+DetectiveEnotsky@users.noreply.github.com> --------- Signed-off-by: DetectiveEnotsky <87281888+DetectiveEnotsky@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_mob.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 4f15a1caffb..f8c07d3389b 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -1663,6 +1663,13 @@ return var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] var/icon/hair = new /icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") + var/obj/item/clothing/glasses/glasses = get_item_by_slot(ITEM_SLOT_EYES) + if(glasses) + var/datum/robolimb/robohead = head_organ.is_robotic() ? GLOB.all_robolimbs[head_organ.model] : null + var/worn_icon = glasses.worn_icon || (robohead && robohead.is_monitor ? glasses.icon_monitor : FALSE) || listgetindex(glasses.sprite_sheets, head_organ.dna.species.sprite_sheet_name) || 'icons/mob/clothing/eyes.dmi' + var/worn_icon_state = glasses.worn_icon_state || glasses.icon_state + var/icon/glasses_icon = new /icon("icon" = worn_icon, "icon_state" = worn_icon_state) + hair.Blend(glasses_icon, ICON_UNDERLAY) var/mutable_appearance/MA = mutable_appearance(get_icon_difference(get_eyecon(), hair), layer = ABOVE_LIGHTING_LAYER) MA.plane = ABOVE_LIGHTING_PLANE return MA //Cut the hair's pixels from the eyes icon so eyes covered by bangs stay hidden even while on a higher layer. @@ -1672,8 +1679,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X /mob/living/carbon/human/proc/eyes_shine() var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes) - if(!get_location_accessible(src, "eyes")) - return FALSE // Natural eyeshine, any implants, and XRAY - all give shiny appearance. if((istype(eyes) && eyes.shine()) || istype(eye_implant) || HAS_TRAIT(src, TRAIT_XRAY_VISION)) return TRUE