mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Species flash cleanup.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user