anchor.diff:  	throw_speed = 1
   	throw_range = 2
   	custom_materials = list(/datum/material/iron=750)
  -	var/drain_rate = 2000000 // amount of power to drain per tick
  -	var/power_drained = 0 // has drained this much power
  -	var/max_power = 6e8 // maximum power that can be drained before exploding
  -	var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
  -	var/admins_warned = FALSE // stop spam, only warn the admins once that we are about to boom
  -
  -	var/obj/structure/cable/attached // the attached cable
  +	var/max_heat = 5e7 // Maximum contained heat before exploding. Not actual temperature.
  +	var/internal_heat = 0 // Contained heat, goes down every tick.
  +	var/mode = DISCONNECTED // DISCONNECTED, CLAMPED_OFF, OPERATING
  +	var/admins_warned = FALSE // Stop spam, only warn the admins once that we are about to boom.
  +
  +	var/obj/structure/cable/attached
   
   /obj/item/powersink/update_icon_state()
   	icon_state = "powersink[mode == OPERATING]"
   	return ..()
  +
  +/obj/item/powersink/examine(mob/user)
  +	. = ..()
  +	if(mode)
  +		. += "\The [src] is bolted to the floor."
  +	if(in_range(user, src) || isobserver(user) && internal_heat > max_heat * 0.5)
  +		. += "<span class='danger'>[src] is warping the air above it. It must be very hot.</span>"
   
   /obj/item/powersink/set_anchored(anchorvalue)
   	. = ..()
  
positive.code: 				"<span class='hear'>You hear a click.</span>")
  			set_mode(CLAMPED_OFF)
  
  /obj/item/powersink/process()
  	if(!attached)
  		set_mode(DISCONNECTED)
  		return
  
  	var/datum/powernet/PN = attached.powernet
  	if(PN)
  		set_light(5)
  
  		// found a powernet, so drain up to max power from it
  
  		var/drained = min ( drain_rate, attached.newavail() )
  		attached.add_delayedload(drained)
  		power_drained += drained
  
  		// if tried to drain more than available on powernet
  		// now look for APCs and drain their cells
  		if(drained < drain_rate)
  			for(var/obj/machinery/power/terminal/T in PN.nodes)
  				if(istype(T.master, /obj/machinery/power/apc))
  					var/obj/machinery/power/apc/A = T.master
  					if(A.operating && A.cell)
  						A.cell.charge = max(0, A.cell.charge - 50)
  						power_drained += 50
  						if(A.charging == 2) // If the cell was full
  							A.charging = 1 // It's no longer full
  				if(drained >= drain_rate)
  					break
  
  	if(power_drained > max_power * 0.98)
  		if (!admins_warned)
  			admins_warned = TRUE
  			message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
  		playsound(src, 'sound/effects/screech.ogg', 100, TRUE, TRUE)
  
  	if(power_drained >= max_power)
  		STOP_PROCESSING(SSobj, src)
  		explosion(src, devastation_range = 4, heavy_impact_range = 8, light_impact_range = 16, flash_range = 32)
  		qdel(src)
  
negative.code: #undef DISCONNECTED
  #undef CLAMPED_OFF
  #undef OPERATING
  #undef FRACTION_TO_RELEASE
  #undef ALERT
  #undef MINIMUM_HEAT
  