Skip to content

Commit

Permalink
Makes flash hyper vulnerability based on negative flash resistance mo…
Browse files Browse the repository at this point in the history
…difier, removes snowflake trait. (tgstation#69530)
  • Loading branch information
itseasytosee authored Sep 17, 2022
1 parent 9899c5e commit 48250f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
#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_HYPER_SENSITIVE -2
#define FLASH_PROTECTION_SENSITIVE -1
#define FLASH_PROTECTION_NONE 0
#define FLASH_PROTECTION_FLASH 1
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOFLASH "noflash"
/// prevents xeno huggies implanting skeletons
#define TRAIT_XENO_IMMUNE "xeno_immune"
/// Makes you flashable from any direction
#define TRAIT_FLASH_SENSITIVE "flash_sensitive"
#define TRAIT_NAIVE "naive"
#define TRAIT_PRIMITIVE "primitive"
#define TRAIT_GUNFLIP "gunflip"
Expand Down
7 changes: 5 additions & 2 deletions code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define CONFUSION_STACK_MAX_MULTIPLIER 2


/// No deviation at all. Flashed from the front or front-left/front-right. Alternatively, flashed in direct view.
#define DEVIATION_NONE 0
/// Partial deviation. Flashed from the side. Alternatively, flashed out the corner of your eyes.
Expand Down Expand Up @@ -200,8 +201,10 @@
if(victim.flags_1 & IS_SPINNING_1)
return DEVIATION_NONE

if(HAS_TRAIT(victim, TRAIT_FLASH_SENSITIVE)) //If your eyes are sensitive and can be flashed from any direction.
return DEVIATION_NONE
if(iscarbon(victim))
var/mob/living/carbon/carbon_victim = victim
if(carbon_victim.get_eye_protection() < FLASH_PROTECTION_SENSITIVE) // If we have really bad flash sensitivity, usually due to really sensitive eyes, we get flashed from all directions
return DEVIATION_NONE

// Are they on the same tile? We'll return partial deviation. This may be someone flashing while lying down
// or flashing someone they're stood on the same turf as, or a borg flashing someone buckled to them.
Expand Down
15 changes: 2 additions & 13 deletions code/modules/surgery/organs/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -517,19 +517,12 @@
desc = "These eyes seem to stare back no matter the direction you look at it from."
eye_icon_state = "flyeyes"
icon_state = "eyeballs-fly"

/obj/item/organ/internal/eyes/fly/Insert(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
ADD_TRAIT(eye_owner, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)

/obj/item/organ/internal/eyes/fly/Remove(mob/living/carbon/eye_owner, special = FALSE)
REMOVE_TRAIT(eye_owner, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)
return ..()
flash_protect = FLASH_PROTECTION_HYPER_SENSITIVE

/obj/item/organ/internal/eyes/night_vision/maintenance_adapted
name = "adapted eyes"
desc = "These red eyes look like two foggy marbles. They give off a particularly worrying glow in the dark."
flash_protect = FLASH_PROTECTION_SENSITIVE
flash_protect = FLASH_PROTECTION_HYPER_SENSITIVE
eye_color_left = "f00"
eye_color_right = "f00"
icon_state = "adapted_eyes"
Expand All @@ -545,8 +538,6 @@
adapt_light.on = TRUE
adapt_light.forceMove(adapted)
adapt_light.update_brightness(adapted)
//traits
ADD_TRAIT(adapted, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)
ADD_TRAIT(adapted, TRAIT_UNNATURAL_RED_GLOWY_EYES, ORGAN_TRAIT)

/obj/item/organ/internal/eyes/night_vision/maintenance_adapted/on_life(delta_time, times_fired)
Expand All @@ -565,7 +556,5 @@
adapt_light.on = FALSE
adapt_light.update_brightness(unadapted)
adapt_light.forceMove(src)
//traits
REMOVE_TRAIT(unadapted, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)
REMOVE_TRAIT(unadapted, TRAIT_UNNATURAL_RED_GLOWY_EYES, ORGAN_TRAIT)
return ..()

0 comments on commit 48250f6

Please sign in to comment.