mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 10:12:17 +00:00
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well. r4146 compile time: 1 minute, 40 seconds r4147 compile time: 45 seconds [VGTG] git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
36 lines
1009 B
Plaintext
36 lines
1009 B
Plaintext
proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
|
if(!epicenter) return
|
|
|
|
if(!istype(epicenter, /turf))
|
|
epicenter = get_turf(epicenter.loc)
|
|
|
|
if(log)
|
|
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
|
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
|
|
|
if(heavy_range > 1)
|
|
var/obj/effect/overlay/pulse = new/obj/effect/overlay ( epicenter )
|
|
pulse.icon = 'icons/effects/effects.dmi'
|
|
pulse.icon_state = "emppulse"
|
|
pulse.name = "emp pulse"
|
|
pulse.anchored = 1
|
|
spawn(20)
|
|
del(pulse)
|
|
|
|
if(heavy_range > light_range)
|
|
light_range = heavy_range
|
|
|
|
for(var/atom/T in range(light_range, epicenter))
|
|
var/distance = get_dist(epicenter, T)
|
|
if(distance < 0)
|
|
distance = 0
|
|
if(distance < heavy_range)
|
|
T.emp_act(1)
|
|
else if(distance == heavy_range)
|
|
if(prob(50))
|
|
T.emp_act(1)
|
|
else
|
|
T.emp_act(2)
|
|
else if(distance <= light_range)
|
|
T.emp_act(2)
|
|
return 1 |