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

eyecheck fix #4212

Merged
merged 2 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
#define UNIFORM_HAS_SENSORS 1
#define UNIFORM_FORCED_SENSORS 2

#define EYE_PROTECTION_NEGATIVE -1
#define EYE_PROTECTION_NONE 0
#define EYE_PROTECTION_FLAVOR 1
#define EYE_PROTECTION_FLASH 2
Expand Down
19 changes: 12 additions & 7 deletions code/game/objects/items/tools/maintenance_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -380,22 +380,27 @@
if(E.robotic == ORGAN_ROBOT)
return
switch(safety)
if(1)
if(EYE_PROTECTION_FLASH)
to_chat(user, SPAN_DANGER("You see a brigth light on the corner of your vision."))
Diegoflores31 marked this conversation as resolved.
Show resolved Hide resolved
E.take_damage(rand(0, 1), TRUE)
if(E.damage > 10)
E.take_damage(rand(3, 5), TRUE)
if(EYE_PROTECTION_FLAVOR)
to_chat(user, SPAN_DANGER("Your eyes sting a little."))
E.take_damage(rand(1, 2), TRUE)
if(E.damage > 12)
H.AdjustEyeBlur(3,6)
if(0)
if(E.damage > 8) // dont abuse your funny flavor glasses
E.take_damage(2, TRUE)
if(EYE_PROTECTION_NONE)
to_chat(user, SPAN_WARNING("Your eyes burn."))
E.take_damage(rand(2, 4), TRUE)
E.take_damage(rand(3, 4), TRUE)
if(E.damage > 10)
E.take_damage(rand(4, 10), TRUE)
if(-1)
if(EYE_PROTECTION_NEGATIVE)
to_chat(user, SPAN_WARNING("Your thermals intensify [src]'s glow. Your eyes itch and burn severely."))
H.AdjustEyeBlur(12,20)
E.take_damage(rand(12, 16), TRUE)

if(safety < 2)
if(safety < EYE_PROTECTION_WELDING)
if (E.damage >= E.min_broken_damage)
to_chat(H, SPAN_WARNING("You go blind! Maybe welding without protection wasn't such a great idea..."))
return FALSE
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/glasses/night.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
vision_flags = SEE_TURFS
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
fullscreen_vision = null
eye_protection = EYE_PROTECTION_NEGATIVE

/obj/item/clothing/glasses/night/helmet //for the integrated NVGs that are in helmetgarb code
name = "\improper M2 night vision goggles"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/glasses/thermal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
darkness_view = 12
invisa_view = 2
eye_protection = -1
eye_protection = EYE_PROTECTION_NEGATIVE
deactive_state = "goggles_off"
fullscreen_vision = /atom/movable/screen/fullscreen/thermal
var/blinds_on_emp = TRUE
Expand Down
Loading