<commit_before>/obj/machinery/atmospherics/components/unary/cryo_cell
	name = "cryo cell"
	icon = 'icons/obj/cryogenics.dmi'
	icon_state = "cell-off"
	density = 1
	anchored = 1.0
	layer = 4

	var/on = 0
	var/temperature_archived
	var/obj/item/weapon/reagent_containers/beaker = null
	var/next_trans = 0
	var/current_heat_capacity = 50
	state_open = 0
	var/efficiency = 1
	req_access = list(access_medical, access_genetics)

/obj/machinery/atmospherics/components/unary/cryo_cell/New()
	..()
	initialize_directions = dir
	component_parts = list()
	component_parts += new /obj/item/weapon/circuitboard/cryo_tube(null)
	component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/stack/cable_coil(null, 1)


/obj/machinery/atmospherics/components/unary/cryo_cell/construction()
	..(dir,dir)

/obj/machinery/atmospherics/components/unary/cryo_cell/RefreshParts()
	var/C
	for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
		C += M.rating
	current_heat_capacity = 50 * C
	efficiency = C

/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy()
	var/turf/T = loc
	T.contents += contents

	if(beaker)
		beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
	beaker = null
	..()
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos()
	..()
	var/datum/gas_mixture/air_contents = airs[AIR1]

	if(air_contents)
		temperature_archived = air_contents.temperature
		heat_gas_contents()
	if(abs(temperature_archived-air_contents.temperature) > 1)
		update_parents()

/obj/machinery/atmospherics/components/unary/cryo_cell/process()
	..()
	if(occupant)
		if(occupant.health >= 100)
			on = 0
			open_machine()
			playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
	if(!nodes[NODE1] || !is_operational())
		return

	if(!on)
		updateDialog()
		return

	if(airs[AIR1])
		if (occupant)
			process_occupant()
		expel_gas()

	updateDialog()
	return 1

/obj/machinery/atmospherics/components/unary/cryo_cell/check_access(obj/item/weapon/card/id/I)
	if(istype(I, /obj/item/device/pda))
		var/obj/item/device/pda/pda = I
		I = pda.id
	if(!istype(I) || !I.access) //not ID or no access
		return 0
	for(var/req in req_access)
		if(!(req in I.access)) //doesn't have this access
			return 0
	return 1

/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
	if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !iscarbon(target) || !is_authorized(user))
		return
	close_machine(target)

/obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user)	open_machine()

/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist()
	open_machine()
	return

/obj/machinery/atmospherics/components/unary/cryo_cell/verb/move_eject()
	set name = "Eject Cryo Cell"
	set desc = "Begin the release sequence inside the cryo tube."
	set category = "Object"
	set src in oview(1)
	if(usr == occupant || contents.Find(usr))	//If the user is inside the tube...
		if(usr.stat == DEAD)	//and he's not dead....
			return
		usr << "<span class='notice'>Release sequence activated. This will take about a minute.</span>"
		sleep(600)
		if(!src || !usr || (!occupant && !contents.Find(usr)))	//Check if someone's released/replaced/bombed him already
			return
		open_machine()<commit_msg>Tentative cryo ID fix (I have no fucking idea what I am doing)<commit_after>/obj/machinery/atmospherics/components/unary/cryo_cell
	name = "cryo cell"
	icon = 'icons/obj/cryogenics.dmi'
	icon_state = "cell-off"
	density = 1
	anchored = 1.0
	layer = 4

	var/on = 0
	var/temperature_archived
	var/obj/item/weapon/reagent_containers/beaker = null
	var/next_trans = 0
	var/current_heat_capacity = 50
	state_open = 0
	var/efficiency = 1
	req_access = list(access_medical, access_genetics)
	req_access_txt = "5;9"

/obj/machinery/atmospherics/components/unary/cryo_cell/New()
	..()
	initialize_directions = dir
	component_parts = list()
	component_parts += new /obj/item/weapon/circuitboard/cryo_tube(null)
	component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
	component_parts += new /obj/item/stack/cable_coil(null, 1)


/obj/machinery/atmospherics/components/unary/cryo_cell/construction()
	..(dir,dir)

/obj/machinery/atmospherics/components/unary/cryo_cell/RefreshParts()
	var/C
	for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
		C += M.rating
	current_heat_capacity = 50 * C
	efficiency = C

/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy()
	var/turf/T = loc
	T.contents += contents

	if(beaker)
		beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
	beaker = null
	..()
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos()
	..()
	var/datum/gas_mixture/air_contents = airs[AIR1]

	if(air_contents)
		temperature_archived = air_contents.temperature
		heat_gas_contents()
	if(abs(temperature_archived-air_contents.temperature) > 1)
		update_parents()

/obj/machinery/atmospherics/components/unary/cryo_cell/process()
	..()
	if(occupant)
		if(occupant.health >= 100)
			on = 0
			open_machine()
			playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
	if(!nodes[NODE1] || !is_operational())
		return

	if(!on)
		updateDialog()
		return

	if(airs[AIR1])
		if (occupant)
			process_occupant()
		expel_gas()

	updateDialog()
	return 1

/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
	if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !iscarbon(target) || !is_authorized(user))
		return
	close_machine(target)

/obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user)	open_machine()

/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist()
	open_machine()
	return

/obj/machinery/atmospherics/components/unary/cryo_cell/verb/move_eject()
	set name = "Eject Cryo Cell"
	set desc = "Begin the release sequence inside the cryo tube."
	set category = "Object"
	set src in oview(1)
	if(usr == occupant || contents.Find(usr))	//If the user is inside the tube...
		if(usr.stat == DEAD)	//and he's not dead....
			return
		usr << "<span class='notice'>Release sequence activated. This will take about a minute.</span>"
		sleep(600)
		if(!src || !usr || (!occupant && !contents.Find(usr)))	//Check if someone's released/replaced/bombed him already
			return
		open_machine()
{'fraction_non_alphanumeric': 0.1339222111411882, 'fraction_numerical': 0.008975637555207295, 'mean_word_length': 4.6750202101859335, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3101539', 'n_tokens_mistral': 2836, 'n_tokens_neox': 2628, 'n_words': 455}