Added Willox’s explosion code. It should make explosions faster than they have been lately.

Moved an unchecked file into unused, please put any unchecked files out of WIP or FEA into unused that way if you see an unchecked file you know it should be checked.  DM loves to uncheck files when you are messing around with folders in the editor.
Moved the old TEG defines into the proper files.
Commented out some old nonfunctioning FEA debug code.
Removed some commented out codechunks from FEA and attempted to clean up a few of the files a bit. 


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3852 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2012-06-18 01:56:24 +00:00
parent b1394e315f
commit b6f8b3fb77
11 changed files with 1632 additions and 1498 deletions

View File

@@ -116,7 +116,7 @@ obj/machinery/portable_atmospherics/canister
valve_open = 1
release_pressure = 1000
/*
obj/machinery/atmospherics
unary
heat_reservoir
@@ -352,6 +352,7 @@ obj/machinery/atmospherics
usr << "[x],[y] is in a pipeline with [parent.members.len] members ([parent.edges.len] edges)! Volume: [parent.air.volume]"
usr << "Pressure: [parent.air.return_pressure()], Temperature: [parent.air.temperature]"
usr << "[parent.air.oxygen], [parent.air.toxins], [parent.air.nitrogen], [parent.air.carbon_dioxide] .. [parent.alert_pressure]"
*/
mob
verb
flag_all_pipe_networks()

View File

