anchor.diff:  				if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
   					temperature = max(((temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB)
   					//Prevents whatever mechanism is causing it to hit negative temperatures.
  -				//world << "post [temperature], [procgases["plasma"][MOLES]], [procgases["co2"][MOLES]]
  +				//world << "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
   			*/
   	fuel_burnt = 0
   	if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
  -		//world << "pre [temperature], [procgases["o2"][MOLES]], [procgases["plasma"][MOLES]]"
  +		//world << "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
   		if(fire())
   			reacting = 1
  -		//world << "post [temperature], [procgases["o2"][MOLES]], [procgases["plasma"][MOLES]]"
  +		//world << "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
   
   	return reacting
   
   /datum/gas_mixture/proc/fire()
   	var/energy_released = 0
   	var/old_heat_capacity = heat_capacity()
  -	var/list/procgases = gases //this speeds things up because accessing datum vars is slow
  -
  -	if(procgases["v_fuel"] && procgases["v_fuel"][MOLES]) //General volatile gas burn
  +	var/list/cached_gases = gases //this speeds things up because accessing datum vars is slow
  +
  + 	//General volatile gas burn
  +	if(cached_gases["v_fuel"] && cached_gases["v_fuel"][MOLES])
   		var/burned_fuel
   
  -		if(!procgases["o2"])
  +		if(!cached_gases["o2"])
   			burned_fuel = 0
  -		else if(procgases["o2"][MOLES] < procgases["v_fuel"][MOLES])
  -			burned_fuel = procgases["o2"][MOLES]
  -			procgases["v_fuel"][MOLES] -= burned_fuel
  -			procgases["o2"][MOLES] = 0
  +		else if(cached_gases["o2"][MOLES] < cached_gases["v_fuel"][MOLES])
  +			burned_fuel = cached_gases["o2"][MOLES]
  +			cached_gases["v_fuel"][MOLES] -= burned_fuel
  +			cached_gases["o2"][MOLES] = 0
   		else
  -			burned_fuel = procgases["v_fuel"][MOLES]
  -			procgases["o2"][MOLES] -= procgases["v_fuel"][MOLES]
  +			burned_fuel = cached_gases["v_fuel"][MOLES]
  +			cached_gases["o2"][MOLES] -= cached_gases["v_fuel"][MOLES]
   
   		if(burned_fuel)
   			energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
   
   			assert_gas("co2")
  -			procgases["co2"][MOLES] += burned_fuel
  +			cached_gases["co2"][MOLES] += burned_fuel
   
   			fuel_burnt += burned_fuel
   
   	//Handle plasma burning
  -	if(procgases["plasma"] && procgases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY)
  +	if(cached_gases["plasma"] && cached_gases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY)
   		var/plasma_burn_rate = 0
   		var/oxygen_burn_rate = 0
   		//more plasma released at higher temperatures
  
positive.code: 
  /datum/gas_mixture/archive()
  	var/list/cached_gases = gases
  	for(var/id in cached_gases)
  		cached_gases[id][ARCHIVE] = cached_gases[id][MOLES]
  	temperature_archived = temperature
  	. = 1
  
  /datum/gas_mixture/merge(datum/gas_mixture/giver)
  	if(!giver)
  		return 0
  
  	if(abs(temperature-giver.temperature)>MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
  		var/self_heat_capacity = heat_capacity()
  		var/giver_heat_capacity = giver.heat_capacity()
  		var/combined_heat_capacity = giver_heat_capacity + self_heat_capacity
  		if(combined_heat_capacity)
  			temperature = (giver.temperature*giver_heat_capacity + temperature*self_heat_capacity)/combined_heat_capacity
  	var/list/cached_gases = gases //accessing datum vars is slower than proc vars
  	var/list/giver_gases = giver.gases
  	for(var/giver_id in giver_gases)
  
negative.code: 			reacting = 1
  	/*
  	if(thermal_energy() > (PLASMA_BINDING_ENERGY*10))
  		if(cached_gases["plasma"] && cached_gases["co2"] && cached_gases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY && cached_gases["co2"][MOLES] > MINIMUM_HEAT_CAPACITY && (cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])/total_moles() >= FUSION_PURITY_THRESHOLD)//Fusion wont occur if the level of impurities is too high.
  			//world << "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
  			var/old_heat_capacity = heat_capacity()
  			var/carbon_efficency = min(cached_gases["plasma"][MOLES]/cached_gases["co2"][MOLES],MAX_CARBON_EFFICENCY)
  			var/reaction_energy = thermal_energy()
  			var/moles_impurities = total_moles()-(cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])
  
  			var/plasma_fused = (PLASMA_FUSED_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
  			var/carbon_catalyzed = (CARBON_CATALYST_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
  			var/oxygen_added = carbon_catalyzed
  			var/nitrogen_added = (plasma_fused-oxygen_added)-(thermal_energy()/PLASMA_BINDING_ENERGY)
  
  			reaction_energy = max(reaction_energy+((carbon_efficency*cached_gases["plasma"][MOLES])/((moles_impurities/carbon_efficency)+2)*10)+((plasma_fused/(moles_impurities/carbon_efficency))*PLASMA_BINDING_ENERGY),0)
  
  			assert_gases("o2", "n2")
  
  			cached_gases["plasma"][MOLES] -= plasma_fused
  			cached_gases["co2"][MOLES] -= carbon_catalyzed
  			cached_gases["o2"][MOLES] += oxygen_added
  			cached_gases["n2"][MOLES] += nitrogen_added
  
  			garbage_collect()
  
  