Recursive explosion resistance values for walls, space tiles, grilles and airlocks tweaked

Lattices now spawn properly when a floor tile is destroyed by an explosion. Probabilities involved tweaked
This commit is contained in:
RavingManiac
2015-05-03 21:53:02 +10:00
parent d068b57388
commit 97adee16db
5 changed files with 24 additions and 19 deletions
+5 -13
View File
@@ -65,7 +65,7 @@ proc/explosion_rec(turf/epicenter, power)
var/explosion_resistance
/turf/space
explosion_resistance = 10
explosion_resistance = 3
/turf/simulated/floor
explosion_resistance = 1
@@ -83,10 +83,10 @@ proc/explosion_rec(turf/epicenter, power)
explosion_resistance = 1
/turf/simulated/shuttle/wall
explosion_resistance = 5
explosion_resistance = 10
/turf/simulated/wall
explosion_resistance = 5
explosion_resistance = 10
/turf/simulated/wall/r_wall
explosion_resistance = 25
@@ -107,24 +107,16 @@ proc/explosion_rec(turf/epicenter, power)
explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles
for(var/obj/O in src)
if(O.explosion_resistance)
spread_power -= O.explosion_resistance
side_spread_power -= O.explosion_resistance
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power, direction)
T = get_step(src, turn(direction,90))
T.explosion_spread(side_spread_power, turn(direction,90))
T.explosion_spread(spread_power, turn(direction,90))
T = get_step(src, turn(direction,-90))
T.explosion_spread(side_spread_power, turn(direction,90))
/*
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power)
*/
T.explosion_spread(spread_power, turn(direction,90))
/turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions