anchor.diff:  
   	//ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react.
   	//We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 900 (based on testing, equals roughly 5% per SM alert announcement).
  -
  -	var/temp_factor = 100
  -
  -	if(oxygen > 0.8)
  -		// with a perfect gas mix, make the power less based on heat
  -		icon_state = "[base_icon_state]_glow"
  -	else
  -		// in normal mode, base the produced energy around the heat
  -		temp_factor = 60
  -		icon_state = base_icon_state
  -
  -	power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
  -
  -	//We've generated power, now let's transfer it to the collectors for storing/usage
  -	transfer_energy()
  -
  -	var/device_energy = power * REACTION_POWER_MODIFIER
  -
  -	//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
  -	//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
  -	//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
  -	//Since the core is effectively "cold"
  -
  -	//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
  -	//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
  -	removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
  -
  -	removed.temperature = max(0, min(removed.temperature, 2500))
  -
  -	//Calculate how much gas to release
  -	removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
  -
  -	removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
  -
  -	removed.update_values()
  -
  -	env.merge(removed)
  +	var/damage_inc_limit = (power/900)*(explosion_point/1000)*DAMAGE_RATE_LIMIT
  +
  +	if(!istype(L, /turf/space))
  +		env = L.return_air()
  +		removed = env.remove(gasefficency * env.total_moles)	//Remove gas from surrounding area
  +
  +	if(!env || !removed || !removed.total_moles)
  +		damage += max(((power-(1600*POWER_FACTOR)))/10, 0)	//exciting the supermatter in a vacuum means the internal energy is mostly locked inside.
  +	else if (grav_pulling) //If supermatter is detonating, remove all air from the zone
  +		env.remove(env.total_moles)
  +	else
  +		damage_archived = damage
  +
  +		damage = max( damage + min( ( (removed.temperature - 800) / 150 ), damage_inc_limit ) , 0 )
  +		//Ok, 100% oxygen atmosphere = best reaction
  +		//Maxes out at 100% oxygen pressure
  +		oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
  +
  +		var/temp_factor = 100
  +
  +		if(oxygen > 0.8)
  +			// with a perfect gas mix, make the power less based on heat
  +			icon_state = "[base_icon_state]_glow"
  +		else
  +			// in normal mode, base the produced energy around the heat
  +			temp_factor = 60
  +			icon_state = base_icon_state
  +
  +		power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
  +
  +		//We've generated power, now let's transfer it to the collectors for storing/usage
  +		transfer_energy()
  +
  +		var/device_energy = power * REACTION_POWER_MODIFIER
  +
  +		//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
  +		//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
  +		//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
  +		//Since the core is effectively "cold"
  +
  +		//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
  +		//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
  +
  +		var/thermal_power = THERMAL_RELEASE_MODIFIER
  +
  +		//This shouldn't be necessary. If the number of moles is low, then heat_capacity should be tiny.
  +		//if(removed.total_moles < 35) thermal_power += 750   //If you don't add coolant, you are going to have a bad time.
  +
  +		removed.temperature += ((device_energy * thermal_power) / removed.heat_capacity())
  +
  +		removed.temperature = max(0, min(removed.temperature, 10000))
  +
  +		//Calculate how much gas to release
  +		removed.phoron += max(device_energy / PHORON_RELEASE_MODIFIER, 0)
  +
  +		removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
  +
  +		removed.update_values()
  +
  +		env.merge(removed)
   
   	for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on.  Bad on them.
   		if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
   			l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
   
  -	for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
  +	//adjusted range so that a power of 600 (pretty high) results in 8 tiles, roughly the distance from the core to the engine monitoring room.
  +	//at power of 1210 this becomes 9 tiles --> increases very very slowly.
  +	for(var/mob/living/l in range(src, round((power / 0.146484375) ** 0.25)))
   		var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
   		l.apply_effect(rads, IRRADIATE)
   
  -	power -= (power/500)**3
  +	power -= (power/500)**3		//energy losses due to radiation
   
   	return 1
   
  
positive.code: 
  
  	if(Proj.flag != "bullet")
  		power += Proj.damage * config_bullet_energy
  	else
  		damage += Proj.damage * config_bullet_energy
  	return 0
  
negative.code: /obj/machinery/power/supermatter/proc/transfer_energy()
  	for(var/obj/machinery/power/rad_collector/R in rad_collectors)
  		if(get_dist(R, src) <= 15) // Better than using orange() every process
  			R.receive_pulse(power * POWER_FACTOR)
  	return
  
  /obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
  