Species flash cleanup.

This commit is contained in:
Zuhayr
2015-09-06 10:09:03 +09:30
parent 6dc3b22432
commit 2b2e27d380
2 changed files with 13 additions and 21 deletions

View File

@@ -67,17 +67,11 @@
if (get_dist(src, O) > src.range) if (get_dist(src, O) > src.range)
continue continue
var/flash_time = strength
if (istype(O, /mob/living/carbon/human)) if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O var/mob/living/carbon/human/H = O
if(!H.eyecheck() <= 0) if(!H.eyecheck() <= 0)
continue 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 flash_time *= H.species.flash_mod
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E) if(!E)

View File

@@ -64,20 +64,18 @@
var/flashfail = 0 var/flashfail = 0
if(iscarbon(M)) if(iscarbon(M))
var/safety = M:eyecheck() if(M.stat!=DEAD)
if(safety <= 0) var/safety = M:eyecheck()
if(safety <= 0)
var/flash_strength = 10 var/flash_strength = 10
if(ishuman(M) && ishuman(user) && M.stat!=DEAD) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
flash_strength *= H.species.flash_mod flash_strength *= H.species.flash_mod
if(flash_strength > 0)
if(flash_strength > 0) M.Weaken(flash_strength)
M.Weaken(flash_strength) flick("e_flash", M.flash)
flick("e_flash", M.flash) else
flashfail = 1
else
flashfail = 1
else if(issilicon(M)) else if(issilicon(M))
M.Weaken(rand(5,10)) M.Weaken(rand(5,10))