Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Generalizes eye icon rendering a bit. #303

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/modules/mob/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion code/modules/organs/internal/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]

Expand Down
7 changes: 6 additions & 1 deletion code/modules/species/station/utility_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down