Skip to content

Commit

Permalink
Your eyes close when you sleep (or die)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Aug 11, 2024
1 parent e056293 commit 28e8311
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,10 @@ GLOBAL_LIST_EMPTY(fire_appearances)
if(isnull(.))
return

// NON-MODULE CHANGE for eyelids
if(. <= UNCONSCIOUS || new_stat >= UNCONSCIOUS)
update_body()

switch(.) //Previous stat.
if(CONSCIOUS)
if(stat >= UNCONSCIOUS)
Expand Down
13 changes: 11 additions & 2 deletions code/modules/surgery/organs/internal/eyes/_eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,17 @@
var/obj/item/bodypart/head/my_head = parent.get_bodypart(BODY_ZONE_HEAD)
if(my_head)
if(my_head.head_flags & HEAD_EYECOLOR)
eye_right.color = eye_color_right
eye_left.color = eye_color_left
if(IS_ROBOTIC_ORGAN(src) || (parent.appears_alive() && !HAS_TRAIT(parent, TRAIT_KNOCKEDOUT)))
eye_right.color = eye_color_right
eye_left.color = eye_color_left
else
var/list/base_color = rgb2num(my_head.draw_color, COLORSPACE_HSL)
base_color[2] *= 0.85
base_color[3] *= 0.85
var/eyelid_color = rgb(base_color[1], base_color[2], base_color[3], (length(base_color) >= 4 ? base_color[4] : null), COLORSPACE_HSL)
eye_right.color = eyelid_color
eye_left.color = eyelid_color

if(my_head.worn_face_offset)
my_head.worn_face_offset.apply_offset(eye_left)
my_head.worn_face_offset.apply_offset(eye_right)
Expand Down

0 comments on commit 28e8311

Please sign in to comment.