Skip to content

Commit

Permalink
DangerCon Update:
Browse files Browse the repository at this point in the history
- Fire will now melt through floors when it reaches a certain temperature.

Technical info:
- Floors have a heat capacity of 10000 degrees, once a fire gets hotter than that, it will set the turf's 'to_be_destroyed' variable to 1. It also updates a variable which shows how much fire-induced temperature a turf has had to sustain. Once the fire burns up, it will check if the turf's (loc's) to_be_destroyed variable is not 0, if it is it will calculate the chance for it getting destroyed (foruma in hotspot's del proc) and either replace it with space or not, depending on the probability result.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1405 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
baloh.matevz committed Apr 7, 2011
1 parent dfe2b2b commit 0c87c32
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
23 changes: 21 additions & 2 deletions code/FEA/FEA_fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ obj
else
icon_state = "1"

if(temperature > location.max_fire_temperature_sustained)
location.max_fire_temperature_sustained = temperature

if(temperature > location.heat_capacity)
location.to_be_destroyed = 1
/*if(prob(25))
location.ReplaceWithSpace()
return 0*/

return 1

New()
Expand All @@ -138,10 +147,20 @@ obj
sd_SetLuminosity(3)

Del()
if (!istype(loc, /turf/space))
if (istype(loc, /turf/simulated))
var/turf/simulated/T = loc
loc:active_hotspot = null
src.sd_SetLuminosity(0)
loc = null

var/chance_of_deletion = min(100, T.max_fire_temperature_sustained / T.heat_capacity * 8)

if(T.to_be_destroyed)
if(prob(chance_of_deletion))
T.ReplaceWithSpace()
else
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0

loc = null

..()
3 changes: 2 additions & 1 deletion code/FEA/FEA_turf_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ turf
air.react()

if(active_hotspot)
active_hotspot.process(possible_fire_spreads)
if (!active_hotspot.process(possible_fire_spreads))
return 0

if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
consider_superconductivity(starting = 1)
Expand Down
31 changes: 16 additions & 15 deletions code/defines/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,15 @@
var/thermite = 0
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD

/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000

/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0.001
temperature = TCMB

var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to

/turf/simulated/floor
name = "floor"
icon = 'floors.dmi'
icon_state = "floor"
thermal_conductivity = 0.040
heat_capacity = 225000
heat_capacity = 10000
var/broken = 0
var/burnt = 0

Expand All @@ -77,6 +65,19 @@
..()
name = "floor"

/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000

/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0.001
temperature = TCMB

/turf/simulated/floor/plating
name = "plating"
icon_state = "plating"
Expand Down

0 comments on commit 0c87c32

Please sign in to comment.