anchor.diff:  		else
   			if(input_attempt && input_available > 0 && input_available >= input_level)
   				inputting = 1
  +
  +	//outputting
  +	if(outputting)
  +		output_used = min( charge/SMESRATE, output_level)		//limit output to that stored
  +
  +		charge -= output_used*SMESRATE		// reduce the storage (may be recovered in /restore() if excessive)
  +
  +		add_avail(output_used)				// add output to powernet (smes side)
  +
  +		if(output_used < 0.0001)			// either from no charge or set to 0
  +			outputting = 0
  +			investigate_log("lost power and turned <font color='red'>off</font>","singulo")
  +	else if(output_attempt && charge > output_level && output_level > 0)
  +		outputting = 1
   	else
  -		inputting = 0
  -
  -	//outputting
  -	if(output_attempt)
  -		if(outputting)
  -			output_used = min( charge/SMESRATE, output_level)		//limit output to that stored
  -
  -			charge -= output_used*SMESRATE		// reduce the storage (may be recovered in /restore() if excessive)
  -
  -			add_avail(output_used)				// add output to powernet (smes side)
  -
  -			if(output_used < 0.0001)		// either from no charge or set to 0
  -				outputting = 0
  -				investigate_log("lost power and turned <font color='red'>off</font>","singulo")
  -		else if(output_attempt && charge > output_level && output_level > 0)
  -			outputting = 1
  -		else
  -			output_used = 0
  -	else
  -		outputting = 0
  +		output_used = 0
   
   	// only update icon if state changed
   	if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting)
  
positive.code: /obj/machinery/power/smes/ui_act(action, params)
  	if(..())
  		return
  	switch(action)
  		if("tryinput")
  			input_attempt = !input_attempt
  			log_smes(usr.ckey)
  			update_icon()
  			. = TRUE
  		if("tryoutput")
  			output_attempt = !output_attempt
  			log_smes(usr.ckey)
  			update_icon()
  			. = TRUE
  		if("input")
  			switch(params["set"])
  				if("custom")
  
negative.code: 
  
  		var/obj/item/stack/cable_coil/C = I
  		if(C.amount < 10)
  			user << "<span class='warning'>You need more wires!</span>"
  			return
  
  		user << "<span class='notice'>You start building the power terminal...</span>"
  		playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
  
  		if(do_after(user, 20, target = src) && C.amount >= 10)
  			var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
  			if (prob(50) && electrocute_mob(usr, N, N)) //animate the electrocution if uncautious and unlucky
  				var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
  