Closing Eyes (#22957)

* You can now close your eyes. This blinds you, but gives you protection
against flash effects.
* Welding while blind takes three times as long and has an 80% chance to
fail, with a risk of burning yourself.

<img width="825" height="571" alt="image"
src="https://github.com/user-attachments/assets/14871444-e1c6-4d0f-8f56-d07e56055db0"
/>
<img width="875" height="633" alt="image"
src="https://github.com/user-attachments/assets/134379bb-474c-4c5d-b069-2559d9390305"
/>


AI usage disclosure: The code for this was created in-part using GPT 5.6
Sol.
This commit is contained in:
Geeves
2026-08-13 16:57:18 +00:00
committed by GitHub
parent 3ad4c47ca2
commit 5a410180b5
10 changed files with 119 additions and 8 deletions
+20
View File
@@ -12,6 +12,26 @@
toxin_type = CE_OCULOTOXIC
var/list/eye_colour = list(0,0,0)
var/singular_name = "eye"
/// Whether the owner has voluntarily closed this organ.
var/eyes_closed = FALSE
/obj/item/organ/internal/eyes/verb/toggle_eyes()
set name = "Open/Close Eyes"
set desc = "Close your eyes to block your vision and protect them from bright flashes."
set category = "IC"
set src in usr
if(!owner || usr != owner || owner.incapacitated())
return
eyes_closed = !eyes_closed
if(eyes_closed)
owner.custom_emote(VISIBLE_MESSAGE, "closes their eyes.")
else
owner.custom_emote(VISIBLE_MESSAGE, "opens their eyes.")
owner.update_body()
owner.handle_vision()
/obj/item/organ/internal/eyes/proc/update_colour()
if(!owner)
+12 -4
View File
@@ -60,17 +60,22 @@
is_frenzied = TRUE
if(owner.species.has_organ[owner.species.vision_organ])
var/obj/item/organ/internal/eyes/eyes = owner.get_eyes()
if(eyes && species.eyes && !is_frenzied)
if(eyes && species.eyes && (!is_frenzied || eyes.eyes_closed))
var/eyecolor
if (eyes.eye_colour)
if(eyes.eye_colour && !eyes.eyes_closed)
eyecolor = rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])
var/cache_key = "[species.eyes]_[eyecolor || "nocolor"]"
var/cache_key = "[species.eyes]_[eyes.eyes_closed ? "closed" : (eyecolor || "nocolor")]"
var/icon/eyes_icon = SSicon_cache.human_eye_cache[cache_key]
if (!eyes_icon)
eyes_icon = new/icon(species.eyes_icons, species.eyes)
if(eyecolor)
if(eyes.eyes_closed)
// A translucent black eye mask darkens the skin beneath it, creating eyelids
// which follow both colour-based skin and tone-shaded human complexions.
eyes_icon.Blend(rgb(0, 0, 0), ICON_MULTIPLY)
eyes_icon.ChangeOpacity(0.2)
else if(eyecolor)
eyes_icon.Blend(eyecolor, species.eyes_icon_blend)
else
eyes_icon.Blend(rgb(128,0,0), species.eyes_icon_blend)
@@ -109,6 +114,9 @@
var/list/bonus_overlays = list()
var/obj/item/organ/internal/eyes/eyes = H.get_eyes()
if(eyes?.eyes_closed)
return mob_overlays
if(eyes && BP_IS_ROBOTIC(eyes))
var/datum/robolimb/robolimb_data = GLOB.all_robolimbs[eyes.model]
if(robolimb_data.emissive)