mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
Adds "Eye-Glow" for Humanoids w/ High Darksight or XRAY Vision
This commit is contained in:
@@ -1668,6 +1668,13 @@
|
||||
G.icon_state = "grabbed1"
|
||||
G.synch()
|
||||
|
||||
/mob/living/carbon/human/proc/eyes_glow() /*Used to check if eyes should glow in the dark. Returns the image of the eyes on the layer where they will appear to glow.
|
||||
Eyes need to have significantly high darksight to glow unless the mob has the XRAY vision mutation. Eyes will not glow if they are covered in any way.*/
|
||||
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
var/const/glow_threshold = 6
|
||||
if(istype(eyes) && ((eyes.get_dark_view() > glow_threshold) || (XRAY in mutations)) && get_location_accessible(src, "eyes"))
|
||||
return(image(eyes.generate_icon(), layer = LIGHTING_LAYER + 1)) //Referenced cult constructs for glowing in the dark. Needs to be above lighting effects such as shading.
|
||||
|
||||
/mob/living/carbon/human/proc/gut()
|
||||
set category = "Abilities"
|
||||
set name = "Gut"
|
||||
|
||||
@@ -160,6 +160,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
overlays += (new_overlays - old_overlays)
|
||||
overlays -= (old_overlays - new_overlays)
|
||||
cached_standing_overlays = new_overlays
|
||||
overlays |= eyes_glow() //Only applies eyeglow if the eyes are uncovered and have significantly high darksight or XRAY vision.
|
||||
|
||||
update_transform()
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ var/global/list/limb_icon_cache = list()
|
||||
if(eye_implant) // Eye implants override native DNA eye color
|
||||
eyes_icon.Blend(eye_implant.eye_colour, ICON_ADD)
|
||||
else if(eyes)
|
||||
eyes_icon.Blend(eyes.eye_colour, ICON_ADD)
|
||||
eyes_icon = eyes.generate_icon()
|
||||
else
|
||||
eyes_icon.Blend("#800000", ICON_ADD)
|
||||
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
||||
|
||||
@@ -305,6 +305,13 @@
|
||||
/obj/item/organ/internal/eyes/proc/update_colour()
|
||||
dna.write_eyes_attributes(src)
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/generate_icon(var/mob/living/carbon/human/H)
|
||||
var/mob/living/carbon/human/G = H ? H : owner
|
||||
if(istype(G))
|
||||
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', G.species.eyes)
|
||||
eyes_icon.Blend(eye_colour, ICON_ADD)
|
||||
return(eyes_icon)
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one.
|
||||
if(!robotic && owner.disabilities & COLOURBLIND)
|
||||
return colourblind_matrix
|
||||
|
||||
Reference in New Issue
Block a user