mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes fires burning forever
Fixes fires grinding to a near halt but never actually stopping.
This commit is contained in:
@@ -239,13 +239,18 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
//world << "gas_reaction_progress = [gas_reaction_progress]"
|
||||
|
||||
var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress
|
||||
if(total_reaction_progress <= 0)
|
||||
return 0
|
||||
|
||||
var/used_fuel = min(total_reaction_progress, reaction_limit)
|
||||
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
|
||||
//world << "used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]"
|
||||
|
||||
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
|
||||
if(zone && zone.fuel_objs.len)
|
||||
if(used_fuel <= FIRE_LIQUD_MIN_BURNRATE)
|
||||
return 0
|
||||
else if(used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier) //purely gas fires have more stringent criteria
|
||||
return 0
|
||||
|
||||
|
||||
//*** Remove fuel and oxidizer, add carbon dioxide and heat
|
||||
|
||||
//remove and add gasses as calculated
|
||||
|
||||
@@ -133,6 +133,11 @@
|
||||
#define FIRE_GAS_BURNRATE_MULT 1
|
||||
#define FIRE_LIQUID_BURNRATE_MULT 0.5
|
||||
|
||||
//If the fire is burning slower than this rate then the reaction is going too slow to be self sustaining and the fire burns itself out.
|
||||
//This ensures that fires don't grind to a near-halt while still remaining active forever.
|
||||
#define FIRE_GAS_MIN_BURNRATE 0.1
|
||||
#define FIRE_LIQUD_MIN_BURNRATE 0.05
|
||||
|
||||
//How many moles of fuel are contained within one solid/liquid fuel volume unit
|
||||
#define LIQUIDFUEL_AMOUNT_TO_MOL 1 //mol/volume unit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user