From be7035a6d698f1099d4f46a1a048772411e71312 Mon Sep 17 00:00:00 2001 From: Lohikar Date: Sun, 20 Dec 2020 16:10:57 -0600 Subject: [PATCH] Generalizes eye icon rendering a bit. --- code/modules/mob/holder.dm | 10 +++++----- code/modules/organs/internal/eyes.dm | 3 ++- code/modules/species/station/utility_frame.dm | 7 ++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 9454c903c4b..66bd4f44f57 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -217,11 +217,11 @@ var/list/holder_mob_icon_cache = list() mob_icon.Blend(skin_colour, ICON_ADD) var/icon/hair_icon = icon(icon, "[species_name]_holder_[cache_entry]_hair") hair_icon.Blend(hair_colour, ICON_ADD) - var/icon/eyes_icon = icon(icon, "[species_name]_holder_[cache_entry]_eyes") - eyes_icon.Blend(eye_colour, ICON_ADD) - - // Blend them together. - mob_icon.Blend(eyes_icon, ICON_OVERLAY) + var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[BP_EYES] + if(eyes) + var/icon/eyes_icon = icon(icon, "[species_name]_holder_[cache_entry]_eyes") + eyes_icon.Blend(eye_colour, (eyes.eye_blend || ICON_ADD)) + mob_icon.Blend(eyes_icon, ICON_OVERLAY) mob_icon.Blend(hair_icon, ICON_OVERLAY) // Add to the cache. diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index a31ce2b6d1a..d4f62e54132 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -18,6 +18,7 @@ var/flash_mod var/darksight_range var/darksight_tint + var/eye_blend = ICON_ADD /obj/item/organ/internal/eyes/proc/get_eye_cache_key() last_cached_eye_colour = eye_colour @@ -29,7 +30,7 @@ if(!human_icon_cache[cache_key]) var/icon/eyes_icon = icon(icon = eye_icon, icon_state = "") if(apply_eye_colour) - eyes_icon.Blend(last_cached_eye_colour, ICON_ADD) + eyes_icon.Blend(last_cached_eye_colour, eye_blend) human_icon_cache[cache_key] = eyes_icon return human_icon_cache[cache_key] diff --git a/code/modules/species/station/utility_frame.dm b/code/modules/species/station/utility_frame.dm index b83bd4bd0ef..ec6ae2497ac 100644 --- a/code/modules/species/station/utility_frame.dm +++ b/code/modules/species/station/utility_frame.dm @@ -52,11 +52,16 @@ /datum/species/utility_frame/post_organ_rejuvenate(obj/item/organ/org, mob/living/carbon/human/H) var/obj/item/organ/external/E = org if(istype(E) && !BP_IS_PROSTHETIC(E)) +<<<<<<< HEAD:code/modules/species/station/utility_frame.dm E.robotize("Utility Frame") var/obj/item/organ/external/head/head = H.organs_by_name[BP_HEAD] +======= + E.robotize(SPECIES_FRAME) + var/obj/item/organ/external/head/head = org +>>>>>>> d159fe293a... Merge pull request #1021 from MistakeNot4892/eye-for-an-eye:mods/utility_frames/species.dm if(istype(head)) head.glowing_eyes = TRUE - var/obj/item/organ/internal/eyes/eyes = H.internal_organs_by_name[vision_organ || BP_EYES] + var/obj/item/organ/internal/eyes/eyes = org if(istype(eyes)) eyes.eye_icon = 'icons/mob/human_races/cyberlimbs/utility/eyes.dmi' H.regenerate_icons()