anchor.diff:  	icon = 'icons/mecha/mech_bay.dmi'
   	icon_state = "recharge_port"
   	circuit = /obj/item/circuitboard/machine/mech_recharger
  +	///Weakref to currently recharging mech on our recharging_turf
   	var/datum/weakref/recharging_mech_ref
  +	///Ref to charge console for seeing charge for this port, cyclical reference
   	var/obj/machinery/computer/mech_bay_power_console/recharge_console
  +	///Power unit per second to charge by
   	var/recharge_power = 25
  -	var/on = FALSE
  -	var/turf/recharging_turf = null
  +	///turf that will be checked when a mech wants to charge. directly one turf in the direction it is facing
  +	var/turf/recharging_turf
   
   /obj/machinery/mech_bay_recharge_port/Initialize(mapload)
   	. = ..()
   	recharging_turf = get_step(loc, dir)
   
   /obj/machinery/mech_bay_recharge_port/Destroy()
  -	if (recharge_console && recharge_console.recharge_port == src)
  +	if (recharge_console?.recharge_port == src)
   		recharge_console.recharge_port = null
   	return ..()
   
  
positive.code: 	)
  	return data
  
  
  /obj/machinery/computer/mech_bay_power_console/proc/reconnect()
  	if(recharge_port)
  		return
  	recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in range(1)
  	if(!recharge_port )
  		for(var/D in GLOB.cardinals)
  			var/turf/A = get_step(src, D)
  			A = get_step(A, D)
  			recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in A
  			if(recharge_port)
  				break
  	if(recharge_port)
  		if(!recharge_port.recharge_console)
  			recharge_port.recharge_console = src
  		else
  			recharge_port = null
  
  /obj/machinery/computer/mech_bay_power_console/update_overlays()
  	. = ..()
  
negative.code: 	icon_keyboard = "rd_key"
  	circuit = /obj/item/circuitboard/computer/mech_bay_power_console
  	light_color = LIGHT_COLOR_PINK
  	///Ref to charge port fwe are viewing data for, cyclical reference
  	var/obj/machinery/mech_bay_recharge_port/recharge_port
  
  /obj/machinery/computer/mech_bay_power_console/Initialize(mapload)
  	. = ..()
  	reconnect()
  
  /obj/machinery/computer/mech_bay_power_console/Destroy()
  	if (recharge_port?.recharge_console == src)
  		recharge_port.recharge_console = null
  	return ..()
  
  /obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, datum/tgui/ui)
  	ui = SStgui.try_update_ui(user, src, ui)
  