@@ -1,315 +1,279 @@
datum
air_group
var/tmp/group_processing = 1 //Processing all tiles as one large tile if 1
datum/air_group
var/group_processing = 1 //Processing all tiles as one large tile if 1
var/tmp/datum/gas_mixture/air = new
var/datum/gas_mixture/air = new
var/tmp/current_cycle = 0 //cycle that oxygen value represents
var/tmp/archived_cycle = 0 //cycle that oxygen_archived value represents
//The use of archived cycle saves processing power by permitting the archiving step of FET
// to be rolled into the updating step
var/current_cycle = 0 //cycle that oxygen value represents
var/archived_cycle = 0 //cycle that oxygen_archived value represents
//The use of archived cycle saves processing power by permitting the archiving step of FET
// to be rolled into the updating step
//optimization vars
var/tmp/next_check = 0 //number of ticks before this group updates
var/tmp/check_delay = 10 //number of ticks between updates, starts fairly high to get boring groups out of the way
//optimization vars
var/next_check = 0 //number of ticks before this group updates
var/check_delay = 10 //number of ticks between updates, starts fairly high to get boring groups out of the way
proc
archive()
proc/members()
//Returns the members of the group
proc/process_group()
members()
//Returns the members of the group
check_regroup()
//If individually processing tiles, checks all member tiles to see if they are close enough
// that the group may resume group processing
//Warning: Do not call, called by air_master.process()
var/list/borders //Tiles that connect this group to other groups/individual tiles
var/list/members //All tiles in this group
process_group()
suspend_group_processing()
update_group_from_tiles()
//Copy group air information to individual tile air
//Used right before turning on group processing
var/list/space_borders
var/length_space_border = 0
update_tiles_from_group()
//Copy group air information to individual tile air
//Used right before turning off group processing
var/list/borders //Tiles that connect this group to other groups/individual tiles
var/list/members //All tiles in this group
proc/suspend_group_processing()
group_processing = 0
update_tiles_from_group()
check_delay=0
next_check=0
var/list/space_borders
var/length_space_border = 0
suspend_group_processing()
group_processing = 0
update_tiles_from_group()
check_delay=0
next_check=0
//Copy group air information to individual tile air
//Used right before turning on group processing
proc/update_group_from_tiles()
var/sample_member = pick(members)
var/datum/gas_mixture/sample_air = sample_member:air
air.copy_from(sample_air)
air.group_multiplier = members.len
return 1
//Copy group air information to individual tile air
//Used right before turning off group processing
proc/update_tiles_from_group()
for(var/member in members)
member:air.copy_from(air)
if (istype(member,/turf/simulated))
var/turf/simulated/turfmem=member
turfmem.reset_delay()
proc/archive()
air.archive()
archived_cycle = air_master.current_cycle
//If individually processing tiles, checks all member tiles to see if they are close enough that the group may resume group processing
//Warning: Do not call, called by air_master.process()
proc/check_regroup()
//Purpose: Checks to see if group processing should be turned back on
//Returns: group_processing
if(group_processing) return 1
var/turf/simulated/sample = pick(members)
for(var/member in members)
if(member:active_hotspot)
return 0
if(member:air.compare(sample.air)) continue
else
return 0
update_group_from_tiles()
var/sample_member = pick(members)
var/datum/gas_mixture/sample_air = sample_member:air
group_processing = 1
return 1
air.copy_from(sample_air)
air.group_multiplier = members.len
//Look into this
turf/process_group()
current_cycle = air_master.current_cycle
if(!group_processing) //Revert to individual processing then end
for(var/turf/simulated/member in members)
member.process_cell()
return
//check if we're skipping this tick
if (next_check > 0)
next_check--
return 1
next_check += check_delay + rand(0,check_delay/2)
check_delay++
update_tiles_from_group()
for(var/member in members)
member:air.copy_from(air)
if (istype(member,/turf/simulated))
var/turf/simulated/turfmem=member
turfmem.reset_delay()
var/turf/simulated/list/border_individual = list()
var/datum/air_group/list/border_group = list()
archive()
air.archive()
archived_cycle = air_master.current_cycle
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
var/turf/simulated/list/self_group_borders = list()
var/turf/simulated/list/self_tile_borders = list()
check_regroup()
//Purpose: Checks to see if group processing should be turned back on
//Returns: group_processing
if(group_processing) return 1
if(archived_cycle < air_master.current_cycle)
archive()
//Archive air data for use in calculations
//But only if another group didn't store it for us
for(var/turf/simulated/border_tile in src.borders)
for(var/direction in cardinal) //Go through all border tiles and get bordering groups and individuals
if(border_tile.group_border&direction)
var/turf/simulated/enemy_tile = get_step(border_tile, direction) //Add found tile to appropriate category
if(istype(enemy_tile) && enemy_tile.parent && enemy_tile.parent.group_processing)
border_group += enemy_tile.parent
enemies += enemy_tile
self_group_borders += border_tile
else
border_individual += enemy_tile
self_tile_borders += border_tile
var/turf/simulated/sample = pick(members)
for(var/member in members)
if(member:active_hotspot)
return 0
if(member:air.compare(sample.air)) continue
var/abort_group = 0
// Process connections to adjacent groups
var/border_index = 1
for(var/datum/air_group/AG in border_group)
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
AG.archive()
if(AG.current_cycle < current_cycle)
//This if statement makes sure two groups only process their individual connections once!
//Without it, each connection would be processed a second time as the second group is evaluated
var/connection_difference = 0
var/turf/simulated/floor/self_border = self_group_borders[border_index]
var/turf/simulated/floor/enemy_border = enemies[border_index]
var/result = air.check_gas_mixture(AG.air)
if(result == 1)
connection_difference = air.share(AG.air)
else if(result == -1)
AG.suspend_group_processing()
connection_difference = air.share(enemy_border.air)
else
return 0
abort_group = 1
break
update_group_from_tiles()
group_processing = 1
if(connection_difference)
if(connection_difference > 0)
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_border))
else
var/turf/enemy_turf = enemy_border
if(!isturf(enemy_turf))
enemy_turf = enemy_border.loc
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_turf,self_border))
return 1
border_index++
turf/process_group()
current_cycle = air_master.current_cycle
if(group_processing) //See if processing this group as a group
//check if we're skipping this tick
if (next_check > 0)
next_check--
return 1
next_check += check_delay + rand(0,check_delay/2)
check_delay++
// Process connections to adjacent tiles
border_index = 1
if(!abort_group)
for(var/atom/enemy_tile in border_individual)
var/connection_difference = 0
var/turf/simulated/floor/self_border = self_tile_borders[border_index]
var/turf/simulated/list/border_individual = list()
var/datum/air_group/list/border_group = list()
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
var/turf/simulated/list/self_group_borders = list()
var/turf/simulated/list/self_tile_borders = list()
if(archived_cycle < air_master.current_cycle)
archive()
//Archive air data for use in calculations
//But only if another group didn't store it for us
for(var/turf/simulated/border_tile in src.borders)
//var/obj/movable/floor/movable_on_me = locate(/obj/movable/floor) in border_tile
for(var/direction in cardinal) //Go through all border tiles and get bordering groups and individuals
if(border_tile.group_border&direction)
var/turf/simulated/enemy_tile = get_step(border_tile, direction) //Add found tile to appropriate category
//var/obj/movable/floor/movable_on_enemy
//if(!movable_on_me)
// movable_on_enemy = locate(/obj/movable/floor) in enemy_tile
/*if(movable_on_enemy) //guaranteed !movable_on_me if this is set
if(movable_on_enemy.parent && movable_on_enemy.parent.group_processing)
border_group += movable_on_enemy.parent
enemies += movable_on_enemy
self_group_borders += border_tile
else
border_individual += movable_on_enemy
self_tile_borders += border_tile
else*/
if(istype(enemy_tile) && enemy_tile.parent && enemy_tile.parent.group_processing)
border_group += enemy_tile.parent
enemies += enemy_tile
self_group_borders += border_tile
else
border_individual += enemy_tile
self_tile_borders += border_tile
var/abort_group = 0
// Process connections to adjacent groups
var/border_index = 1
for(var/datum/air_group/AG in border_group)
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
AG.archive()
if(AG.current_cycle < current_cycle)
//This if statement makes sure two groups only process their individual connections once!
//Without it, each connection would be processed a second time as the second group is evaluated
var/connection_difference = 0
var/turf/simulated/floor/self_border = self_group_borders[border_index]
var/turf/simulated/floor/enemy_border = enemies[border_index]
var/result = air.check_gas_mixture(AG.air)
if(result == 1)
connection_difference = air.share(AG.air)
else if(result == -1)
AG.suspend_group_processing()
connection_difference = air.share(enemy_border.air)
if(istype(enemy_tile, /turf/simulated))
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
enemy_tile:archive()
if(enemy_tile:current_cycle < current_cycle)
if(air.check_gas_mixture(enemy_tile:air))
connection_difference = air.share(enemy_tile:air)
else
abort_group = 1
break
else if(isturf(enemy_tile))
if(air.check_turf(enemy_tile))
connection_difference = air.mimic(enemy_tile)
else
abort_group = 1
break
if(connection_difference)
if(connection_difference > 0)
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_border))
else
var/turf/enemy_turf = enemy_border
if(!isturf(enemy_turf))
enemy_turf = enemy_border.loc
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_turf,self_border))
if(connection_difference)
if(connection_difference > 0)
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_tile))
else
var/turf/enemy_turf = enemy_tile
if(!isturf(enemy_turf))
enemy_turf = enemy_tile.loc
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_tile,enemy_turf))
border_index++
// Process connections to space
border_index = 1
if(!abort_group)
if(length_space_border > 0)
var/turf/space/sample = locate()
var/connection_difference = 0
// Process connections to adjacent tiles
border_index = 1
if(!abort_group)
for(var/atom/enemy_tile in border_individual)
var/connection_difference = 0
var/turf/simulated/floor/self_border = self_tile_borders[border_index]
if(istype(enemy_tile, /turf/simulated))
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
enemy_tile:archive()
if(enemy_tile:current_cycle < current_cycle)
if(air.check_gas_mixture(enemy_tile:air))
connection_difference = air.share(enemy_tile:air)
else
abort_group = 1
break
else if(isturf(enemy_tile))
if(air.check_turf(enemy_tile))
connection_difference = air.mimic(enemy_tile)
else
abort_group = 1
break
if(connection_difference)
if(connection_difference > 0)
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_tile))
else
var/turf/enemy_turf = enemy_tile
if(!isturf(enemy_turf))
enemy_turf = enemy_tile.loc
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_tile,enemy_turf))
// Process connections to space
border_index = 1
if(!abort_group)
if(length_space_border > 0)
var/turf/space/sample = locate()
var/connection_difference = 0
if(air.check_turf(sample))
connection_difference = air.mimic(sample, length_space_border)
else
abort_group = 1
if(connection_difference)
for(var/turf/simulated/self_border in space_borders)
self_border.consider_pressure_difference_space(connection_difference)
if(abort_group)
suspend_group_processing()
if(air.check_turf(sample))
connection_difference = air.mimic(sample, length_space_border)
else
if(air.check_tile_graphic())
for(var/turf/simulated/member in members)
member.update_visuals(air)
abort_group = 1
if(connection_difference)
for(var/turf/simulated/self_border in space_borders)
self_border.consider_pressure_difference_space(connection_difference)
if(!group_processing) //Revert to individual processing
if(abort_group)
suspend_group_processing()
else
if(air.check_tile_graphic())
for(var/turf/simulated/member in members)
member.process_cell()
else
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/turf/simulated/member in members)
member.hotspot_expose(air.temperature, CELL_VOLUME)
member.consider_superconductivity(starting=1)
member.update_visuals(air)
air.react()
object/process_group()
current_cycle = air_master.current_cycle
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/turf/simulated/member in members)
member.hotspot_expose(air.temperature, CELL_VOLUME)
member.consider_superconductivity(starting=1)
if(group_processing) //See if processing this group as a group
air.react()
return
var/turf/simulated/list/border_individual = list()
var/datum/air_group/list/border_group = list()
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
var/enemy_index = 1
if(archived_cycle < air_master.current_cycle)
archive()
//Archive air data for use in calculations
//But only if another group didn't store it for us
/*
for(var/obj/movable/floor/border_tile in src.borders)
for(var/direction in list(NORTH,SOUTH,EAST,WEST)) //Go through all border tiles and get bordering groups and individuals
if(border_tile.group_border&direction)
var/turf/simulated/enemy_tile = get_step(border_tile, direction) //Add found tile to appropriate category
var/obj/movable/floor/movable_on_enemy = locate(/obj/movable/floor) in enemy_tile
if(movable_on_enemy)
if(movable_on_enemy.parent && movable_on_enemy.parent.group_processing)
border_group += movable_on_enemy.parent
enemies += movable_on_enemy
enemy_index++
else
border_individual += movable_on_enemy
object/process_group()
current_cycle = air_master.current_cycle
else
if(istype(enemy_tile) && enemy_tile.parent && enemy_tile.parent.group_processing)
border_group += enemy_tile.parent
enemies += enemy_tile
enemy_index++
else
border_individual += enemy_tile
*/
enemy_index = 1
var/abort_group = 0
for(var/datum/air_group/AG in border_group)
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
AG.archive()
if(AG.current_cycle < current_cycle)
//This if statement makes sure two groups only process their individual connections once!
//Without it, each connection would be processed a second time as the second group is evaluated
if(!group_processing) return //See if processing this group as a group
var/result = air.check_gas_mixture(AG.air)
if(result == 1)
air.share(AG.air)
else if(result == -1)
AG.suspend_group_processing()
var/turf/simulated/floor/enemy_border = enemies[enemy_index]
air.share(enemy_border.air)
var/turf/simulated/list/border_individual = list()
var/datum/air_group/list/border_group = list()
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
var/enemy_index = 1
if(archived_cycle < air_master.current_cycle)
archive()
//Archive air data for use in calculations
//But only if another group didn't store it for us
enemy_index = 1
var/abort_group = 0
for(var/datum/air_group/AG in border_group)
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
AG.archive()
if(AG.current_cycle < current_cycle)
//This if statement makes sure two groups only process their individual connections once!
//Without it, each connection would be processed a second time as the second group is evaluated
var/result = air.check_gas_mixture(AG.air)
if(result == 1)
air.share(AG.air)
else if(result == -1)
AG.suspend_group_processing()
var/turf/simulated/floor/enemy_border = enemies[enemy_index]
air.share(enemy_border.air)
else
abort_group = 0
break
enemy_index++
if(!abort_group)
for(var/enemy_tile in border_individual)
if(istype(enemy_tile, /turf/simulated))
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
enemy_tile:archive()
if(enemy_tile:current_cycle < current_cycle)
if(air.check_gas_mixture(enemy_tile:air))
air.share(enemy_tile:air)
else
abort_group = 0
abort_group = 1
break
enemy_index++
else
if(air.check_turf(enemy_tile))
air.mimic(enemy_tile)
else
abort_group = 1
break
if(!abort_group)
for(var/enemy_tile in border_individual)
if(istype(enemy_tile, /turf/simulated))
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
enemy_tile:archive()
if(enemy_tile:current_cycle < current_cycle)
if(air.check_gas_mixture(enemy_tile:air))
air.share(enemy_tile:air)
else
abort_group = 1
break
else
if(air.check_turf(enemy_tile))
air.mimic(enemy_tile)
else
abort_group = 1
break
if(abort_group)
suspend_group_processing()
if(abort_group)
suspend_group_processing()
return

