mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
wip explosions modifications
Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -28,22 +28,51 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
E.set_up(epicenter)
|
||||
E.start()
|
||||
|
||||
var/list/dTurfs = list() //Holds the turfs in devestation range.
|
||||
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
|
||||
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
|
||||
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
|
||||
var/list/dTurfs = list() //Holds the turfs in devestation range.
|
||||
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
|
||||
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
|
||||
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
|
||||
|
||||
//cael - replaced range() and circlerange() with FloodFill() to prevent explosions getting through shielding (ultrarealism mode)
|
||||
//if testing indicates this is adding too much lag, roll back all shield handling
|
||||
if(roundExplosions)
|
||||
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerange(epicenter,devastation_range)
|
||||
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = ExplosionCircleFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = ExplosionCircleFloodFill(epicenter,devastation_range)
|
||||
hTurfs = ExplosionCircleFloodFill(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = ExplosionCircleFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerange(epicenter,devastation_range)
|
||||
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, light_impact_range))
|
||||
E.Stress(1)
|
||||
else
|
||||
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = ExplosionFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = ExplosionFloodFill(epicenter,devastation_range)
|
||||
hTurfs = ExplosionFloodFill(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = ExplosionFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, light_impact_range))
|
||||
E.Stress(1)
|
||||
|
||||
for(var/turf/T in dTurfs) //Loop through the turfs in devestation range.
|
||||
spawn() //Try to pop each turf into it's own thread, speed things along.
|
||||
|
||||
Reference in New Issue
Block a user