<commit_before>
/////////////////////////// DNA DATUM
/datum/dna
	var/unique_enzymes
	var/uni_identity
	var/blood_type
	var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man)
	var/list/features = list("FFF") //first value is mutant color
	var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
	var/nameless = FALSE
	var/custom_species	//siiiiigh I guess this is important
	var/list/mutations = list()   //All mutations are from now on here
	var/list/temporary_mutations = list() //Temporary changes to the UE
	var/list/previous = list() //For temporary name/ui/ue/blood_type modifications
	var/mob/living/holder
	var/delete_species = TRUE //Set to FALSE when a body is scanned by a cloner to fix #38875
	var/mutation_index[DNA_MUTATION_BLOCKS] //List of which mutations this carbon has and its assigned block
	var/default_mutation_genes[DNA_MUTATION_BLOCKS] //List of the default genes from this mutation to allow DNA Scanner highlighting
	var/stability = 100
	var/scrambled = FALSE //Did we take something like mutagen? In that case we cant get our genes scanned to instantly cheese all the powers.
	var/skin_tone_override //because custom skin tones are not found in the skin_tones global list.

/datum/dna/New(mob/living/new_holder)
	if(istype(new_holder))
		holder = new_holder

/datum/dna/Destroy()
	if(iscarbon(holder))
		var/mob/living/carbon/cholder = holder
		if(cholder.dna == src)
			cholder.dna = null
	holder = null

	if(delete_species)
		QDEL_NULL(species)

	mutations.Cut()					//This only references mutations, just dereference.
	temporary_mutations.Cut()		//^
	previous.Cut()					//^

	return ..()

/datum/dna/proc/transfer_identity(mob/living/carbon/destination, transfer_SE = 0)
	if(!istype(destination))
		return
	var/old_size = destination.dna.features["body_size"]
	destination.dna.unique_enzymes = unique_enzymes
	destination.dna.uni_identity = uni_identity
	destination.dna.blood_type = blood_type
	destination.dna.skin_tone_override = skin_tone_override
	destination.dna.features = features.Copy()
	destination.set_species(species.type, icon_update=0)
	destination.dna.real_name = real_name
	destination.dna.nameless = nameless
	destination.dna.custom_species = custom_species
	destination.dna.temporary_mutations = temporary_mutations.Copy()
	if(ishuman(destination))
		var/mob/living/carbon/human/H = destination
		H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA
	if(transfer_SE)
		destination.dna.mutation_index = mutation_index
		destination.dna.default_mutation_genes = default_mutation_genes

	destination.dna.update_body_size(old_size)

	SEND_SIGNAL(destination, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, src, transfer_SE)

/datum/dna/proc/copy_dna(datum/dna/new_dna)
	new_dna.unique_enzymes = unique_enzymes
	new_dna.mutation_index = mutation_index
	new_dna.default_mutation_genes = default_mutation_genes
	new_dna.uni_identity = uni_identity
	new_dna.blood_type = blood_type
	new_dna.skin_tone_override = skin_tone_override
	new_dna.features = features.Copy()
	new_dna.species = new species.type
	new_dna.species.say_mod = species.say_mod
	new_dna.real_name = real_name
	new_dna.nameless = nameless
	new_dna.custom_species = custom_species
	new_dna.mutations = mutations.Copy()

//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer<commit_msg>we have two procs that do a similar thing wow<commit_after>
/////////////////////////// DNA DATUM
/datum/dna
	var/unique_enzymes
	var/uni_identity
	var/blood_type
	var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man)
	var/list/features = list("FFF") //first value is mutant color
	var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
	var/nameless = FALSE
	var/custom_species	//siiiiigh I guess this is important
	var/list/mutations = list()   //All mutations are from now on here
	var/list/temporary_mutations = list() //Temporary changes to the UE
	var/list/previous = list() //For temporary name/ui/ue/blood_type modifications
	var/mob/living/holder
	var/delete_species = TRUE //Set to FALSE when a body is scanned by a cloner to fix #38875
	var/mutation_index[DNA_MUTATION_BLOCKS] //List of which mutations this carbon has and its assigned block
	var/default_mutation_genes[DNA_MUTATION_BLOCKS] //List of the default genes from this mutation to allow DNA Scanner highlighting
	var/stability = 100
	var/scrambled = FALSE //Did we take something like mutagen? In that case we cant get our genes scanned to instantly cheese all the powers.
	var/skin_tone_override //because custom skin tones are not found in the skin_tones global list.

/datum/dna/New(mob/living/new_holder)
	if(istype(new_holder))
		holder = new_holder

/datum/dna/Destroy()
	if(iscarbon(holder))
		var/mob/living/carbon/cholder = holder
		if(cholder.dna == src)
			cholder.dna = null
	holder = null

	if(delete_species)
		QDEL_NULL(species)

	mutations.Cut()					//This only references mutations, just dereference.
	temporary_mutations.Cut()		//^
	previous.Cut()					//^

	return ..()

/datum/dna/proc/transfer_identity(mob/living/carbon/destination, transfer_SE = 0)
	if(!istype(destination))
		return
	var/old_size = destination.dna.features["body_size"]
	destination.dna.unique_enzymes = unique_enzymes
	destination.dna.uni_identity = uni_identity
	destination.dna.blood_type = blood_type
	destination.dna.skin_tone_override = skin_tone_override
	destination.dna.features = features.Copy()
	destination.set_species(species.type, icon_update=0)
	destination.species.say_mod = species.say_mod
	destination.dna.real_name = real_name
	destination.dna.nameless = nameless
	destination.dna.custom_species = custom_species
	destination.dna.temporary_mutations = temporary_mutations.Copy()
	if(ishuman(destination))
		var/mob/living/carbon/human/H = destination
		H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA
	if(transfer_SE)
		destination.dna.mutation_index = mutation_index
		destination.dna.default_mutation_genes = default_mutation_genes

	destination.dna.update_body_size(old_size)

	SEND_SIGNAL(destination, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, src, transfer_SE)

/datum/dna/proc/copy_dna(datum/dna/new_dna)
	new_dna.unique_enzymes = unique_enzymes
	new_dna.mutation_index = mutation_index
	new_dna.default_mutation_genes = default_mutation_genes
	new_dna.uni_identity = uni_identity
	new_dna.blood_type = blood_type
	new_dna.skin_tone_override = skin_tone_override
	new_dna.features = features.Copy()
	new_dna.species = new species.type
	new_dna.species.say_mod = species.say_mod
	new_dna.real_name = real_name
	new_dna.nameless = nameless
	new_dna.custom_species = custom_species
	new_dna.mutations = mutations.Copy()

//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer
{'fraction_non_alphanumeric': 0.09342123720016833, 'fraction_numerical': 0.003085986814419975, 'mean_word_length': 4.654242664551943, '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': '4581011', 'n_tokens_mistral': 2562, 'n_tokens_neox': 2357, 'n_words': 586}