<commit_before>/turf/simulated/floor/mech_bay_recharge_floor
	name = "Mech Bay Recharge Station"
	icon = 'icons/turf/floors.dmi'
	icon_state = "recharge_floor"
	var/obj/machinery/mech_bay_recharge_port/recharge_port
	var/obj/machinery/computer/mech_bay_power_console/recharge_console
	var/obj/mecha/recharging_mecha = null

/turf/simulated/floor/mech_bay_recharge_floor/airless
	icon_state = "recharge_floor_asteroid"
	oxygen = 0.01
	nitrogen = 0.01
	temperature = TCMB

	Entered(var/obj/mecha/mecha)
		. = ..()
		if(istype(mecha))
			mecha.occupant_message("<b>Initializing power control devices.</b>")
			init_devices()
			if(recharge_console && recharge_port)
				recharging_mecha = mecha
				recharge_console.mecha_in(mecha)
				return
			else if(!recharge_console)
				mecha.occupant_message("<font color='red'>Control console not found. Terminating.</font>")
			else if(!recharge_port)
				mecha.occupant_message("<font color='red'>Power port not found. Terminating.</font>")
		return

	Exited(atom)
		. = ..()
		if(atom == recharging_mecha)
			recharging_mecha = null
			if(recharge_console)
				recharge_console.mecha_out()
		return

	proc/init_devices()
		recharge_console = locate() in range(1,src)
		recharge_port = locate(/obj/machinery/mech_bay_recharge_port, get_step(src, WEST))
		if(recharge_console)
			recharge_console.recharge_floor = src
			if(recharge_port)
				recharge_console.recharge_port = recharge_port
		if(recharge_port)
			recharge_port.recharge_floor = src
			if(recharge_console)
				recharge_port.recharge_console = recharge_console
		return




/obj/machinery/mech_bay_recharge_port
	name = "Mech Bay Power Port"
	density = 1
	anchored = 1
	icon = 'icons/mecha/mech_bay.dmi'
	icon_state = "recharge_port"
	var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
	var/obj/machinery/computer/mech_bay_power_console/recharge_console
	var/datum/global_iterator/mech_bay_recharger/pr_recharger

	New()
		..()
		pr_recharger = new /datum/global_iterator/mech_bay_recharger(null,0)
		return<commit_msg>Mech recharge fix<commit_after>/turf/simulated/floor/mech_bay_recharge_floor
	name = "Mech Bay Recharge Station"
	icon = 'icons/turf/floors.dmi'
	icon_state = "recharge_floor"
	var/obj/machinery/mech_bay_recharge_port/recharge_port
	var/obj/machinery/computer/mech_bay_power_console/recharge_console
	var/obj/mecha/recharging_mecha = null

	Entered(var/obj/mecha/mecha)
		. = ..()
		if(istype(mecha))
			mecha.occupant_message("<b>Initializing power control devices.</b>")
			init_devices()
			if(recharge_console && recharge_port)
				recharging_mecha = mecha
				recharge_console.mecha_in(mecha)
				return
			else if(!recharge_console)
				mecha.occupant_message("<font color='red'>Control console not found. Terminating.</font>")
			else if(!recharge_port)
				mecha.occupant_message("<font color='red'>Power port not found. Terminating.</font>")
		return

	Exited(atom)
		. = ..()
		if(atom == recharging_mecha)
			recharging_mecha = null
			if(recharge_console)
				recharge_console.mecha_out()
		return

	proc/init_devices()
		recharge_console = locate() in range(1,src)
		recharge_port = locate(/obj/machinery/mech_bay_recharge_port, get_step(src, WEST))
		if(recharge_console)
			recharge_console.recharge_floor = src
			if(recharge_port)
				recharge_console.recharge_port = recharge_port
		if(recharge_port)
			recharge_port.recharge_floor = src
			if(recharge_console)
				recharge_port.recharge_console = recharge_console
		return

/turf/simulated/floor/mech_bay_recharge_floor/airless
	icon_state = "recharge_floor_asteroid"
	oxygen = 0.01
	nitrogen = 0.01
	temperature = TCMB


/obj/machinery/mech_bay_recharge_port
	name = "Mech Bay Power Port"
	density = 1
	anchored = 1
	icon = 'icons/mecha/mech_bay.dmi'
	icon_state = "recharge_port"
	var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
	var/obj/machinery/computer/mech_bay_power_console/recharge_console
	var/datum/global_iterator/mech_bay_recharger/pr_recharger

	New()
		..()
		pr_recharger = new /datum/global_iterator/mech_bay_recharger(null,0)
		return
{'fraction_non_alphanumeric': 0.10500490677134446, 'fraction_numerical': 0.004906771344455349, 'mean_word_length': 4.986784140969163, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7559407', 'n_tokens_mistral': 1721, 'n_tokens_neox': 1535, 'n_words': 211}