diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index e1f2b65541b..c76e170ee4b 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -267,6 +267,12 @@ #define REAGENTS_METABOLISM 0.4 //How many units of reagent are consumed per tick, by default. #define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust all effects according to how they originally were with the 0.4 metabolism +// Eye protection +#define FLASH_PROTECTION_SENSITIVE -1 +#define FLASH_PROTECTION_NONE 0 +#define FLASH_PROTECTION_FLASH 1 +#define FLASH_PROTECTION_WELDER 2 + // Roundstart trait system #define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart diff --git a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm index 04922a25c8b..19f211014a8 100644 --- a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm +++ b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm @@ -14,7 +14,7 @@ ..() var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES) if (E) - E.flash_protect = 2 //Adjust the user's eyes' flash protection + E.flash_protect = FLASH_PROTECTION_WELDER //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to protect them from bright lights.") else to_chat(user, "We can't adjust our eyes if we don't have any!") @@ -27,12 +27,12 @@ if(E) if(!active) E.sight_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes - E.flash_protect = -1 //Adjust the user's eyes' flash protection + E.flash_protect = FLASH_PROTECTION_SENSITIVE //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to sense prey through walls.") active = TRUE //Defined in code/modules/spells/spell.dm else E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS //Remove sight flags from the user's eyes - E.flash_protect = 2 //Adjust the user's eyes' flash protection + E.flash_protect = FLASH_PROTECTION_WELDER //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to protect them from bright lights.") active = FALSE user.update_sight() @@ -47,6 +47,6 @@ if (active) E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS else - E.flash_protect = 0 + E.flash_protect = FLASH_PROTECTION_NONE user.update_sight() ..() diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm index f392e66b619..ad8ad11a29d 100644 --- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm +++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm @@ -6,7 +6,7 @@ icon_state = "judicial_visor_0" item_state = "sunglasses" resistance_flags = FIRE_PROOF | ACID_PROOF - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH var/active = FALSE //If the visor is online var/recharging = FALSE //If the visor is currently recharging var/obj/effect/proc_holder/judicial_visor/blaster diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index d7844056737..f9cb83d1869 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -455,7 +455,7 @@ name = "zealot's blindfold" icon_state = "blindfold" item_state = "blindfold" - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH /obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot) ..() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 99ae137d199..5d14889318b 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -4,7 +4,8 @@ max_integrity = 200 integrity_failure = 80 var/damaged_clothes = 0 //similar to machine's BROKEN stat and structure's broken var - var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS + ///What level of bright light protection item has. + var/flash_protect = FLASH_PROTECTION_NONE var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect var/up = 0 //but separated to allow items to protect but not impair vision, like space helmets var/visor_flags = 0 //flags that are added/removed when an item is adjusted up/down diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index e331af8ee9a..2d51576abfd 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -74,7 +74,7 @@ icon_state = "nvgmeson" item_state = "nvgmeson" darkness_view = 8 - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE glass_colour_type = /datum/client_colour/glass_colour/green @@ -111,7 +111,7 @@ icon_state = "night" item_state = "glasses" darkness_view = 8 - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE glass_colour_type = /datum/client_colour/glass_colour/green @@ -192,7 +192,7 @@ icon_state = "sun" item_state = "sunglasses" darkness_view = 1 - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH tint = 1 glass_colour_type = /datum/client_colour/glass_colour/gray dog_fashion = /datum/dog_fashion/head @@ -260,7 +260,7 @@ item_state = "welding-g" actions_types = list(/datum/action/item_action/toggle) materials = list(/datum/material/iron = 250) - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 2 visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT flags_cover = GLASSESCOVERSEYES @@ -275,7 +275,7 @@ desc = "Covers the eyes, preventing sight." icon_state = "blindfold" item_state = "blindfold" - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 3 darkness_view = 1 dog_fashion = /datum/dog_fashion/head @@ -328,7 +328,7 @@ item_state = "glasses" vision_flags = SEE_MOBS lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE glass_colour_type = /datum/client_colour/glass_colour/red /obj/item/clothing/glasses/thermal/emp_act(severity) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 8a1ca1cb7f9..b3228a545d6 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -55,7 +55,7 @@ icon_state = "healthhudnight" item_state = "glasses" darkness_view = 8 - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE glass_colour_type = /datum/client_colour/glass_colour/green @@ -64,7 +64,7 @@ desc = "Sunglasses with a medical HUD." icon_state = "sunhudmed" darkness_view = 1 - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH tint = 1 glass_colour_type = /datum/client_colour/glass_colour/blue @@ -81,7 +81,7 @@ icon_state = "diagnostichudnight" item_state = "glasses" darkness_view = 8 - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE glass_colour_type = /datum/client_colour/glass_colour/green @@ -90,7 +90,7 @@ desc = "Sunglasses with a diagnostic HUD." icon_state = "sunhuddiag" item_state = "glasses" - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH tint = 1 /obj/item/clothing/glasses/hud/security @@ -104,7 +104,7 @@ /obj/item/clothing/glasses/hud/security/chameleon name = "chameleon security HUD" desc = "A stolen security HUD integrated with Syndicate chameleon technology. Provides flash protection." - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH // Yes this code is the same as normal chameleon glasses, but we don't // have multiple inheritance, okay? @@ -135,7 +135,7 @@ desc = "Sunglasses with a security HUD." icon_state = "sunhudsec" darkness_view = 1 - flash_protect = 1 + flash_protect = FLASH_PROTECTION_FLASH tint = 1 glass_colour_type = /datum/client_colour/glass_colour/darkred @@ -144,7 +144,7 @@ desc = "An advanced heads-up display that provides ID data and vision in complete darkness." icon_state = "securityhudnight" darkness_view = 8 - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE glass_colour_type = /datum/client_colour/glass_colour/green diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index fb9ce5db6f5..cdea6f1fb2a 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -98,7 +98,7 @@ brightness_on = 3 //Needs a little bit of tradeoff dog_fashion = null actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_welding_screen) - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 2 flags_inv = HIDEEYES | HIDEFACE flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index f08cdce493f..e92dbbbad3a 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -20,7 +20,7 @@ flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH item_state = "welding" materials = list(/datum/material/iron=1750, /datum/material/glass=400) - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 2 armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 60) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 1a563bba846..02c34983311 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -18,7 +18,7 @@ desc = "A gas mask with built-in welding goggles and a face shield. Looks like a skull - clearly designed by a nerd." icon_state = "weldingmask" materials = list(/datum/material/iron=4000, /datum/material/glass=2000) - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 2 armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 55) actions_types = list(/datum/action/item_action/toggle) diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index f1cc446400f..1cbc765a642 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -15,7 +15,7 @@ min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER strip_delay = 50 equip_delay_other = 50 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index b110ccb1351..3643add9219 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -435,7 +435,7 @@ icon_state = "hardsuit0-medical" item_state = "medical_helm" hardsuit_type = "medical" - flash_protect = 0 + flash_protect = FLASH_PROTECTION_NONE armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75) clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | SCAN_REAGENTS | SNUG_FIT diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 554ec45822c..4ffcc6a0536 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -260,7 +260,7 @@ Contains: icon_state = "space" item_state = "space" desc = "A lightweight space helmet with the basic ability to protect the wearer from the vacuum of space during emergencies." - flash_protect = 0 + flash_protect = FLASH_PROTECTION_NONE armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 20, "fire" = 50, "acid" = 65) /obj/item/clothing/head/helmet/space/freedom diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 08fc1638a25..2d1d6be5e44 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -41,7 +41,7 @@ icon_state = "plasmaman-helm" item_state = "plasmaman-helm" strip_delay = 80 - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = 2 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) resistance_flags = FIRE_PROOF diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index c4720f570c9..c7f52514cbf 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -25,7 +25,7 @@ var/eye_color = "" //set to a hex code to override a mob's eye color var/eye_icon_state = "eyes" var/old_eye_color = "fff" - var/flash_protect = 0 + var/flash_protect = FLASH_PROTECTION_NONE var/see_invisible = SEE_INVISIBLE_LIVING var/lighting_alpha var/no_glasses @@ -155,7 +155,7 @@ eye_color = "FC0" sight_flags = SEE_MOBS lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE see_in_dark = 8 /obj/item/organ/eyes/robotic/flashlight @@ -164,7 +164,7 @@ eye_color ="fee5a3" icon = 'icons/obj/lighting.dmi' icon_state = "flashlight_eyes" - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER tint = INFINITY var/obj/item/flashlight/eyelight/eye @@ -192,7 +192,7 @@ /obj/item/organ/eyes/robotic/shield name = "shielded robotic eyes" desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision." - flash_protect = 2 + flash_protect = FLASH_PROTECTION_WELDER /obj/item/organ/eyes/robotic/shield/emp_act(severity) return @@ -379,7 +379,7 @@ /obj/item/organ/eyes/moth name = "moth eyes" desc = "These eyes seem to have increased sensitivity to bright light, with no improvement to low light vision." - flash_protect = -1 + flash_protect = FLASH_PROTECTION_SENSITIVE /obj/item/organ/eyes/snail name = "snail eyes"