View File

@@ -1,175 +1,163 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
atom
proc
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null
turf
proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
simulated
hotspot_expose(exposed_temperature, exposed_volume, soh)
var/datum/gas_mixture/air_contents = return_air()
if(!air_contents)
return 0
if(active_hotspot)
if(soh)
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
return 1
var/igniting = 0
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && air_contents.toxins > 0.5)
igniting = 1
if(igniting)
if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5)
return 0
if(parent&&parent.group_processing)
parent.suspend_group_processing()
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
var/datum/gas_mixture/air_contents = return_air()
if(!air_contents)
return 0
if(active_hotspot)
if(soh)
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
return 1
active_hotspot = new(src)
active_hotspot.temperature = exposed_temperature
active_hotspot.volume = exposed_volume
var/igniting = 0
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
//remove just_spawned protection if no longer processing this cell
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && air_contents.toxins > 0.5)
igniting = 1
//start processing quickly if we aren't already
reset_delay()
if(igniting)
if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5)
return 0
return igniting
if(parent&&parent.group_processing)
parent.suspend_group_processing()
obj
effect/hotspot
//Icon for fire on turfs, also helps for nurturing small fires until they are full tile
active_hotspot = new(src)
active_hotspot.temperature = exposed_temperature
active_hotspot.volume = exposed_volume
anchored = 1
mouse_opacity = 0
unacidable = 1//So you can't melt fire with acid.
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
//remove just_spawned protection if no longer processing this cell
//luminosity = 3
//start processing quickly if we aren't already
reset_delay()
icon = 'fire.dmi'
icon_state = "1"
return igniting
layer = TURF_LAYER
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
anchored = 1
mouse_opacity = 0
unacidable = 1//So you can't melt fire with acid.
icon = 'fire.dmi'
icon_state = "1"
layer = TURF_LAYER
var/just_spawned = 1
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
var/just_spawned = 1
var/bypassing = 0
var/bypassing = 0
proc/perform_exposure()
var/turf/simulated/floor/location = loc
if(!istype(location))
return 0
proc/perform_exposure()
var/turf/simulated/floor/location = loc
if(!istype(location)) return 0
if(volume > CELL_VOLUME*0.95)
bypassing = 1
else bypassing = 0
if(volume > CELL_VOLUME*0.95) bypassing = 1
else bypassing = 0
if(bypassing)
if(!just_spawned)
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
temperature = location.air.temperature
if(bypassing)
if(!just_spawned)
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
temperature = location.air.temperature
else
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
affected.temperature = temperature
affected.react()
temperature = affected.temperature
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
location.assume_air(affected)
for(var/atom/item in loc)
item.temperature_expose(null, temperature, volume)
return 0
process(turf/simulated/list/possible_spread)
if(just_spawned)
just_spawned = 0
return 0
var/turf/simulated/floor/location = loc
if(!istype(location))
del(src)
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
del(src)
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
del(src)
perform_exposure()
if(location.wet) location.wet = 0
if(bypassing)
icon_state = "3"
location.burn_tile()
//Possible spread due to radiated heat
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
for(var/turf/simulated/possible_target in possible_spread)
if(!possible_target.active_hotspot)
possible_target.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
icon_state = "2"
else
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
icon_state = "1"
affected.temperature = temperature
if(temperature > location.max_fire_temperature_sustained)
location.max_fire_temperature_sustained = temperature
affected.react()
temperature = affected.temperature
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
location.assume_air(affected)
for(var/atom/item in loc)
item.temperature_expose(null, temperature, volume)
process(turf/simulated/list/possible_spread)
if(just_spawned)
just_spawned = 0
return 0
var/turf/simulated/floor/location = loc
if(!istype(location))
del(src)
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
del(src)
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
del(src)
if(temperature > location.heat_capacity)
location.to_be_destroyed = 1
/*if(prob(25))
location.ReplaceWithSpace()
return 0*/
return 1
perform_exposure()
New()
..()
dir = pick(cardinal)
sd_SetLuminosity(3)
return
if(location.wet) location.wet = 0
if(bypassing)
icon_state = "3"
location.burn_tile()
Del()
if (istype(loc, /turf/simulated))
var/turf/simulated/T = loc
loc:active_hotspot = null
src.sd_SetLuminosity(0)
//Possible spread due to radiated heat
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
for(var/turf/simulated/possible_target in possible_spread)
if(!possible_target.active_hotspot)
possible_target.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
icon_state = "2"
if(T.to_be_destroyed)
var/chance_of_deletion
if (T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
else
icon_state = "1"
chance_of_deletion = 100
if(prob(chance_of_deletion))
T.ReplaceWithSpace()
else
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0
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()
..()
dir = pick(cardinal)
sd_SetLuminosity(3)
Del()
if (istype(loc, /turf/simulated))
var/turf/simulated/T = loc
loc:active_hotspot = null
src.sd_SetLuminosity(0)
if(T.to_be_destroyed)
var/chance_of_deletion
if (T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
else
chance_of_deletion = 100
if(prob(chance_of_deletion))
T.ReplaceWithSpace()
else
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0
loc = null
..()
loc = null
..()
return

File diff suppressed because it is too large Load Diff