Makes flash_protect values use defines (#46588)

* Makes flash_protect values use defines

* ctrl s is hard okay
This commit is contained in:
spookydonut
2019-09-25 17:11:42 -07:00
committed by Rob Bailey
parent 69a0c5b15c
commit bfc4bbf8f2
15 changed files with 39 additions and 32 deletions
+6
View File
@@ -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
@@ -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()
..()
@@ -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
+1 -1
View File
@@ -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)
..()
+2 -1
View File
@@ -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
+6 -6
View File
@@ -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)
+7 -7
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
@@ -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
+1 -1
View File
@@ -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
@@ -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
@@ -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
+5 -5
View File
@@ -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"