anchor.diff:  	var/cooling = TRUE
   	var/base_heating = 140
   	var/base_cooling = 170
  +	var/was_on = FALSE      //checks if the machine was on before it lost power
   
   /obj/machinery/atmospherics/components/unary/thermomachine/Initialize()
   	. = ..()
  
positive.code: 		var/combined_energy = heat_capacity * target_temperature + air_heat_capacity * air_contents.temperature
  		air_contents.temperature = combined_energy/combined_heat_capacity
  
  	var/temperature_delta= abs(old_temperature - air_contents.temperature)
  	if(temperature_delta > 1)
  		active_power_usage = (heat_capacity * temperature_delta) / 10 + idle_power_usage
  		update_parents()
  	else
  		active_power_usage = idle_power_usage
  	return 1
  
  /obj/machinery/atmospherics/components/unary/thermomachine/attackby(obj/item/I, mob/user, params)
  	if(!on)
  
negative.code: 			use_power = on ? ACTIVE_POWER_USE : IDLE_POWER_USE
  			investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS)
  			. = TRUE
  			was_on = !was_on  //if the machine was manually turned on, ensure it remembers it
  		if("cooling")
  			swap_function()
  			investigate_log("was changed to [cooling ? "cooling" : "heating"] by [key_name(usr)]", INVESTIGATE_ATMOS)
  