mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 04:02:33 +00:00
Explosions will delay a bit longer before allowing powernet rebuilds. Removed the Ionstorm Command reports at Urist's request, he said he would add something later. Added dust storms to meteor mode. Fixed most of the runtimes in the latest log. Wizards mind_transfer now needs his robes, this prevents the constant body swap mess. Z 1 lost all of its areas sometime in the last two revs. I think I got everything back in place but would not mind if a mapper took a look. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2037 316c924e-a436-60f5-8080-3fe189b3f50e
83 lines
2.4 KiB
Plaintext
83 lines
2.4 KiB
Plaintext
var/roundExplosions = 1
|
|
|
|
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
|
if(!epicenter) return
|
|
spawn(0)
|
|
defer_powernet_rebuild = 1
|
|
if (!istype(epicenter, /turf))
|
|
epicenter = get_turf(epicenter.loc)
|
|
playsound(epicenter.loc, 'explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
|
|
playsound(epicenter.loc, "explosion", 100, 1, round(devastation_range,1) )
|
|
if (adminlog)
|
|
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
|
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
|
|
|
if(heavy_impact_range > 1)
|
|
var/datum/effects/system/explosion/E = new/datum/effects/system/explosion()
|
|
E.set_up(epicenter)
|
|
E.start()
|
|
|
|
var/list/exTurfs = list()
|
|
|
|
if(roundExplosions)
|
|
for(var/turf/T in circlerange(epicenter,light_impact_range))
|
|
exTurfs += T
|
|
else
|
|
for(var/turf/T in range(light_impact_range, epicenter))
|
|
exTurfs += T
|
|
|
|
for(var/turf/T in exTurfs)
|
|
var/distance = 0
|
|
if(roundExplosions)
|
|
distance = get_dist_euclidian(epicenter, T)
|
|
else
|
|
distance = get_dist(epicenter, T)
|
|
if(distance < 0)
|
|
distance = 0
|
|
if(distance < devastation_range)
|
|
for(var/atom/object in T.contents)
|
|
spawn()
|
|
if(object)
|
|
object.ex_act(1)
|
|
if(prob(5))
|
|
if(T)
|
|
T.ex_act(2)
|
|
else
|
|
if(T)
|
|
T.ex_act(1)
|
|
else if(distance < heavy_impact_range)
|
|
for(var/atom/object in T.contents)
|
|
spawn()
|
|
if(object)
|
|
object.ex_act(2)
|
|
if(T)
|
|
T.ex_act(2)
|
|
else if (distance == heavy_impact_range)
|
|
for(var/atom/object in T.contents)
|
|
if(object)
|
|
object.ex_act(2)
|
|
if(prob(15) && devastation_range > 2 && heavy_impact_range > 2)
|
|
secondaryexplosion(T, 1)
|
|
else
|
|
if(T)
|
|
T.ex_act(2)
|
|
else if(distance <= light_impact_range)
|
|
for(var/atom/object in T.contents)
|
|
spawn()
|
|
if(object)
|
|
object.ex_act(3)
|
|
if(T)
|
|
T.ex_act(3)
|
|
for(var/mob/living/carbon/mob in T)
|
|
flick("flash", mob:flash)
|
|
|
|
sleep(-1)
|
|
sleep(20)
|
|
defer_powernet_rebuild = 0
|
|
return 1
|
|
|
|
|
|
|
|
proc/secondaryexplosion(turf/epicenter, range)
|
|
for(var/turf/tile in range(range, epicenter))
|
|
tile.ex_act(2) |