Skip to content

Commit

Permalink
[MIRROR] Fix Eyeglow Layering (#2962)
Browse files Browse the repository at this point in the history
Co-authored-by: SierraKomodo <[email protected]>
Co-authored-by: Lexanx <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent f0d3e7f commit 2b5695b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
16 changes: 12 additions & 4 deletions code/modules/organs/external/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@
var/graffiti_style

/obj/item/organ/external/head/proc/get_eye_overlay()
if(glowing_eyes && owner)
var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[owner.species.vision_organ ? owner.species.vision_organ : BP_EYES]
if(eyes)
return eyes.get_special_overlay()
if (!glowing_eyes || !owner)
return

var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[owner.species.vision_organ ? owner.species.vision_organ : BP_EYES]
if (!eyes)
return

for (var/obj/item/equipped as anything in owner.get_equipped_items())
if (HAS_FLAGS(equipped.body_parts_covered, EYES))
return

return eyes.get_special_overlay()

/obj/item/organ/external/head/proc/get_eyes()
var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[owner.species.vision_organ ? owner.species.vision_organ : BP_EYES]
Expand Down
18 changes: 12 additions & 6 deletions code/modules/organs/external/species/diona.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,19 @@
var/eye_icon_location = 'icons/mob/human_races/species/diona/eyes.dmi'

/obj/item/organ/external/head/diona/get_eye_overlay()
if (!glowing_eyes)
return

for (var/obj/item/equipped as anything in owner.get_equipped_items())
if (HAS_FLAGS(equipped.body_parts_covered, EYES))
return

var/icon/I = get_eyes()
if(glowing_eyes)
var/image/eye_glow = image(I)
eye_glow.AddOverlays(emissive_appearance(eye_icon_location, ""))
eye_glow.layer = FLOAT_LAYER
//eye_glow.plane = EFFECTS_ABOVE_LIGHTING_PLANE
return eye_glow
var/image/eye_glow = image(I)
eye_glow.AddOverlays(emissive_appearance(eye_icon_location, ""))
eye_glow.layer = FLOAT_LAYER
//eye_glow.plane = EFFECTS_ABOVE_LIGHTING_PLANE
return eye_glow

/obj/item/organ/external/head/diona/get_eyes()
return icon(icon = eye_icon_location, icon_state = "")
Expand Down
10 changes: 8 additions & 2 deletions code/modules/organs/external/species/nabber_stance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

/obj/item/organ/external/head/insectoid/nabber/get_eye_overlay()
var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[owner.species.vision_organ ? owner.species.vision_organ : BP_EYES]
if(eyes)
return eyes.get_special_overlay()
if (!eyes)
return

for (var/obj/item/equipped as anything in owner.get_equipped_items())
if (HAS_FLAGS(equipped.body_parts_covered, EYES))
return

return eyes.get_special_overlay()

/obj/item/organ/external/head/insectoid/nabber/refresh_action_button()
. = ..()
Expand Down
5 changes: 1 addition & 4 deletions code/modules/organs/internal/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
if(I)
var/cache_key = "[last_eye_cache_key]-glow"
if(!human_icon_cache[cache_key])
var/image/eye_glow = image(I)
eye_glow.layer = EYE_GLOW_LAYER
eye_glow.plane = EFFECTS_ABOVE_LIGHTING_PLANE
human_icon_cache[cache_key] = eye_glow
human_icon_cache[cache_key] = emissive_appearance(I)
return human_icon_cache[cache_key]

/obj/item/organ/internal/eyes/proc/change_eye_color()
Expand Down

0 comments on commit 2b5695b

Please sign in to comment.