<commit_before>//gene sequence datum
datum/genesequence
	var/spawned_type
	var/spawned_type_text
	var/list/full_genome_sequence = list()



#define SCANFOSSIL_RETVAL_WRONGTYPE 1
#define SCANFOSSIL_RETVAL_NOMOREGENESEQ 2
#define SCANFOSSIL_RETVAL_SUCCESS 4

/obj/machinery/computer/reconstitutor
	name = "Flora reconstitution console"
	icon = 'icons/obj/computer.dmi'
	icon_state = "dna"
	circuit = "/obj/item/weapon/circuitboard/reconstitutor"
	req_access = list(access_heads) //Only used for record deletion right now.
	var/obj/machinery/clonepod/pod1 = 1 //Linked cloning pod.
	var/temp = ""
	var/menu = 1 //Which menu screen to display
	var/list/records = list()
	var/datum/dna2/record/active_record = null
	var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
	var/loading = 0 // Nice loading text
	var/list/undiscovered_genesequences = null
	var/list/discovered_genesequences = list()
	var/list/completed_genesequences = list()
	var/list/undiscovered_genomes = list()
	var/list/manually_placed_genomes = list()
	var/list/discovered_genomes = list("! Clear !")
	var/list/accepted_fossil_types = list(/obj/item/weapon/fossil/plant)


/obj/machinery/computer/reconstitutor/New()
	if(!undiscovered_genesequences)
		undiscovered_genesequences = master_controller.all_plant_genesequences.Copy()
	..()

/obj/machinery/computer/reconstitutor/animal
	name = "Fauna reconstitution console"
	accepted_fossil_types = list(/obj/item/weapon/fossil/bone,/obj/item/weapon/fossil/shell,/obj/item/weapon/fossil/skull)
	pod1 = null
	circuit = "/obj/item/weapon/circuitboard/reconstitutor/animal"

/obj/machinery/computer/reconstitutor/animal/New()
	undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
	..()

/obj/machinery/computer/reconstitutor/attackby(obj/item/W, mob/user)
	if(istype(W,/obj/item/weapon/fossil))
		user.drop_item()
		W.loc = src.loc
		switch(scan_fossil(W))
			if(1)
				src.visible_message("\red \icon[src] [src] scans the fossil and rejects it.")
			if(2)
				visible_message("\red \icon[src] [src] can not extract any more genetic data from new fossils.")
			if(4)
				src.visible_message("\blue \icon[src] [user] inserts [W] into [src], the fossil is consumed as [src] extracts genetic data from it.")
				del(W)
				updateDialog()
	else if (istype(W, /obj/item/weapon/storage))
		var/obj/item/weapon/storage/S = W
		S.hide_from(usr)
		var/numaccepted = 0
		var/numrejected = 0
		var/full = 0
		for(var/obj/item/weapon/fossil/F in S.contents)
			switch(scan_fossil(F))
				if(SCANFOSSIL_RETVAL_WRONGTYPE)
					numrejected += 1<commit_msg>Fixes #5410 and possibly #5399<commit_after>//gene sequence datum
datum/genesequence
	var/spawned_type
	var/spawned_type_text
	var/list/full_genome_sequence = list()



#define SCANFOSSIL_RETVAL_WRONGTYPE 1
#define SCANFOSSIL_RETVAL_NOMOREGENESEQ 2
#define SCANFOSSIL_RETVAL_SUCCESS 4

/obj/machinery/computer/reconstitutor
	name = "Flora reconstitution console"
	icon = 'icons/obj/computer.dmi'
	icon_state = "dna"
	circuit = "/obj/item/weapon/circuitboard/reconstitutor"
	req_access = list(access_heads) //Only used for record deletion right now.
	var/obj/machinery/clonepod/pod1 = 1 //Linked cloning pod.
	var/temp = ""
	var/menu = 1 //Which menu screen to display
	var/list/records = list()
	var/datum/dna2/record/active_record = null
	var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
	var/loading = 0 // Nice loading text
	var/list/undiscovered_genesequences = null
	var/list/discovered_genesequences = list()
	var/list/completed_genesequences = list()
	var/list/undiscovered_genomes = list()
	var/list/manually_placed_genomes = list()
	var/list/discovered_genomes = list("! Clear !")
	var/list/accepted_fossil_types = list(/obj/item/weapon/fossil/plant)


/obj/machinery/computer/reconstitutor/initialize()
	if(!undiscovered_genesequences)
		undiscovered_genesequences = master_controller.all_plant_genesequences.Copy()
	..()

/obj/machinery/computer/reconstitutor/animal
	name = "Fauna reconstitution console"
	accepted_fossil_types = list(/obj/item/weapon/fossil/bone,/obj/item/weapon/fossil/shell,/obj/item/weapon/fossil/skull)
	pod1 = null
	circuit = "/obj/item/weapon/circuitboard/reconstitutor/animal"

/obj/machinery/computer/reconstitutor/animal/initialize()
	undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
	..()

/obj/machinery/computer/reconstitutor/attackby(obj/item/W, mob/user)
	if(istype(W,/obj/item/weapon/fossil))
		user.drop_item()
		W.loc = src.loc
		switch(scan_fossil(W))
			if(1)
				src.visible_message("\red \icon[src] [src] scans the fossil and rejects it.")
			if(2)
				visible_message("\red \icon[src] [src] can not extract any more genetic data from new fossils.")
			if(4)
				src.visible_message("\blue \icon[src] [user] inserts [W] into [src], the fossil is consumed as [src] extracts genetic data from it.")
				del(W)
				updateDialog()
	else if (istype(W, /obj/item/weapon/storage))
		var/obj/item/weapon/storage/S = W
		S.hide_from(usr)
		var/numaccepted = 0
		var/numrejected = 0
		var/full = 0
		for(var/obj/item/weapon/fossil/F in S.contents)
			switch(scan_fossil(F))
				if(SCANFOSSIL_RETVAL_WRONGTYPE)
					numrejected += 1
{'fraction_non_alphanumeric': 0.12345679012345678, 'fraction_numerical': 0.007597340930674264, 'mean_word_length': 4.560718057022175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3226909', 'n_tokens_mistral': 2146, 'n_tokens_neox': 1961, 'n_words': 349}