Portable flashers will only count sucessful flashes towards burnout probability (#39602)

Might be probability on failure instead if this is too useful, but right now
they're just waste of space and time.
This commit is contained in:
AnturK
2018-08-08 20:40:56 -07:00
committed by Tad Hardesty
parent d0913be382
commit 52af56855a
+5 -1
View File
@@ -100,19 +100,23 @@
if(!bulb.flash_recharge(30)) //Bulb can burn out if it's used too often too fast
power_change()
return
bulb.times_used ++
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("[base_state]_flash", src)
last_flash = world.time
use_power(1000)
var/flashed = FALSE
for (var/mob/living/L in viewers(src, null))
if (get_dist(src, L) > range)
continue
if(L.flash_act(affect_silicon = 1))
L.Knockdown(strength)
flashed = TRUE
if(flashed)
bulb.times_used++
return 1