diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 28551cad30f..1cef691f933 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -63,9 +63,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) if(!istype(S)) del src + return if(!S.zone) del src + return var/datum/gas_mixture/air_contents = S.return_air() //get liquid fuels on the ground. @@ -87,6 +89,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) if(!air_contents.check_combustability(liquid)) //del src RemoveFire() + return //get a firelevel and set the icon firelevel = air_contents.calculate_firelevel(liquid) @@ -104,15 +107,16 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) //im not sure how to implement a version that works for every creature so for now monkeys are firesafe for(var/mob/living/carbon/human/M in loc) M.FireBurn(firelevel, air_contents.temperature, air_contents.return_pressure() ) //Burn the humans! + + loc.fire_act(air_contents, air_contents.temperature, air_contents.return_volume()) for(var/atom/A in loc) A.fire_act(air_contents, air_contents.temperature, air_contents.return_volume()) //spread for(var/direction in cardinal) - if(S.open_directions & direction) //Grab all valid bordering tiles + var/turf/simulated/enemy_tile = get_step(S, direction) - var/turf/simulated/enemy_tile = get_step(S, direction) - - if(istype(enemy_tile)) + if(istype(enemy_tile)) + if(S.open_directions & direction) //Grab all valid bordering tiles var/datum/gas_mixture/acs = enemy_tile.return_air() var/obj/effect/decal/cleanable/liquid_fuel/liq = locate() in enemy_tile if(!acs) continue @@ -128,6 +132,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) if( prob( 50 + 50 * (firelevel/vsc.fire_firelevel_multiplier) ) && S.CanPass(null, enemy_tile, 0,0) && enemy_tile.CanPass(null, S, 0,0)) new/obj/fire(enemy_tile,firelevel) + else + enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.return_volume()) + //seperate part of the present gas //this is done to prevent the fire burning all gases in a single pass var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d5aa989cf54..257813b9f53 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -352,6 +352,8 @@ //checks if this window is full-tile one /obj/structure/window/proc/is_fulltile() + if(dir & (dir - 1)) + return 1 return 0 //This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc! diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 9e23dfb597f..39d4a0560f6 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -77,6 +77,21 @@ var/list/wood_icons = list("wood","wood-broken") src.hotspot_expose(500,CELL_VOLUME) return +/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(!burnt && prob(5)) + burn_tile() + else if(prob(1) && !is_plating()) + make_plating() + burn_tile() + return + +/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) + var/dir_to = get_dir(src, adj_turf) + + for(var/obj/structure/window/W in src) + if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile) + W.fire_act(adj_air, adj_temp, adj_volume) + /turf/simulated/floor/blob_act() return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index acd25ec9ea5..339c8042052 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -11,6 +11,8 @@ var/damage_overlay var/global/damage_overlays[8] + var/max_temperature = 1800 //K, walls will take damage if they're next to a fire hotter than this + opacity = 1 density = 1 blocks_air = 1 @@ -97,6 +99,12 @@ return +/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) + if(adj_temp > max_temperature) + take_damage(rand(10, 20) * (adj_temp / max_temperature)) + + return ..() + /turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) if(istype(src,/turf/simulated/wall/r_wall)) if(!devastated) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 59ad8a47be8..e4a0d6d8fcf 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -6,6 +6,7 @@ density = 1 damage_cap = 200 + max_temperature = 6000 walltype = "rwall" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 4a3fbc6abc9..b08cfa82b2d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -137,6 +137,9 @@ return return +/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume) + return + /turf/proc/is_plating() return 0 /turf/proc/is_asteroid_floor()