Skip to content

Commit

Permalink
eyecheck fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegoflores31 committed Aug 20, 2023
1 parent 56de9b3 commit aaa1e6d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
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."))
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

0 comments on commit aaa1e6d

Please sign in to comment.