diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index cb5cd14435c3..7a97c8efef4c 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -23,9 +23,12 @@ GLOBAL_LIST_EMPTY(bad_blocks) /datum/dna // READ-ONLY, GETS OVERWRITTEN // DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE - var/uni_identity = "" // Encoded UI - var/struc_enzymes = "" // Encoded SE - var/unique_enzymes = "" // MD5 of player name + /// Encoded UI + var/uni_identity = "" + /// Encoded SE + var/struc_enzymes = "" + /// MD5 of player name + var/unique_enzymes = "" // Original Encoded SE, for use with Ryetalin var/struc_enzymes_original = "" // Encoded SE @@ -41,11 +44,16 @@ GLOBAL_LIST_EMPTY(bad_blocks) var/list/UI[DNA_UI_LENGTH] // From old dna. - var/blood_type = "A+" // Should probably change to an integer => string map but I'm lazy. - var/real_name // Stores the real name of the person who originally got this dna datum. Used primarily for changelings, - - var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man) - var/list/default_blocks = list() //list of all blocks toggled at roundstart + /// The blood type of the mob. + var/blood_type = "A+" + /// Stores the real name of the person who originally got this dna datum. Used primarily for changelings, + var/real_name + /// The type of mutant race the player is if applicable (i.e. potato-man) + var/datum/species/species = new /datum/species/human + /// list of all blocks toggled at roundstart + var/list/default_blocks = list() + /// The flavor text of the person. We store this here for polymorph and changelings. + var/flavor_text // Make a copy of this strand. // USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION! @@ -57,6 +65,7 @@ GLOBAL_LIST_EMPTY(bad_blocks) new_dna.blood_type = blood_type new_dna.real_name = real_name new_dna.species = new species.type + new_dna.flavor_text = flavor_text for(var/b = 1; b <= DNA_SE_LENGTH; b++) new_dna.SE[b]=SE[b] @@ -439,6 +448,7 @@ GLOBAL_LIST_EMPTY(bad_blocks) // Because old DNA coders were insane or something data["blood_type"] = blood_type data["real_name"] = real_name + data["flavor_text"] = flavor_text return data /datum/dna/deserialize(data) @@ -452,6 +462,7 @@ GLOBAL_LIST_EMPTY(bad_blocks) species = new S blood_type = data["blood_type"] real_name = data["real_name"] + flavor_text = data["flavor_text"] /datum/dna/proc/transfer_identity(mob/living/carbon/human/destination) if(!istype(destination)) diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index 70cdf2edc9f3..2e9cd296707a 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -123,6 +123,7 @@ H.real_name = team_name + " Agent" H.cleanSE() //No fat/blind/colourblind/epileptic/whatever ayys. H.overeatduration = 0 + H.dna.flavor_text = null H.flavor_text = null H.equipOutfit(/datum/outfit/abductor/agent) greet_agent(agent,team_number) @@ -140,6 +141,7 @@ H.real_name = team_name + " Scientist" H.cleanSE() //No fat/blind/colourblind/epileptic/whatever ayys. H.overeatduration = 0 + H.dna.flavor_text = null H.flavor_text = null H.equipOutfit(/datum/outfit/abductor/scientist) greet_scientist(scientist,team_number) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 79f2f7bcbf43..67470854f0d1 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -164,11 +164,12 @@ var/mob/living/carbon/human/M = synd_mind.current M.set_species(/datum/species/human, TRUE) + M.dna.flavor_text = null + M.flavor_text = null M.dna.ready_dna(M) // Quadriplegic Nuke Ops won't be participating in the paralympics M.dna.species.create_organs(M) M.cleanSE() //No fat/blind/colourblind/epileptic/whatever ops. M.overeatduration = 0 - M.flavor_text = null var/obj/item/organ/external/head/head_organ = M.get_organ("head") var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde diff --git a/code/game/machinery/clonepod.dm b/code/game/machinery/clonepod.dm index ad09a37c88e3..4c72363d01f6 100644 --- a/code/game/machinery/clonepod.dm +++ b/code/game/machinery/clonepod.dm @@ -313,7 +313,7 @@ /obj/machinery/clonepod/proc/create_clone() clone = new /mob/living/carbon/human(src, patient_data.genetic_info.species.type) - clone.change_dna(patient_data.genetic_info, FALSE, TRUE) + clone.change_dna(patient_data.genetic_info, FALSE) for(var/obj/item/organ/external/limb in clone.bodyparts) if(!(limb.limb_name in limbs_to_grow)) //if the limb was determined to be vital diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm index 4b1932990b38..287329c21f37 100644 --- a/code/modules/client/preference/character.dm +++ b/code/modules/client/preference/character.dm @@ -1909,6 +1909,7 @@ character.change_eye_color(e_colour, skip_icons = TRUE) character.original_eye_color = e_colour + character.dna.flavor_text = flavor_text if(disabilities & DISABILITY_FLAG_FAT) character.dna.SetSEState(GLOB.fatblock, TRUE, TRUE) diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index fd601ae0bb3f..5ecfde966c73 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -1004,16 +1004,16 @@ dna.real_name = name return name -/mob/living/carbon/human/proc/change_dna(datum/dna/new_dna, include_species_change = FALSE, keep_flavor_text = FALSE) +/mob/living/carbon/human/proc/change_dna(datum/dna/new_dna, include_species_change = FALSE) if(include_species_change) set_species(new_dna.species.type, retain_damage = TRUE, transformation = TRUE, keep_missing_bodyparts = TRUE) dna = new_dna.Clone() if(include_species_change) //We have to call this after new_dna.Clone() so that species actions don't get overwritten dna.species.on_species_gain(src) real_name = new_dna.real_name + if(dna.flavor_text) + flavor_text = dna.flavor_text domutcheck(src, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them - if(!keep_flavor_text) - flavor_text = "" dna.UpdateSE() dna.UpdateUI() sync_organ_dna(TRUE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3746e37a4e7f..a3666a8e5aeb 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -767,11 +767,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ to_chat(usr, "You have to be conscious to change your flavor text") return msg = copytext(msg, 1, MAX_MESSAGE_LEN) + if(dna) + dna.flavor_text = msg // Only carbon mobs have DNA. flavor_text = msg /mob/proc/print_flavor_text(shrink = TRUE) if(flavor_text && flavor_text != "") - var/msg = replacetext(flavor_text, "\n", " ") + var/msg = !dna.flavor_text ? replacetext(dna.flavor_text, "\n", " ") : replacetext(flavor_text, "\n", " ") if(length(msg) <= 40 || !shrink) return "[msg]" // There is already encoded by tgui_input else diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index bfc87638d23d..5c5a2f96b85d 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -227,7 +227,7 @@ var/mob/living/carbon/human/H = M var/datum/dna/D = data["dna"] if(!D.species.is_small) - H.change_dna(D, TRUE, TRUE) + H.change_dna(D, TRUE) return ..()