mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
atmos: make fires more destructive
Fires can now burn through walls, windows, and (with a high enough temperature) rwalls. New proc: adjacent_fire_act(). Called on turfs that a fire isn't able to spread to. (walls, floor surrounded by windows, etc.) Signed-off-by: Mloc-Argent <colmohici@gmail.com> Conflicts: code/game/objects/structures/window.dm
This commit is contained in:
+11
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user