mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Merge pull request #15217 from neersighted/flashy
Fix flashlights flashing
This commit is contained in:
@@ -67,20 +67,18 @@
|
||||
else
|
||||
M.visible_message("[M] directs [src] to \his eyes.", \
|
||||
"<span class='notice'>You wave the light in front of your eyes.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
|
||||
M << "<span class='danger'>[user] directs [src] to your eyes.</span>"
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
user << "<span class='warning'>[M] pupils don't react to the light!</span>"
|
||||
else if(M.dna.check_mutation(XRAY)) //mob has X-RAY vision
|
||||
user << "<span class='danger'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(M.flash_eyes(visual = 1))
|
||||
user << "<span class='notice'>[M]'s pupils narrow.</span>"
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
|
||||
var/mob/living/carbon/C = M
|
||||
if(istype(C))
|
||||
if(C.stat == DEAD || (C.disabilities & BLIND)) //mob is dead or fully blind
|
||||
user << "<span class='warning'>[C] pupils don't react to the light!</span>"
|
||||
else if(C.dna.check_mutation(XRAY)) //mob has X-RAY vision
|
||||
user << "<span class='danger'>[C] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(C.flash_eyes(visual = 1))
|
||||
user << "<span class='notice'>[C]'s pupils narrow.</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -170,8 +170,9 @@
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
. = ..()
|
||||
var/damage = intensity - check_eye_prot()
|
||||
if(..()) // we've been flashed
|
||||
if(.) // we've been flashed
|
||||
if(visual)
|
||||
return
|
||||
if(weakeyes)
|
||||
|
||||
Reference in New Issue
Block a user