From 2b2e27d38003ee67a099bf9f4599e36c3e886f8d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 6 Sep 2015 10:09:03 +0930 Subject: [PATCH] Species flash cleanup. --- code/game/machinery/flasher.dm | 8 +------- code/game/objects/items/devices/flash.dm | 26 +++++++++++------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 924a6f7374..e6fb41193c 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -67,17 +67,11 @@ if (get_dist(src, O) > src.range) continue + var/flash_time = strength if (istype(O, /mob/living/carbon/human)) var/mob/living/carbon/human/H = O if(!H.eyecheck() <= 0) continue - - if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N - continue - - var/flash_time = strength - if (istype(O, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = O flash_time *= H.species.flash_mod var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] if(!E) diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index fa6d676ce0..cfbe33e5fd 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -64,20 +64,18 @@ var/flashfail = 0 if(iscarbon(M)) - var/safety = M:eyecheck() - if(safety <= 0) - - var/flash_strength = 10 - if(ishuman(M) && ishuman(user) && M.stat!=DEAD) - var/mob/living/carbon/human/H = M - flash_strength *= H.species.flash_mod - - if(flash_strength > 0) - M.Weaken(flash_strength) - flick("e_flash", M.flash) - - else - flashfail = 1 + if(M.stat!=DEAD) + var/safety = M:eyecheck() + if(safety <= 0) + var/flash_strength = 10 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + flash_strength *= H.species.flash_mod + if(flash_strength > 0) + M.Weaken(flash_strength) + flick("e_flash", M.flash) + else + flashfail = 1 else if(issilicon(M)) M.Weaken(rand(5,10))