Files
Bubberstation/code/game/objects/empulse.dm
T
Aliceee2ch 8ee1cd2474 Makes EMP logs less bad (#93841)
## About The Pull Request

closes #93805

## Why It's Good For The Game

we actually have almost no emp logging at all lol, not even emp chem
reaction, so you barely can track potential griefer?

## Changelog

🆑
admin: EMP logs are improved, additionally chemical EMP reactions are
now logged.
/🆑
2025-11-09 14:46:10 +01:00

33 lines
922 B
Plaintext

/proc/empulse(turf/epicenter, heavy_range, light_range, emp_source)
if(!epicenter)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
if(emp_source)
message_admins("EMP with size ([heavy_range], [light_range]) in [ADMIN_VERBOSEJMP(epicenter)], caused by [emp_source] ")
log_game("EMP with size ([heavy_range], [light_range]) in [ADMIN_VERBOSEJMP(epicenter)], caused by [emp_source] ")
if(heavy_range > 1)
new /obj/effect/temp_visual/emp/pulse(epicenter)
if(heavy_range > light_range)
light_range = heavy_range
for(var/A in spiral_range(light_range, epicenter))
var/atom/T = A
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0
if(distance < heavy_range)
T.emp_act(EMP_HEAVY)
else if(distance == heavy_range)
if(prob(50))
T.emp_act(EMP_HEAVY)
else
T.emp_act(EMP_LIGHT)
else if(distance <= light_range)
T.emp_act(EMP_LIGHT)
return 1